gov.sandia.cognition.text.document
Class DefaultDateField

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.util.AbstractNamed
          extended by gov.sandia.cognition.text.document.AbstractField
              extended by gov.sandia.cognition.text.document.DefaultDateField
All Implemented Interfaces:
Field, Textual, CloneableSerializable, Named, Serializable, Cloneable

public class DefaultDateField
extends AbstractField

A field for storing a date.

Since:
3.0
Author:
Justin Basilico
See Also:
Serialized Form

Field Summary
protected  Date date
          The date stored in the field.
 
Fields inherited from class gov.sandia.cognition.util.AbstractNamed
name
 
Constructor Summary
DefaultDateField()
          Creates a new, empty DefaultDateField.
DefaultDateField(String name, Date date)
          Creates a new DefaultDateField.
 
Method Summary
 Date getDate()
          Gets the date stored in the field.
 String getText()
          Gets the full text of the field.
 void setDate(Date date)
          Sets the date stored in the field.
 
Methods inherited from class gov.sandia.cognition.text.document.AbstractField
readText, toString
 
Methods inherited from class gov.sandia.cognition.util.AbstractNamed
clone, getName, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.text.document.Field
getName
 

Field Detail

date

protected Date date
The date stored in the field.

Constructor Detail

DefaultDateField

public DefaultDateField()
Creates a new, empty DefaultDateField.


DefaultDateField

public DefaultDateField(String name,
                        Date date)
Creates a new DefaultDateField.

Parameters:
name - The name of the field.
date - The date to store in the field.
Method Detail

getText

public String getText()
Description copied from interface: Field
Gets the full text of the field.

Returns:
The full text of the field.

getDate

public Date getDate()
Gets the date stored in the field.

Returns:
The date stored in the field.

setDate

public void setDate(Date date)
Sets the date stored in the field.

Parameters:
date - The date stored in the field.