/* (non-Javadoc) * @see java.lang.Comparable#compareTo(java.lang.Object) */ @Override public int compareTo(Property<?, ?> other) { if (other == null) { return 1; } return this.getValue() .compareTo(Coerce.toEnum(other.getValue(), Direction.class, Direction.NONE)); }
@Override public int compareTo(Property<?, ?> o) { return this.getValue().getId().compareTo(o == null ? "" : Coerce.toString(o.getValue())); }
@Override public int compareTo(ItemProperty<?, ?> other) { return this.getValue().compareTo(other == null ? 1 : Coerce.toInteger(other.getValue())); }
/** * Create a new integer property with the specified value and logical operator. * * @param value value to match * @param operator logical operator to use when comparing to other properties */ public IntProperty(Object value, Operator operator) { super(Coerce.toInteger(value), operator); }
/** * Create a new integer property with the specified value. * * @param value value to match */ public IntProperty(int value) { super(Coerce.toInteger(value)); }
/** * Create a new SlotSide property for matching the specified value with the specified operator. * * @param value the value to match * @param operator the operator to use when comparing with other properties */ public SlotSide(Object value, Operator operator) { super(Coerce.<Direction>toEnum(value, Direction.class, Direction.NONE), operator); }