什么类型的集合用于Java中的排序唯一对象?

时间:2016-03-23 19:57:36

标签: java collections

我有简单的对象:

public class Vector3i {

    public int x, y, z;

    public Vector3i(int x, int y, int z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }

}

我需要哪些系列来分类独特的物品?

感谢您的帮助和建议。

1 个答案:

答案 0 :(得分:0)

要在java中对唯一对象进行排序,您需要创建自己的比较器。 Using comparator to make custom sort

相关问题