WebNMS TL1 API Release 4 Specification

com.adventnet.tl1.message
Class TL1Date

java.lang.Object
  |
  +--com.adventnet.tl1.message.TL1Param
        |
        +--com.adventnet.tl1.message.TL1Date
All Implemented Interfaces:
java.io.Serializable

public class TL1Date
extends TL1Param

This class represents the date in year-month-day format. It represents the date when the message was generated. The date is a part of the TL1Header in the Autonomous and Response messages. It is also used in the GeneralBlock of TL1InputMessage.

For example, the date 2002-06-12 is created as follows,

   TL1Date date =new TL1Date();
   date.setYear(2002);
   date.setMonth(6);
   date.setDay(12);
 

See Also:
TL1Header, TL1GeneralBlock, Serialized Form

Fields inherited from class com.adventnet.tl1.message.TL1Param
NAME_DEFINED, POSITION_DEFINED
 
Constructor Summary
TL1Date()
          Default constructor
TL1Date(byte paramtype, int yy, int mm, int dd)
          Constructor that initializes the year, month and day fields in the TL1Date object with the given values.
 
Method Summary
 boolean equals(TL1Date date)
          Compares the specified TL1Date object with this object for equality.
 int getDay()
          Gets the day field from this object.
 int getMonth()
          Gets the month field from this object.
 int getYear()
          Gets the year field from this object.
 boolean isValid()
          This method is used to find whether the TL1Date is valid or invalid.
 void setDay(int dd)
          Sets the day field in this object.
 void setMonth(int mm)
          Sets the month field in this object.
 void setYear(int yy)
          Sets the year field in this object.
 
Methods inherited from class com.adventnet.tl1.message.TL1Param
clone, equals, getParamName, getParamValue, getType, setParameter, setParamName, setParamValue, setType, toExpandedString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TL1Date

public TL1Date()
Default constructor

TL1Date

public TL1Date(byte paramtype,
               int yy,
               int mm,
               int dd)
Constructor that initializes the year, month and day fields in the TL1Date object with the given values.

Parameters:
paramtype - byte representing parameter type, can be either NAME_DEFINED or POSITION_DEFINED.
yy - year.
mm - month.
dd - date.
Method Detail

setYear

public void setYear(int yy)
Sets the year field in this object.

Parameters:
yy - integer representing year.

getYear

public int getYear()
Gets the year field from this object.

Returns:
year as integer.

setMonth

public void setMonth(int mm)
Sets the month field in this object.

Parameters:
mm - integer representing month.

getMonth

public int getMonth()
Gets the month field from this object.

Returns:
month as integer.

setDay

public void setDay(int dd)
Sets the day field in this object.

Parameters:
dd - integer representing date.

getDay

public int getDay()
Gets the day field from this object.

Returns:
date as integer.

equals

public boolean equals(TL1Date date)
Compares the specified TL1Date object with this object for equality.

Parameters:
date - TL1Date object to compare.

Returns:
true if this TL1Date object is the same as the date argument; false otherwise.

isValid

public boolean isValid()
This method is used to find whether the TL1Date is valid or invalid.
Returns:
True if it is valid else False.

WebNMS TL1 API Release 4 Specification