org.hops.common
Class HopsAttribute

java.lang.Object
  extended by org.hops.common.HopsAttribute
All Implemented Interfaces:
java.io.Serializable

public class HopsAttribute
extends java.lang.Object
implements java.io.Serializable

Author:
alopez
See Also:
Serialized Form

Constructor Summary
HopsAttribute(java.lang.String key)
          Creates a new instance of HopsAttribute
 
Method Summary
 void addValue(java.lang.Object value)
          Adds a value for this attribute
 void addValues(java.util.Collection values)
          Adds a set of values for this attribute
 void addValues(java.lang.Object[] values)
          Adds a set of values for this attribute
static java.util.ArrayList Array2ArrayList(HopsAttribute[] arr)
           
static HopsAttribute[] ArrayList2Array(java.util.ArrayList arr)
           
 java.lang.String getKey()
          Gets the key of the attribute
 int getSizeValues()
          Gets the size of the set of values for this attribute
 java.util.ArrayList getValues()
          Gets the set of values for this attribute
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HopsAttribute

public HopsAttribute(java.lang.String key)
Creates a new instance of HopsAttribute

Parameters:
key - Key of the attribute to create
Method Detail

getKey

public java.lang.String getKey()
Gets the key of the attribute


getValues

public java.util.ArrayList getValues()
Gets the set of values for this attribute


addValue

public void addValue(java.lang.Object value)
Adds a value for this attribute

Parameters:
value - The value to add

addValues

public void addValues(java.lang.Object[] values)
Adds a set of values for this attribute

Parameters:
values - The set of values to add

addValues

public void addValues(java.util.Collection values)
Adds a set of values for this attribute

Parameters:
values - The set of values to add

getSizeValues

public int getSizeValues()
Gets the size of the set of values for this attribute

Returns:
The size of the set of values

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

ArrayList2Array

public static HopsAttribute[] ArrayList2Array(java.util.ArrayList arr)

Array2ArrayList

public static java.util.ArrayList Array2ArrayList(HopsAttribute[] arr)