org.vizzini.util
Class GenericData

java.lang.Object
  extended by org.vizzini.util.GenericData
All Implemented Interfaces:
Cloneable, Comparable, IGenericData
Direct Known Subclasses:
Record

public class GenericData
extends Object
implements IGenericData, Cloneable, Comparable

Provides storage for properties determined at runtime.

Since:
v0.2
Version:
v0.2
Author:
Jeffrey M. Thompson

Constructor Summary
GenericData()
          Construct this object.
 
Method Summary
 void clear()
          Clear the property values and names.
 Object clone()
          Return a clone of this instance.
 int compareTo(Object another)
          Compare to the given object.
 void copy(IGenericData another)
          Make this object a copy of the given object.
 boolean equals(Object another)
          Return true if this equals another.
 Object get(String propertyName)
          Return the value of the specified property.
 Iterator getPropertyNames()
          Return an iterator over the property names.
 Class getType(String propertyName)
          Return the type of the named property.
 int hashCode()
          Return the hash code.
 void set(String propertyName, boolean value)
          Set the value of the specified property.
 void set(String propertyName, Class type, Object value)
          Set the value of the specified property.
 void set(String propertyName, double value)
          Set the value of the specified property.
 void set(String propertyName, float value)
          Set the value of the specified property.
 void set(String propertyName, int value)
          Set the value of the specified property.
 void set(String propertyName, long value)
          Set the value of the specified property.
 void set(String propertyName, Object value)
          Set the value of the specified property.
 String toString()
          Return a string representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericData

public GenericData()
Construct this object.

Since:
v0.2
Method Detail

clear

public void clear()
Clear the property values and names.

Specified by:
clear in interface IGenericData
Since:
v0.2

clone

public Object clone()
Return a clone of this instance.

Specified by:
clone in interface IGenericData
Overrides:
clone in class Object
Since:
v0.2

compareTo

public int compareTo(Object another)
Compare to the given object.

Specified by:
compareTo in interface Comparable
Specified by:
compareTo in interface IGenericData
Returns:
-1, 0, +1 if this is less than, equal to, or greater than
Since:
v0.2

copy

public void copy(IGenericData another)
Make this object a copy of the given object.

Specified by:
copy in interface IGenericData
Since:
v0.2

equals

public boolean equals(Object another)
Return true if this equals another.

Specified by:
equals in interface IGenericData
Overrides:
equals in class Object
Since:
v0.2

get

public Object get(String propertyName)
Return the value of the specified property.

Specified by:
get in interface IGenericData
Since:
v0.2

getPropertyNames

public Iterator getPropertyNames()
Return an iterator over the property names.

Specified by:
getPropertyNames in interface IGenericData
Since:
v0.2

getType

public Class getType(String propertyName)
Return the type of the named property.

Specified by:
getType in interface IGenericData
Since:
v0.2

hashCode

public int hashCode()
Return the hash code.

Specified by:
hashCode in interface IGenericData
Overrides:
hashCode in class Object
Since:
v0.2

set

public void set(String propertyName,
                Object value)
Set the value of the specified property.

Specified by:
set in interface IGenericData
Since:
v0.2

set

public void set(String propertyName,
                int value)
Set the value of the specified property.

Specified by:
set in interface IGenericData
Since:
v0.2

set

public void set(String propertyName,
                long value)
Set the value of the specified property.

Specified by:
set in interface IGenericData
Since:
v0.2

set

public void set(String propertyName,
                float value)
Set the value of the specified property.

Specified by:
set in interface IGenericData
Since:
v0.2

set

public void set(String propertyName,
                double value)
Set the value of the specified property.

Specified by:
set in interface IGenericData
Since:
v0.2

set

public void set(String propertyName,
                boolean value)
Set the value of the specified property.

Specified by:
set in interface IGenericData
Since:
v0.2

set

public void set(String propertyName,
                Class type,
                Object value)
Set the value of the specified property.

Specified by:
set in interface IGenericData
Since:
v0.2

toString

public String toString()
Return a string representation of this object.

Specified by:
toString in interface IGenericData
Overrides:
toString in class Object
Since:
v0.2


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02