官术网_书友最值得收藏!

Creating the interfaces

The interface in our case is very simple.

package packt.java9.by.example.ch03; 

public interface Sort {
void sort(SortableCollection collection);
}

The interface should do only one thing—sort something that is sortable. As we wanted to be very general in this approach, we also have to define what sortable is. To do so, we will need another interface.

package packt.java9.by.example.ch03; 

public interface SortableCollection {
}
主站蜘蛛池模板: 万载县| 上高县| 米脂县| 漳平市| 元阳县| 东乡| 土默特右旗| 石景山区| 崇明县| 天柱县| 东丰县| 进贤县| 湘潭市| 奇台县| 桃园市| 侯马市| 鄂伦春自治旗| 剑阁县| 拉萨市| 洪泽县| 化州市| 社会| 离岛区| 永平县| 衡山县| 山东省| 六枝特区| 岑巩县| 丹东市| 云和县| 宾阳县| 胶南市| 莎车县| 育儿| 醴陵市| 双江| 武宁县| 石林| 肃南| 阜城县| 淮阳县|