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