|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.entity.AbstractBasicEntity
org.torweg.pulse.service.request.Parameter
@Entity public class Parameter
is an entity representing a Parameter which may have a set of values.
A Parameter consists of the following attributes:
id: constant unique identifier (primary key)name: the name of the Parametervalues: a set of Strings as the values of the
Parameter
| Constructor Summary | |
|---|---|
protected |
Parameter()
Deprecated. |
|
Parameter(java.lang.String newName)
The Constructor that sets the name of the Parameter. |
|
Parameter(java.lang.String newName,
java.util.List<java.lang.String> newValues)
The Constructor that sets name and values of this
Parameter. |
|
Parameter(java.lang.String newName,
java.lang.String newValue)
The Constructor that sets name and value of this
Parameter. |
| Method Summary | |
|---|---|
void |
addAllValues(java.util.Collection<? extends java.lang.String> vals)
Adds a Collection of values to the Parameter's
List of values. |
void |
addValue(java.lang.String val)
Adds a value to the Parameter's List of values. |
boolean |
containsAllValues(java.util.Collection<? extends java.lang.String> vals)
Determines if all elements of a Collection of values are part of
the Parameter's List of values. |
boolean |
containsValue(java.lang.String val)
Determines if a value is part of the Parameter's List of
values. |
Parameter |
createCopy()
returns a copy of the Parameter. |
org.jdom.Element |
deserializeToJDOM()
Serializes the state of the Parameter as a JDOM Element. |
boolean |
equals(java.lang.Object object)
Checks if the Parameter is equal to the parameter object. |
java.lang.String |
getFirstValue()
Returns the first value of the Parameter's List of
values. |
java.lang.String |
getName()
Returns the name of the Parameter. |
java.util.List<java.lang.String> |
getValues()
Returns the List of values of the Parameter. |
int |
hashCode()
Returns a hashCode for the Parameter. |
boolean |
removeAllValues(java.util.Collection<? extends java.lang.String> vals)
Removes all elements of a Collection of values from the
Parameter's List of values if they are part of it. |
boolean |
removeValue(java.lang.String val)
Removes a value from the Parameter's List of values if it
is part of it. |
protected void |
setName(java.lang.String newName)
Sets the name of the Parameter. |
void |
setValues(java.util.Collection<? extends java.lang.String> newValues)
Sets the Parameter's List of values. |
java.lang.String |
toString()
returns a human readable string representation of the Parameter. |
| Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity |
|---|
compareTo, getFullQualifiedClassNameJAXB, getId |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated protected Parameter()
public Parameter(java.lang.String newName)
Constructor that sets the name of the Parameter.
newName - the name of the Parameter
public Parameter(java.lang.String newName,
java.lang.String newValue)
Constructor that sets name and value of this
Parameter.
newName - the name of the ParameternewValue - the value of the Parameter
public Parameter(java.lang.String newName,
java.util.List<java.lang.String> newValues)
Constructor that sets name and values of this
Parameter.
newName - the name of the ParameternewValues - the values of the Parameter| Method Detail |
|---|
public final java.lang.String getName()
Parameter.
getName in interface INamedParameterprotected final void setName(java.lang.String newName)
Parameter.
newName - the new name of the Parameterpublic final java.util.List<java.lang.String> getValues()
List of values of the Parameter.
List of values of the Parameterpublic final void setValues(java.util.Collection<? extends java.lang.String> newValues)
Parameter's List of values.
newValues - the new List of values of the Parameterpublic final java.lang.String getFirstValue()
Parameter's List of
values.
Parameter's List of values
or an empty stringpublic final void addValue(java.lang.String val)
Parameter's List of values.
val - the value to be addedpublic final void addAllValues(java.util.Collection<? extends java.lang.String> vals)
Collection of values to the Parameter's
List of values.
vals - the values to be addedpublic final boolean containsValue(java.lang.String val)
Parameter's List of
values.
val - the value to be sought-after
Listpublic final boolean containsAllValues(java.util.Collection<? extends java.lang.String> vals)
Collection of values are part of
the Parameter's List of values.
vals - the values to be sought-after
Listpublic final boolean removeValue(java.lang.String val)
Parameter's List of values if it
is part of it.
val - the value to be removed
List changed as a result of the callpublic final boolean removeAllValues(java.util.Collection<? extends java.lang.String> vals)
Collection of values from the
Parameter's List of values if they are part of it.
vals - the values to be removed
List changed as a result of the callpublic final org.jdom.Element deserializeToJDOM()
Parameter as a JDOM Element.
deserializeToJDOM in interface JDOMableParameter as a JDOM Elementpublic final boolean equals(java.lang.Object object)
Parameter is equal to the parameter object.
Parameters are equal, if their names are equal and their
Lists of values contain the same elements.
equals in class AbstractBasicEntityobject - the Object to be checked for equality with the
Parameter
true if the parameter object equals the Parameterpublic final int hashCode()
Parameter.
hashCode in class AbstractBasicEntityParameterAbstractBasicEntity.hashCode()public java.lang.String toString()
Parameter.
toString in class java.lang.Objectpublic final Parameter createCopy()
Parameter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||