org.norther.tammi.core.rt.util
Class EnumIdentity

java.lang.Object
  extended by javax.management.Attribute
      extended by org.norther.tammi.core.rt.util.EnumAttribute
          extended by org.norther.tammi.core.rt.util.EnumIdentity
All Implemented Interfaces:
Serializable, Cloneable, Comparable
Direct Known Subclasses:
EnumVariable

public class EnumIdentity
extends EnumAttribute

Extends the enumerated attribute by supporting variable identities as attribute values.

Author:
Ilkka Priha
See Also:
Serialized Form

Constructor Summary
EnumIdentity(String[] names, Variable value)
          Constructs a new enumerated identity with multiple names.
EnumIdentity(String[] names, Variable value, Object prop)
          Constructs a new enumerated identity with multiple names and a property.
EnumIdentity(String name, Variable value)
          Constructs a new enumerated identity with a name.
EnumIdentity(String name, Variable value, Object prop)
          Constructs a new enumerated identity with a name and a property.
EnumIdentity(Variable value)
          Constructs a new enumerated identity.
EnumIdentity(Variable value, Object prop)
          Constructs a new enumerated identity with a property.
 
Method Summary
 String getBaseName()
          Gets the base name of this attribute for localization, if any.
 Identity getIdentity()
          Gets the enumerated identity.
 Object getProperty()
          Gets the optional attribute property.
 boolean matches(Object other)
          Matches this enumerated attribute against an enumerated object for equality.
 void setProperty(Object value)
          Sets the optional attribute property.
 
Methods inherited from class org.norther.tammi.core.rt.util.EnumAttribute
clone, clone, clone, clone, compareTo, equals, getName, getValue, hashCode, length, toString, toStrings
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnumIdentity

public EnumIdentity(Variable value)
Constructs a new enumerated identity.

Parameters:
value - the attribute value.

EnumIdentity

public EnumIdentity(Variable value,
                    Object prop)
Constructs a new enumerated identity with a property.

Parameters:
value - the attribute value.
prop - an optional property.

EnumIdentity

public EnumIdentity(String name,
                    Variable value)
Constructs a new enumerated identity with a name.

Parameters:
name - the attribute name.
value - the attribute value.

EnumIdentity

public EnumIdentity(String name,
                    Variable value,
                    Object prop)
Constructs a new enumerated identity with a name and a property.

Parameters:
name - the attribute name.
value - the attribute value.
prop - an optional property.

EnumIdentity

public EnumIdentity(String[] names,
                    Variable value)
Constructs a new enumerated identity with multiple names.

Parameters:
names - the attribute names.
value - the attribute value.

EnumIdentity

public EnumIdentity(String[] names,
                    Variable value,
                    Object prop)
Constructs a new enumerated identity with multiple names and a property.

Parameters:
names - the attribute names.
value - the attribute value.
prop - an optional property.
Method Detail

matches

public boolean matches(Object other)
Description copied from class: EnumAttribute
Matches this enumerated attribute against an enumerated object for equality.

Overrides:
matches in class EnumAttribute
Parameters:
other - the enumerated object.
Returns:
true is equal, false otherwise.

getBaseName

public String getBaseName()
Description copied from class: EnumAttribute
Gets the base name of this attribute for localization, if any.

Overrides:
getBaseName in class EnumAttribute
Returns:
the base name or null.

getIdentity

public Identity getIdentity()
Gets the enumerated identity.

Returns:
the identity.

getProperty

public Object getProperty()
Gets the optional attribute property.

Returns:
the property value or null.

setProperty

public void setProperty(Object value)
Sets the optional attribute property.

Parameters:
value - the property value.


Copyright © 2004 The Norther Organization. All rights reserved.