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

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 {
}
主站蜘蛛池模板: 余干县| 南安市| 商河县| 昌平区| 白河县| 九台市| 交城县| 莱阳市| 泌阳县| 汾阳市| 嵩明县| 吉林省| 会宁县| 长寿区| 德格县| 阿拉尔市| 巴彦淖尔市| 揭东县| 阿巴嘎旗| 宁远县| 昭平县| 三原县| 吉林省| 景洪市| 班戈县| 清水河县| 鹤山市| 襄樊市| 隆尧县| 江陵县| 昔阳县| 黎平县| 沈丘县| 温宿县| 宝鸡市| 个旧市| 元阳县| 介休市| 宜城市| 社旗县| 石阡县|