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

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 {
}
主站蜘蛛池模板: 灵璧县| 临邑县| 香河县| 长汀县| 辉南县| 江口县| 临夏市| 金堂县| 开原市| 高要市| 铜川市| 榆树市| 遂宁市| 平顺县| 许昌市| 遵义市| 迁西县| 北川| 桃园县| 宣武区| 隆尧县| 玛多县| 大同市| 华亭县| 运城市| 琼结县| 衡东县| 四会市| 宜丰县| 都昌县| 连南| 平安县| 凯里市| 大兴区| 德格县| 西林县| 峡江县| 宁陕县| 平武县| 东台市| 桑日县|