/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
/** * Compares this object with the specified object for equality based on the * value of each field. All ReadablePeriod instances are accepted, but only * those with a matching <code>PeriodType</code> can return true. * * @param period a readable period to check against * @return true if all the field values are equal, false if * not or the period is null or of an incorrect type */ public boolean equals(Object period) { if (this == period) { return true; } if (period instanceof ReadablePeriod == false) { return false; } ReadablePeriod other = (ReadablePeriod) period; return (other.getPeriodType() == getPeriodType() && other.getValue(0) == getValue()); }
/** * Compares this object with the specified object for equality based on the * value of each field. All ReadablePeriod instances are accepted, but only * those with a matching <code>PeriodType</code> can return true. * * @param period a readable period to check against * @return true if all the field values are equal, false if * not or the period is null or of an incorrect type */ public boolean equals(Object period) { if (this == period) { return true; } if (period instanceof ReadablePeriod == false) { return false; } ReadablePeriod other = (ReadablePeriod) period; return (other.getPeriodType() == getPeriodType() && other.getValue(0) == getValue()); }
/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
type = period.getPeriodType();
type = period.getPeriodType();
/** * Compares this object with the specified object for equality based on the * value of each field. All ReadablePeriod instances are accepted, but only * those with a matching <code>PeriodType</code> can return true. * * @param period a readable period to check against * @return true if all the field values are equal, false if * not or the period is null or of an incorrect type */ public boolean equals(Object period) { if (this == period) { return true; } if (period instanceof ReadablePeriod == false) { return false; } ReadablePeriod other = (ReadablePeriod) period; return (other.getPeriodType() == getPeriodType() && other.getValue(0) == getValue()); }
/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
/** * Selects a suitable period type for the given object. * * @param object the object to examine, must not be null * @return the period type from the readable duration * @throws NullPointerException if the object is null * @throws ClassCastException if the object is an invalid type */ public PeriodType getPeriodType(Object object) { ReadablePeriod period = (ReadablePeriod) object; return period.getPeriodType(); }
type = period.getPeriodType();
/** * Compares this object with the specified object for equality based on the * value of each field. All ReadablePeriod instances are accepted, but only * those with a matching <code>PeriodType</code> can return true. * * @param period a readable period to check against * @return true if all the field values are equal, false if * not or the period is null or of an incorrect type */ public boolean equals(Object period) { if (this == period) { return true; } if (period instanceof ReadablePeriod == false) { return false; } ReadablePeriod other = (ReadablePeriod) period; return (other.getPeriodType() == getPeriodType() && other.getValue(0) == getValue()); }
/** * Compares this object with the specified object for equality based on the * value of each field. All ReadablePeriod instances are accepted, but only * those with a matching <code>PeriodType</code> can return true. * * @param period a readable period to check against * @return true if all the field values are equal, false if * not or the period is null or of an incorrect type */ public boolean equals(Object period) { if (this == period) { return true; } if (period instanceof ReadablePeriod == false) { return false; } ReadablePeriod other = (ReadablePeriod) period; return (other.getPeriodType() == getPeriodType() && other.getValue(0) == getValue()); }
/** * Compares this object with the specified object for equality based on the * value of each field. All ReadablePeriod instances are accepted, but only * those with a matching <code>PeriodType</code> can return true. * * @param period a readable period to check against * @return true if all the field values are equal, false if * not or the period is null or of an incorrect type */ public boolean equals(Object period) { if (this == period) { return true; } if (period instanceof ReadablePeriod == false) { return false; } ReadablePeriod other = (ReadablePeriod) period; return (other.getPeriodType() == getPeriodType() && other.getValue(0) == getValue()); }