Package org.globus.rsl
Class NameValue
- java.lang.Object
-
- org.globus.rsl.NameValue
-
- Direct Known Subclasses:
Bindings,NameOpValue
public abstract class NameValue extends java.lang.ObjectThis class represents an attribute that is associated with multiple values.
-
-
Constructor Summary
Constructors Constructor Description NameValue(java.lang.String attribute)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclear()Removes all values associated with the attribute.java.lang.StringgetAttribute()Returns the attribute name.java.lang.ObjectgetFirstValue()Returns the first value (if any) in the list.java.util.ListgetValues()Returns the list of values.booleanmerge(NameValue nv)booleanremove(java.lang.Object value)Removes a specific value from the list of values.voidsetAttribute(java.lang.String attrib)Sets the attribute name.voidsetValues(java.util.List values)Sets the list of values.java.lang.StringtoRSL(boolean explicitConcat)Returns a RSL representation of this relation.abstract voidtoRSL(java.lang.StringBuffer buf, boolean explicitConcat)Produces a RSL representation of this relation.java.lang.StringtoString()
-
-
-
Method Detail
-
setAttribute
public void setAttribute(java.lang.String attrib)
Sets the attribute name.- Parameters:
attrib- the attribute name.
-
setValues
public void setValues(java.util.List values)
Sets the list of values.- Parameters:
values- list of values.
-
getAttribute
public java.lang.String getAttribute()
Returns the attribute name.- Returns:
- the attribute name.
-
getValues
public java.util.List getValues()
Returns the list of values.- Returns:
- list of values.
-
clear
public void clear()
Removes all values associated with the attribute.
-
remove
public boolean remove(java.lang.Object value)
Removes a specific value from the list of values. The value must be matched exactly to be removed from the list.- Parameters:
value- value to remove.- Returns:
- true if the value was successfuly removed from the list of values. False, otherwise.
-
toRSL
public java.lang.String toRSL(boolean explicitConcat)
Returns a RSL representation of this relation.- Parameters:
explicitConcat- if true explicit concatination will be used in RSL strings.- Returns:
- RSL representation of this relation.
-
toRSL
public abstract void toRSL(java.lang.StringBuffer buf, boolean explicitConcat)Produces a RSL representation of this relation.- Parameters:
buf- buffer to add the RSL representation to.explicitConcat- if true explicit concatination will be used in RSL strings.
-
getFirstValue
public java.lang.Object getFirstValue()
Returns the first value (if any) in the list.- Returns:
- the first value. Null, if there is no values at all.
-
merge
public boolean merge(NameValue nv)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-