things.data
Class Entry

java.lang.Object
  extended by things.data.Nubblet
      extended by things.data.Entry
All Implemented Interfaces:
java.io.Serializable, Data

public class Entry
extends Nubblet

An entry is an a data with attributes but no identity. This is used for logging or data exchange. They are timestamped at creation.

This component has been quite a showcase of where Java Generics fail. Ultimately, this may be what drives me back to C++ or somewhere else.

Version:
1.0

Version History

EPG - Rewrite from another project - 22 MAY 04
 
Author:
Erich P. Gatejen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface things.data.Data
Data.Priority, Data.Type
 
Field Summary
 AttributeReader attributes
          Attributes, if needed.
 
Fields inherited from class things.data.Nubblet
numeric, priority, thing
 
Constructor Summary
Entry()
          Default constructor.
Entry(Data.Priority p, int n, java.lang.String text)
          Constructor.
Entry(Data.Priority p, int n, java.lang.String text, AttributeReader a)
          Constructor.
Entry(int n, java.lang.String text)
          Constructor.
Entry(int n, java.lang.String text, AttributeReader a)
          Constructor.
Entry(java.lang.String text)
          Constructor.
Entry(java.lang.String text, AttributeReader a)
          Constructor.
Entry(java.lang.String text, Data.Type type, Data.Priority p, int n)
          Constructor.
Entry(java.lang.String text, Data.Type type, Data.Priority p, int n, AttributeReader a)
          Constructor.
 
Method Summary
 AttributeReader getAttributes()
          Get the attributes.
 java.lang.String toString()
          Get a textual representation of this entry with attributes.
 java.lang.String toText()
          Get a textual representation of this entry without attributes.
 
Methods inherited from class things.data.Nubblet
birthMyChild, birthMyChild, getCreatorID, getID, getNumeric, getNumericString, getPriority, getStamp, getThing, getType, toTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attributes

public AttributeReader attributes
Attributes, if needed.

Constructor Detail

Entry

public Entry()
      throws java.lang.Throwable
Default constructor. Default priority of ROUTINE. Null object. Generic type. Timestamped.

Throws:
java.lang.Throwable

Entry

public Entry(Data.Priority p,
             int n,
             java.lang.String text)
Constructor. Sets everything but the text, priority, and the numeric.

Parameters:
p - the priority
n - the numeric
text - the text information for the entry
Throws:
ThingsException

Entry

public Entry(Data.Priority p,
             int n,
             java.lang.String text,
             AttributeReader a)
      throws ThingsException
Constructor. Sets everything but the text, priority, and the numeric.

Parameters:
p - the priority
n - the numeric
text - the text information for the entry
a - attributes. Cannot be null.
Throws:
ThingsException
See Also:
AttributeReader

Entry

public Entry(int n,
             java.lang.String text)
Constructor. Sets everything but the text and the numeric.

Parameters:
n - the numeric
text - the text information for the entry
Throws:
ThingsException

Entry

public Entry(int n,
             java.lang.String text,
             AttributeReader a)
      throws ThingsException
Constructor. Sets everything but the text and the numeric.

Parameters:
n - the numeric
text - the text information for the entry
a - attributes. Cannot be null.
Throws:
ThingsException
See Also:
AttributeReader

Entry

public Entry(java.lang.String text)
      throws ThingsException
Constructor. Sets everything but the text.

Parameters:
text - the text information for the entry
Throws:
ThingsException

Entry

public Entry(java.lang.String text,
             AttributeReader a)
      throws ThingsException
Constructor. Sets everything but the text.

Parameters:
text - the text information for the entry
a - attributes. Cannot be null.
Throws:
ThingsException
See Also:
AttributeReader

Entry

public Entry(java.lang.String text,
             Data.Type type,
             Data.Priority p,
             int n)
      throws ThingsException
Constructor. Explicit. This can morph the entry into another type.

Parameters:
text - the text information for the entry
type - the type.
p - priority
n - numeric
Throws:
ThingsException

Entry

public Entry(java.lang.String text,
             Data.Type type,
             Data.Priority p,
             int n,
             AttributeReader a)
      throws ThingsException
Constructor. Explicit. This can morph the entry into another type.

Parameters:
text - the text information for the entry
type - the type.
p - priority
n - numeric
a - attributes. Cannot be null.
Throws:
ThingsException
See Also:
AttributeReader
Method Detail

getAttributes

public AttributeReader getAttributes()
Get the attributes.

Specified by:
getAttributes in interface Data
Overrides:
getAttributes in class Nubblet
Returns:
the attributes associated with the Data, if any.

toString

public java.lang.String toString()
Get a textual representation of this entry with attributes.

Specified by:
toString in interface Data
Overrides:
toString in class Nubblet
Returns:
the text.
See Also:
WhoAmI

toText

public java.lang.String toText()
Get a textual representation of this entry without attributes.

Returns:
the text.


Things.