at.knowcenter.wag.egov.egiz.pdf
Class EGIZDate

java.lang.Object
  extended by at.knowcenter.wag.egov.egiz.pdf.EGIZDate

public class EGIZDate
extends Object

Represents a signature date and the signing time as can be found in the SIG_DATE field.

This is used to compare date values of signatures.

Author:
wprinz

Field Summary
protected  int day
          The day.
protected  int hour
          The hour.
protected  int minute
          The minute.
protected  int month
          The month.
protected  int second
          The second.
protected  int year
          The year.
 
Constructor Summary
EGIZDate(int year, int month, int day, int hour, int minute, int second)
          Constructor that fills the date with values.
 
Method Summary
 int compareTo(EGIZDate other)
          Compares this EGIZDate to another EXIZDate.
 boolean equals(Object obj)
           
 int hashCode()
           
static EGIZDate parseFromString(String date_value)
          Parses the date information from a given date value.
protected  long toCompareableLong()
          Converts the date to a long integer.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

year

protected int year
The year.


month

protected int month
The month.


day

protected int day
The day.


hour

protected int hour
The hour.


minute

protected int minute
The minute.


second

protected int second
The second.

Constructor Detail

EGIZDate

public EGIZDate(int year,
                int month,
                int day,
                int hour,
                int minute,
                int second)
Constructor that fills the date with values.

Parameters:
year - The year.
month - The month.
day - The day.
hour - The hour.
minute - The minute.
second - The second.
Method Detail

parseFromString

public static EGIZDate parseFromString(String date_value)
Parses the date information from a given date value.

Usually the date value is one extracted from the value of the SIG_DATE field.

Parameters:
date_value - The date value String.
Returns:
Returns the parsed EGIZDate. An IllegalArgumentException is thrown if the date String has an illegal format.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

toCompareableLong

protected long toCompareableLong()
Converts the date to a long integer.

An earlier date is lower than a later date.

E.g. a date in 1999 will get a smaller number than a date in 2006.

Returns:
Returns the compareable long.

compareTo

public int compareTo(EGIZDate other)
Compares this EGIZDate to another EXIZDate.

Parameters:
other - The other EGIZDate.
Returns:
Returns negative if this date is earlier (lower) than the other date. Returns 0 if both dates are equal. Returns positive if this date is later (higher) than the other date.


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.