@Test public void testEquals() throws ParseException { String gt1 = "20080102121314Z"; GeneralizedTime generalizedTime1 = new GeneralizedTime( gt1 ); String gt2 = "20080102121314Z"; GeneralizedTime generalizedTime2 = new GeneralizedTime( gt2 ); String gt3 = "20080102121314,001Z"; GeneralizedTime generalizedTime3 = new GeneralizedTime( gt3 ); assertTrue( generalizedTime1.equals( generalizedTime2 ) ); assertFalse( generalizedTime1.equals( generalizedTime3 ) ); assertFalse( generalizedTime1.equals( null ) ); }
@Override public boolean equals( Object obj ) { if ( obj instanceof GeneralizedTime ) { GeneralizedTime other = ( GeneralizedTime ) obj; return calendar.equals( other.calendar ); } else { return false; } }
GeneralizedTime implements Comparable<GeneralizedTime> { @Override public boolean equals( Object obj ) { if ( obj instanceof GeneralizedTime ) { GeneralizedTime other = ( GeneralizedTime ) obj; return calendar.equals( other.calendar ); } else { return false; } } }
GeneralizedTime implements Comparable<GeneralizedTime> { @Override public boolean equals( Object obj ) { if ( obj instanceof GeneralizedTime ) { GeneralizedTime other = ( GeneralizedTime ) obj; return calendar.equals( other.calendar ); } else { return false; } } GeneralizedTime( Date date );  GeneralizedTime( Calendar calendar );  GeneralizedTime( long timeInMillis );  GeneralizedTime( String generalizedTime ); }
GeneralizedTime implements Comparable<GeneralizedTime> { @Override public boolean equals( Object obj ) { if ( obj instanceof GeneralizedTime ) { GeneralizedTime other = ( GeneralizedTime ) obj; return calendar.equals( other.calendar ); } else { return false; } } GeneralizedTime( Date date );  GeneralizedTime( Calendar calendar );  GeneralizedTime( long timeInMillis );  GeneralizedTime( String generalizedTime ); String toGeneralizedTime(); String toGeneralizedTimeWithoutFraction(); String toGeneralizedTime( Format format, FractionDelimiter fractionDelimiter, int fractionLength,
        TimeZoneFormat timeZoneFormat ); Calendar getCalendar(); @Override String toString(); @Override int hashCode(); @Override boolean equals( Object obj ); @Override int compareTo( GeneralizedTime other ); long getTime(); Date getDate(); int getYear(); int getMonth(); int getDay(); int getHour(); int getMinutes(); int getSeconds(); int getFraction(); static Date getDate( String zuluTime ); }
GeneralizedTime implements Comparable<GeneralizedTime> { @Override public boolean equals( Object obj ) { if ( obj instanceof GeneralizedTime ) { GeneralizedTime other = ( GeneralizedTime ) obj; return calendar.equals( other.calendar ); } else { return false; } } GeneralizedTime( Date date );  GeneralizedTime( Calendar calendar );  GeneralizedTime( long timeInMillis );  GeneralizedTime( String generalizedTime ); String toGeneralizedTime(); String toGeneralizedTimeWithoutFraction(); String toGeneralizedTime( Format format, FractionDelimiter fractionDelimiter, int fractionLength,
        TimeZoneFormat timeZoneFormat ); Calendar getCalendar(); @Override String toString(); @Override int hashCode(); @Override boolean equals( Object obj ); @Override int compareTo( GeneralizedTime other ); long getTime(); Date getDate(); int getYear(); int getMonth(); int getDay(); int getHour(); int getMinutes(); int getSeconds(); int getFraction(); static Date getDate( String zuluTime );  }