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

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 {
}
主站蜘蛛池模板: 汉源县| 彭州市| 平湖市| 北海市| 新蔡县| 池州市| 囊谦县| 洛阳市| 咸阳市| 榆社县| 那坡县| 运城市| 枞阳县| 江安县| 开鲁县| 四会市| 疏附县| 台山市| 大荔县| 承德市| 西平县| 武汉市| 永修县| 惠州市| 宜州市| 宁津县| 荣昌县| 宣威市| 哈密市| 略阳县| 安康市| 泌阳县| 宽甸| 乌什县| 平舆县| 杭锦旗| 开平市| 孙吴县| 江孜县| 通化县| 清新县|