/** * Retrieves the minimum value of a property * * @return the minimum value of the property */ public Optional<BigDecimal> getMax() { if (property instanceof BaseIntegerProperty) { BaseIntegerProperty integerProperty = (BaseIntegerProperty) property; return Optional.ofNullable(integerProperty.getMaximum() != null ? integerProperty.getMaximum() : null); } else if (property instanceof AbstractNumericProperty) { AbstractNumericProperty numericProperty = (AbstractNumericProperty) property; return Optional.ofNullable(numericProperty.getMaximum()); } return Optional.empty(); }
/** * Retrieves the minimum value of a property * * @return the minimum value of the property */ public Optional<BigDecimal> getMin() { if (property instanceof BaseIntegerProperty) { BaseIntegerProperty integerProperty = (BaseIntegerProperty) property; return Optional.ofNullable(integerProperty.getMinimum() != null ? integerProperty.getMinimum() : null); } else if (property instanceof AbstractNumericProperty) { AbstractNumericProperty numericProperty = (AbstractNumericProperty) property; return Optional.ofNullable(numericProperty.getMinimum()); } return Optional.empty(); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((defaultValue == null) ? 0 : defaultValue.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } if (!(obj instanceof AbstractBaseIntegerProperty)) { return false; } @SuppressWarnings("unchecked") AbstractBaseIntegerProperty<T> other = (AbstractBaseIntegerProperty<T>) obj; if (defaultValue == null) { if (other.defaultValue != null) { return false; } } else if (!defaultValue.equals(other.defaultValue)) { return false; } return true; } }
@Override protected BaseIntegerProperty create() { return new BaseIntegerProperty(); }
@Override protected boolean isType(String type, String format) { return BaseIntegerProperty.isType(type, format); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((defaultValue == null) ? 0 : defaultValue.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } if (!(obj instanceof LongProperty)) { return false; } LongProperty other = (LongProperty) obj; if (_default == null) { if (other._default != null) { return false; } } else if (!_default.equals(other._default)) { return false; } return true; } }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((_default == null) ? 0 : _default.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } if (!(obj instanceof IntegerProperty)) { return false; } IntegerProperty other = (IntegerProperty) obj; if (_default == null) { if (other._default != null) { return false; } } else if (!_default.equals(other._default)) { return false; } return true; } }
/** * Retrieves the minimum value of a property * * @return the minimum value of the property */ public Optional<BigDecimal> getMax() { if (property instanceof BaseIntegerProperty) { BaseIntegerProperty integerProperty = (BaseIntegerProperty) property; return Optional.ofNullable(integerProperty.getMaximum() != null ? integerProperty.getMaximum() : null); } else if (property instanceof AbstractNumericProperty) { AbstractNumericProperty numericProperty = (AbstractNumericProperty) property; return Optional.ofNullable(numericProperty.getMaximum()); } return Optional.empty(); }
/** * Retrieves the minimum value of a property * * @return the minimum value of the property */ public Optional<BigDecimal> getMin() { if (property instanceof BaseIntegerProperty) { BaseIntegerProperty integerProperty = (BaseIntegerProperty) property; return Optional.ofNullable(integerProperty.getMinimum() != null ? integerProperty.getMinimum() : null); } else if (property instanceof AbstractNumericProperty) { AbstractNumericProperty numericProperty = (AbstractNumericProperty) property; return Optional.ofNullable(numericProperty.getMinimum()); } return Optional.empty(); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((_default == null) ? 0 : _default.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } if (!(obj instanceof AbstractBaseIntegerProperty)) { return false; } @SuppressWarnings("unchecked") AbstractBaseIntegerProperty<T> other = (AbstractBaseIntegerProperty<T>) obj; if (defaultValue == null) { if (other.defaultValue != null) { return false; } } else if (!defaultValue.equals(other.defaultValue)) { return false; } return true; } }