/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Compares this property to another. * * @param object the object to compare to * @return true if equal */ public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof AbstractReadableInstantFieldProperty == false) { return false; } AbstractReadableInstantFieldProperty other = (AbstractReadableInstantFieldProperty) object; return get() == other.get() && getFieldType().equals(other.getFieldType()) && FieldUtils.equals(getChronology(), other.getChronology()); }
/** * Compares this property to another. * * @param object the object to compare to * @return true if equal */ public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof AbstractReadableInstantFieldProperty == false) { return false; } AbstractReadableInstantFieldProperty other = (AbstractReadableInstantFieldProperty) object; return get() == other.get() && getFieldType().equals(other.getFieldType()) && FieldUtils.equals(getChronology(), other.getChronology()); }
/** * Returns the interval that represents the range of the minimum * and maximum values of this field. * <p> * For example, <code>datetime.monthOfYear().toInterval()</code> * will return an interval over the whole month. * * @return the interval of this field * @since 1.2 */ public Interval toInterval() { DateTimeField field = getField(); long start = field.roundFloor(getMillis()); long end = field.add(start, 1); Interval interval = new Interval(start, end, getChronology()); return interval; }
/** * Returns the interval that represents the range of the minimum * and maximum values of this field. * <p> * For example, <code>datetime.monthOfYear().toInterval()</code> * will return an interval over the whole month. * * @return the interval of this field * @since 1.2 */ public Interval toInterval() { DateTimeField field = getField(); long start = field.roundFloor(getMillis()); long end = field.add(start, 1); Interval interval = new Interval(start, end, getChronology()); return interval; }
/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Compares this property to another. * * @param object the object to compare to * @return true if equal */ public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof AbstractReadableInstantFieldProperty == false) { return false; } AbstractReadableInstantFieldProperty other = (AbstractReadableInstantFieldProperty) object; return get() == other.get() && getFieldType().equals(other.getFieldType()) && FieldUtils.equals(getChronology(), other.getChronology()); }
/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Returns a hashcode compatible with the equals method. * * @return the hashcode */ public int hashCode() { return get() * 17 + getFieldType().hashCode() + getChronology().hashCode(); }
/** * Compares this property to another. * * @param object the object to compare to * @return true if equal */ public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof AbstractReadableInstantFieldProperty == false) { return false; } AbstractReadableInstantFieldProperty other = (AbstractReadableInstantFieldProperty) object; return get() == other.get() && getFieldType().equals(other.getFieldType()) && FieldUtils.equals(getChronology(), other.getChronology()); }
/** * Compares this property to another. * * @param object the object to compare to * @return true if equal */ public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof AbstractReadableInstantFieldProperty == false) { return false; } AbstractReadableInstantFieldProperty other = (AbstractReadableInstantFieldProperty) object; return get() == other.get() && getFieldType().equals(other.getFieldType()) && FieldUtils.equals(getChronology(), other.getChronology()); }
/** * Returns the interval that represents the range of the minimum * and maximum values of this field. * <p> * For example, <code>datetime.monthOfYear().toInterval()</code> * will return an interval over the whole month. * * @return the interval of this field * @since 1.2 */ public Interval toInterval() { DateTimeField field = getField(); long start = field.roundFloor(getMillis()); long end = field.add(start, 1); Interval interval = new Interval(start, end, getChronology()); return interval; }
/** * Returns the interval that represents the range of the minimum * and maximum values of this field. * <p> * For example, <code>datetime.monthOfYear().toInterval()</code> * will return an interval over the whole month. * * @return the interval of this field * @since 1.2 */ public Interval toInterval() { DateTimeField field = getField(); long start = field.roundFloor(getMillis()); long end = field.add(start, 1); Interval interval = new Interval(start, end, getChronology()); return interval; }