@Override public int compare( UniqueKey<K> o1, UniqueKey<K> o2 ) { if (o1 == o2) return 0; int diff = ObjectUtil.compareWithNulls((Comparable<?>)o1.actualKey, (Comparable<?>)o2.actualKey); if (diff != 0) return diff; long ldiff = o1.id - o2.id; return ldiff == 0L ? 0 : (ldiff <= 0L ? -1 : 1); }
@Override public int compare( NodeKey key1, NodeKey key2 ) { return ObjectUtil.compareWithNulls(key1, key2); }
@Override public int compare( NodeKey key1, NodeKey key2 ) { return ObjectUtil.compareWithNulls(key1, key2); }
@Override public int compare( UniqueKey<K> o1, UniqueKey<K> o2 ) { if (o1 == o2) return 0; int diff = ObjectUtil.compareWithNulls((Comparable<?>)o1.actualKey, (Comparable<?>)o2.actualKey); if (diff != 0) return diff; long ldiff = o1.id - o2.id; return ldiff == 0L ? 0 : (ldiff <= 0L ? -1 : 1); }
/** * {@inheritDoc} * * @see java.lang.Comparable#compareTo(java.lang.Object) */ @Override public int compareTo( Property that ) { if (this == that) return 0; if (that == null) return 1; int diff = ObjectUtil.compareWithNulls(this.category, that.category); if (diff != 0) return diff; diff = ObjectUtil.compareWithNulls(this.label, that.label); if (diff != 0) return diff; diff = ObjectUtil.compareWithNulls(this.name, that.name); if (diff != 0) return diff; return 0; }
/** * {@inheritDoc} * * @see java.lang.Comparable#compareTo(java.lang.Object) */ @Override public int compareTo( Property that ) { if (this == that) return 0; if (that == null) return 1; int diff = ObjectUtil.compareWithNulls(this.category, that.category); if (diff != 0) return diff; diff = ObjectUtil.compareWithNulls(this.label, that.label); if (diff != 0) return diff; diff = ObjectUtil.compareWithNulls(this.name, that.name); if (diff != 0) return diff; return 0; }
/** * {@inheritDoc} * * @see java.lang.Comparable#compareTo(java.lang.Object) */ @Override public int compareTo( Property that ) { if (this == that) return 0; if (that == null) return 1; int diff = ObjectUtil.compareWithNulls(this.category, that.category); if (diff != 0) return diff; diff = ObjectUtil.compareWithNulls(this.label, that.label); if (diff != 0) return diff; diff = ObjectUtil.compareWithNulls(this.name, that.name); if (diff != 0) return diff; return 0; }