Example #1
0
  /* (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));
  }
Example #2
0
 @Override
 public int compareTo(Property<?, ?> o) {
   return this.getValue().getId().compareTo(o == null ? "" : Coerce.toString(o.getValue()));
 }
Example #3
0
 @Override
 public int compareTo(ItemProperty<?, ?> other) {
   return this.getValue().compareTo(other == null ? 1 : Coerce.toInteger(other.getValue()));
 }
Example #4
0
 /**
  * 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);
 }
Example #5
0
 /**
  * Create a new integer property with the specified value.
  *
  * @param value value to match
  */
 public IntProperty(int value) {
   super(Coerce.toInteger(value));
 }
Example #6
0
 /**
  * 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);
 }