/** * Create a new ArmorSlotType property which matches armour slots of the * specified type. * * @param value armour type to match * @param operator logical operator (either EQUAL or NOTEQUAL) to apply */ public ArmorSlotType(Object value, Operator operator) { super(Coerce.<WornEquipmentType>toPseudoEnum(value, WornEquipmentType.class, WornEquipmentType.class, EquipmentTypes.WORN), operator); }
/** * Create a new EquipmentSlotType property to match items of the specified * value. * * @param value EquipmentType to match * @param operator logical operator to apply when comparing with other * properties */ public EquipmentSlotType(Object value, Operator operator) { super(Coerce.<EquipmentType>toPseudoEnum(value, EquipmentType.class, EquipmentTypes.class, EquipmentTypes.WORN), operator); }
/** * Constructs a new {@link EquipmentProperty}. * * @param value EquipmentType to match * @param operator logical operator to apply when comparing with other * properties */ public EquipmentProperty(Object value, Operator operator) { super(Coerce.toPseudoEnum(value, EquipmentType.class, EquipmentTypes.class, EquipmentTypes.WORN), operator); }
@Override public int compareTo(@Nullable Property<?, ?> o) { HandPreference other = Coerce.toPseudoEnum(o == null ? null : o.getValue(), HandPreference.class, HandPreferences.class, HandPreferences.RIGHT); return this.getValue().getId().compareTo(o == null ? "" : other.getId()); } }
@Override public int compareTo(Property<?, ?> other) { if (other == null) { return 1; } EquipmentType otherValue = Coerce.<EquipmentType>toPseudoEnum(other.getValue(), EquipmentType.class, EquipmentTypes.class, EquipmentTypes.WORN); return this.getValue().getName().compareTo(otherValue.getName()); }
/** * Constructs a new {@link EquipmentProperty}. * * @param value EquipmentType to match * @param operator logical operator to apply when comparing with other * properties */ public EquipmentProperty(Object value, Operator operator) { super(Coerce.toPseudoEnum(value, EquipmentType.class, EquipmentTypes.class, EquipmentTypes.WORN), operator); }
/** * Create a new ArmorSlotType property which matches armour slots of the * specified type. * * @param value armour type to match * @param operator logical operator (either EQUAL or NOTEQUAL) to apply */ public ArmorSlotType(Object value, Operator operator) { super(Coerce.<EquipmentTypeWorn>toPseudoEnum(value, EquipmentTypeWorn.class, EquipmentTypeWorn.class, EquipmentTypes.WORN), operator); }
/** * Create a new EquipmentSlotType property to match items of the specified * value. * * @param value EquipmentType to match * @param operator logical operator to apply when comparing with other * properties */ public EquipmentSlotType(Object value, Operator operator) { super(Coerce.<EquipmentType>toPseudoEnum(value, EquipmentType.class, EquipmentTypes.class, EquipmentTypes.WORN), operator); }
@Override public int compareTo(@Nullable Property<?, ?> o) { HandPreference other = Coerce.toPseudoEnum(o == null ? null : o.getValue(), HandPreference.class, HandPreferences.class, HandPreferences.RIGHT); return this.getValue().getId().compareTo(o == null ? "" : other.getId()); } }
@Override public int compareTo(Property<?, ?> other) { if (other == null) { return 1; } EquipmentType otherValue = Coerce.<EquipmentType>toPseudoEnum(other.getValue(), EquipmentType.class, EquipmentTypes.class, EquipmentTypes.WORN); return this.getValue().getName().compareTo(otherValue.getName()); }