|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.sensorevent.model.generic.GenericGroup
public class GenericGroup
A GenericGroup contains attributes and other groups. Each GenericGroup has a name used to identify the group.
The interface associated with this class is IGenericGroup
.
Field Summary | |
---|---|
protected java.util.Map |
attributes
The collection of attributes indexed by the attribute name |
static java.lang.String |
COPYRIGHT
|
protected java.util.Map |
groups
The collection of groups indexed by the group name |
protected java.lang.String |
name
The name of the GenericGroup |
Constructor Summary | |
---|---|
protected |
GenericGroup()
Constructs a GenericGroup |
protected |
GenericGroup(java.lang.String name)
Constructs a GenericGroup with the specified name |
Method Summary | |
---|---|
void |
addAttribute(IGenericAttribute attribute)
Adds an attribute to this group's collection of attributes. |
void |
addAttributeArray(java.lang.String name,
java.lang.Object[] value,
int type)
|
void |
addBooleanArrayAttribute(java.lang.String name,
boolean[] value)
Adds an attribute to this group's collection of attributes. |
void |
addBooleanAttribute(java.lang.String name,
boolean value)
Adds an attribute to this group's collection of attributes. |
void |
addByteArrayAttribute(java.lang.String name,
byte[] b)
Adds an attribute to this group's collection of attributes. |
void |
addByteAttribute(java.lang.String name,
byte b)
Adds an attribute to this group's collection of attributes. |
void |
addDateArrayAttribute(java.lang.String name,
java.util.Date[] d)
Adds an attribute to this group's collection of attributes. |
void |
addDateArrayAttributeAsLong(java.lang.String name,
long[] l)
Adds an attribute to this group's collection of attributes. |
void |
addDateAttribute(java.lang.String name,
java.util.Date d)
Adds an attribute to this group's collection of attributes. |
void |
addDateAttributeAsLong(java.lang.String name,
long l)
Adds an attribute to this group's collection of attributes. |
void |
addDoubleArrayAttribute(java.lang.String name,
double[] d)
Adds an attribute to this group's collection of attributes. |
void |
addDoubleAttribute(java.lang.String name,
double d)
Adds an attribute to this group's collection of attributes. |
void |
addFloatArrayAttribute(java.lang.String name,
float[] f)
Adds an attribute to this group's collection of attributes. |
void |
addFloatAttribute(java.lang.String name,
float f)
Adds an attribute to this group's collection of attributes. |
void |
addGroup(IGenericGroup group)
Adds a subgroup to this group |
void |
addHexAttribute(java.lang.String name,
byte[] b)
Adds an attribute to this group's collection of attributes. |
void |
addHexAttribute(java.lang.String name,
java.lang.String s)
Adds an attribute to this group's collection of attributes. |
void |
addIntArrayAttribute(java.lang.String name,
int[] i)
Adds an attribute to this group's collection of attributes. |
void |
addIntAttribute(java.lang.String name,
int i)
Adds an attribute to this group's collection of attributes. |
void |
addLongArrayAttribute(java.lang.String name,
long[] l)
Adds an attribute to this group's collection of attributes. |
void |
addLongAttribute(java.lang.String name,
long l)
Adds an attribute to this group's collection of attributes. |
void |
addShortArrayAttribute(java.lang.String name,
short[] s)
Adds an attribute to this group's collection of attributes. |
void |
addShortAttribute(java.lang.String name,
short s)
Adds an attribute to this group's collection of attributes. |
void |
addStringArrayAttribute(java.lang.String name,
java.lang.String[] s)
Adds an attribute to this group's collection of attributes. |
void |
addStringAttribute(java.lang.String name,
java.lang.String s)
Adds an attribute to this group's collection of attributes. |
void |
createGroupPath(java.util.List path)
Constructs the nested subgroups using the names specified in path. |
IGenericAttribute |
getAttribute(java.lang.String name)
Returns the attribute from this group with the specified name |
java.util.Collection |
getAttributes()
Returns this group's attributes as a collection of IGenericAttribute |
java.util.List |
getAttributesAsList()
Returns this group's attributes as a list of IGenericAttribute |
boolean[] |
getBooleanAttributeArrayValue(java.lang.String name)
Returns the boolean array attribute value from this group with the specified name |
boolean |
getBooleanAttributeValue(java.lang.String name)
Returns the boolean attribute value from this group with the specified name |
byte[] |
getByteAttributeArrayValue(java.lang.String name)
Returns the byte array attribute value from this group with the specified name |
byte |
getByteAttributeValue(java.lang.String name)
Returns the byte attribute value from this group with the specified name |
java.util.Date[] |
getDateAttributeArrayValue(java.lang.String name)
Returns the java.util.Date array attribute value from this group with the specified name |
long[] |
getDateAttributeArrayValueAsLong(java.lang.String name)
Returns the java.util.Date values converted to long millisecond array attribute values from this group with the specified name |
java.util.Date |
getDateAttributeValue(java.lang.String name)
Returns the java.util.Date attribute value from this group with the specified name |
long |
getDateAttributeValueAsLong(java.lang.String name)
Returns the java.util.Date as a long millisecond attribute value from this group with the specified name |
double[] |
getDoubleAttributeArrayValue(java.lang.String name)
Returns the double array attribute value from this group with the specified name |
double |
getDoubleAttributeValue(java.lang.String name)
Returns the double attribute value from this group with the specified name |
float[] |
getFloatAttributeArrayValue(java.lang.String name)
Returns the float array attribute value from this group with the specified name |
float |
getFloatAttributeValue(java.lang.String name)
Returns the float attribute value from this group with the specified name |
IGenericGroup |
getGroup(java.lang.String name)
Returns the subgroup with the specified name |
java.util.Collection |
getGroups()
Returns this group's attributes as a collection of IGenericGroup |
java.util.List |
getGroupsAsList()
Returns this group's attributes as a collection of IGenericGroup |
byte[] |
getHexAttributeValue(java.lang.String name)
Returns the HexBinary byte array attribute value from this group with the specified name |
java.lang.String |
getHexAttributeValueAsString(java.lang.String name)
Returns the HexBinary String attribute value from this group with the specified name |
static IGenericGroup |
getInstance()
Factory method to create a new IGenericGroup instance |
static IGenericGroup |
getInstance(java.lang.String name)
Factory method to create a new IGenericGroup instance |
int[] |
getIntAttributeArrayValue(java.lang.String name)
Returns the int array attribute value from this group with the specified name |
int |
getIntAttributeValue(java.lang.String name)
Returns the int attribute value from this group with the specified name |
long[] |
getLongAttributeArrayValue(java.lang.String name)
Returns the long array attribute value from this group with the specified name |
long |
getLongAttributeValue(java.lang.String name)
Returns the long attribute value from this group with the specified name |
java.lang.String |
getName()
Returns the group's name |
short[] |
getShortAttributeArrayValue(java.lang.String name)
Returns the short array attribute value from this group with the specified name |
short |
getShortAttributeValue(java.lang.String name)
Returns the short attribute value from this group with the specified name |
java.lang.String[] |
getStringAttributeArrayValue(java.lang.String name)
Returns the String array attribute value from this group with the specified name |
java.lang.String |
getStringAttributeValue(java.lang.String name)
Returns the String attribute value from this group with the specified name |
void |
removeAttributes()
Removes all attributes from this group |
void |
removeGroups()
Removes all subgroups from this group |
void |
setAttributes(java.util.Collection attributes)
Sets this group's collection of attributes |
void |
setGroups(java.util.Collection groups)
Sets this group's collection of subgroups |
void |
setName(java.lang.String name)
Sets the name of this group |
java.lang.String |
toString()
Returns a string representation of this attribute (for debug purposes) |
IGenericGroup |
traverseGroupPath(java.util.List path)
Returns the last nested subgroup specified in path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
protected volatile java.lang.String name
protected volatile java.util.Map attributes
protected volatile java.util.Map groups
Constructor Detail |
---|
protected GenericGroup()
protected GenericGroup(java.lang.String name) throws SensorEventException
name
- the name of the group
SensorEventException
Method Detail |
---|
public static IGenericGroup getInstance() throws SensorEventException
Calling this method is not allowed. This implementation always throws an exception to prevent resolving to a superclass method.
SensorEventException
public static IGenericGroup getInstance(java.lang.String name) throws SensorEventException
name
- the name of the group
SensorEventException
public java.lang.String getName()
getName
in interface IGenericGroup
public void setName(java.lang.String name) throws SensorEventException
setName
in interface IGenericGroup
SensorEventException
public void addAttribute(IGenericAttribute attribute) throws SensorEventException
addAttribute
in interface IGenericGroup
SensorEventException
public void addBooleanAttribute(java.lang.String name, boolean value) throws SensorEventException
addBooleanAttribute
in interface IGenericGroup
SensorEventException
public void addByteAttribute(java.lang.String name, byte b) throws SensorEventException
addByteAttribute
in interface IGenericGroup
SensorEventException
public void addDateAttribute(java.lang.String name, java.util.Date d) throws SensorEventException
addDateAttribute
in interface IGenericGroup
SensorEventException
public void addDateAttributeAsLong(java.lang.String name, long l) throws SensorEventException
addDateAttributeAsLong
in interface IGenericGroup
SensorEventException
public void addDoubleAttribute(java.lang.String name, double d) throws SensorEventException
addDoubleAttribute
in interface IGenericGroup
SensorEventException
public void addFloatAttribute(java.lang.String name, float f) throws SensorEventException
addFloatAttribute
in interface IGenericGroup
SensorEventException
public void addHexAttribute(java.lang.String name, byte[] b) throws SensorEventException
HexBinary
string.
addHexAttribute
in interface IGenericGroup
SensorEventException
public void addHexAttribute(java.lang.String name, java.lang.String s) throws SensorEventException
addHexAttribute
in interface IGenericGroup
SensorEventException
HexBinary
public void addIntAttribute(java.lang.String name, int i) throws SensorEventException
addIntAttribute
in interface IGenericGroup
SensorEventException
public void addLongAttribute(java.lang.String name, long l) throws SensorEventException
addLongAttribute
in interface IGenericGroup
SensorEventException
public void addShortAttribute(java.lang.String name, short s) throws SensorEventException
addShortAttribute
in interface IGenericGroup
SensorEventException
public void addStringAttribute(java.lang.String name, java.lang.String s) throws SensorEventException
addStringAttribute
in interface IGenericGroup
SensorEventException
public void addBooleanArrayAttribute(java.lang.String name, boolean[] value) throws SensorEventException
addBooleanArrayAttribute
in interface IGenericGroup
SensorEventException
public void addByteArrayAttribute(java.lang.String name, byte[] b) throws SensorEventException
addByteArrayAttribute
in interface IGenericGroup
SensorEventException
public void addDateArrayAttribute(java.lang.String name, java.util.Date[] d) throws SensorEventException
addDateArrayAttribute
in interface IGenericGroup
SensorEventException
public void addDateArrayAttributeAsLong(java.lang.String name, long[] l) throws SensorEventException
addDateArrayAttributeAsLong
in interface IGenericGroup
SensorEventException
public void addDoubleArrayAttribute(java.lang.String name, double[] d) throws SensorEventException
addDoubleArrayAttribute
in interface IGenericGroup
SensorEventException
public void addFloatArrayAttribute(java.lang.String name, float[] f) throws SensorEventException
addFloatArrayAttribute
in interface IGenericGroup
SensorEventException
public void addIntArrayAttribute(java.lang.String name, int[] i) throws SensorEventException
addIntArrayAttribute
in interface IGenericGroup
SensorEventException
public void addLongArrayAttribute(java.lang.String name, long[] l) throws SensorEventException
addLongArrayAttribute
in interface IGenericGroup
SensorEventException
public void addShortArrayAttribute(java.lang.String name, short[] s) throws SensorEventException
addShortArrayAttribute
in interface IGenericGroup
SensorEventException
public void addStringArrayAttribute(java.lang.String name, java.lang.String[] s) throws SensorEventException
addStringArrayAttribute
in interface IGenericGroup
SensorEventException
public IGenericAttribute getAttribute(java.lang.String name) throws SensorEventException
getAttribute
in interface IGenericGroup
SensorEventException
public boolean getBooleanAttributeValue(java.lang.String name) throws SensorEventException
getBooleanAttributeValue
in interface IGenericGroup
SensorEventException
public byte getByteAttributeValue(java.lang.String name) throws SensorEventException
getByteAttributeValue
in interface IGenericGroup
SensorEventException
public java.util.Date getDateAttributeValue(java.lang.String name) throws SensorEventException
getDateAttributeValue
in interface IGenericGroup
SensorEventException
public long getDateAttributeValueAsLong(java.lang.String name) throws SensorEventException
getDateAttributeValueAsLong
in interface IGenericGroup
SensorEventException
public double getDoubleAttributeValue(java.lang.String name) throws SensorEventException
getDoubleAttributeValue
in interface IGenericGroup
SensorEventException
public float getFloatAttributeValue(java.lang.String name) throws SensorEventException
getFloatAttributeValue
in interface IGenericGroup
SensorEventException
public byte[] getHexAttributeValue(java.lang.String name) throws SensorEventException
getHexAttributeValue
in interface IGenericGroup
SensorEventException
HexBinary
public java.lang.String getHexAttributeValueAsString(java.lang.String name) throws SensorEventException
getHexAttributeValueAsString
in interface IGenericGroup
SensorEventException
HexBinary
public int getIntAttributeValue(java.lang.String name) throws SensorEventException
getIntAttributeValue
in interface IGenericGroup
SensorEventException
public long getLongAttributeValue(java.lang.String name) throws SensorEventException
getLongAttributeValue
in interface IGenericGroup
SensorEventException
public short getShortAttributeValue(java.lang.String name) throws SensorEventException
getShortAttributeValue
in interface IGenericGroup
SensorEventException
public java.lang.String getStringAttributeValue(java.lang.String name) throws SensorEventException
getStringAttributeValue
in interface IGenericGroup
SensorEventException
public boolean[] getBooleanAttributeArrayValue(java.lang.String name) throws SensorEventException
getBooleanAttributeArrayValue
in interface IGenericGroup
SensorEventException
public byte[] getByteAttributeArrayValue(java.lang.String name) throws SensorEventException
getByteAttributeArrayValue
in interface IGenericGroup
SensorEventException
public java.util.Date[] getDateAttributeArrayValue(java.lang.String name) throws SensorEventException
getDateAttributeArrayValue
in interface IGenericGroup
SensorEventException
public long[] getDateAttributeArrayValueAsLong(java.lang.String name) throws SensorEventException
getDateAttributeArrayValueAsLong
in interface IGenericGroup
SensorEventException
public double[] getDoubleAttributeArrayValue(java.lang.String name) throws SensorEventException
getDoubleAttributeArrayValue
in interface IGenericGroup
SensorEventException
public float[] getFloatAttributeArrayValue(java.lang.String name) throws SensorEventException
getFloatAttributeArrayValue
in interface IGenericGroup
SensorEventException
public int[] getIntAttributeArrayValue(java.lang.String name) throws SensorEventException
getIntAttributeArrayValue
in interface IGenericGroup
SensorEventException
public long[] getLongAttributeArrayValue(java.lang.String name) throws SensorEventException
getLongAttributeArrayValue
in interface IGenericGroup
SensorEventException
public short[] getShortAttributeArrayValue(java.lang.String name) throws SensorEventException
getShortAttributeArrayValue
in interface IGenericGroup
SensorEventException
public java.lang.String[] getStringAttributeArrayValue(java.lang.String name) throws SensorEventException
getStringAttributeArrayValue
in interface IGenericGroup
SensorEventException
public java.util.Collection getAttributes()
IGenericAttribute
getAttributes
in interface IGenericGroup
public java.util.List getAttributesAsList()
IGenericAttribute
getAttributesAsList
in interface IGenericGroup
public void setAttributes(java.util.Collection attributes) throws SensorEventException
setAttributes
in interface IGenericGroup
SensorEventException
public void removeAttributes()
removeAttributes
in interface IGenericGroup
public void addGroup(IGenericGroup group) throws SensorEventException
addGroup
in interface IGenericGroup
SensorEventException
public IGenericGroup getGroup(java.lang.String name) throws SensorEventException
getGroup
in interface IGenericGroup
SensorEventException
public java.util.Collection getGroups()
IGenericGroup
getGroups
in interface IGenericGroup
public java.util.List getGroupsAsList()
IGenericGroup
getGroupsAsList
in interface IGenericGroup
public void setGroups(java.util.Collection groups) throws SensorEventException
setGroups
in interface IGenericGroup
SensorEventException
public void removeGroups()
removeGroups
in interface IGenericGroup
public void createGroupPath(java.util.List path) throws SensorEventException
createGroupPath
in interface IGenericGroup
SensorEventException
public IGenericGroup traverseGroupPath(java.util.List path) throws SensorEventException
traverseGroupPath
in interface IGenericGroup
SensorEventException
public void addAttributeArray(java.lang.String name, java.lang.Object[] value, int type) throws SensorEventException
addAttributeArray
in interface IGenericGroup
SensorEventException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |