|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.globus.common.MVHashtable
org.globus.common.ConstrainedMVHashtable
public class ConstrainedMVHashtable
ConstrainedMVHashtable allows the placing of constraints on a MVHashtable that determine if an attribute is optional, required, or if an attribute is single, or multivalued. Use set/isRequired() functions to specify/check whether an attribute will be required or not. Use set/isSingleValued() to specify/check whether an attribute accepts a single or multiple values. Use setMaximum() to set the largest number of values an attribute is allowed to accept. NOTE: this class is not supported yet.
Field Summary | |
---|---|
protected Hashtable |
maxValues
holds the maximum values for various attributes |
protected Hashtable |
required
holds required status of attributes |
protected Hashtable |
singleValued
holds single-valued status of attributes |
Fields inherited from class org.globus.common.MVHashtable |
---|
attribs |
Constructor Summary | |
---|---|
ConstrainedMVHashtable()
Default constructor which creates a blank ConstrainedMVHashtable. |
|
ConstrainedMVHashtable(ConstrainedMVHashtable constrainedMultivaluedHashtable)
Copy constructor. |
Method Summary | |
---|---|
boolean |
isRequired(String key)
Returns true if the key is constrained to be required. |
boolean |
isSingleValued(String key)
Returns true if a specific attribute is constrained to be SingleValued |
void |
setMaximum(String key,
int maxValues)
Constrain the number of values for a specific attribute. |
void |
setRequired(String[] keys,
boolean required)
Constrains all attributes specified in the array of key strings to be required/not required. |
void |
setRequired(String key,
boolean req)
Constrains a specific attribute to be required or optional. |
void |
setSingleValued(String[] keys,
boolean single)
Constrains all attributes specified by the array of strings to be SingleValued. |
void |
setSingleValued(String key,
boolean single)
Constrains a specific attribute to be SingleValued. |
Methods inherited from class org.globus.common.MVHashtable |
---|
add, add, add, add, clear, contains, containsName, get, getFirstValue, getKeys, getLastValue, getValueAt, keys, print, remove, remove, remove, set, size, size, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Hashtable singleValued
protected Hashtable required
protected Hashtable maxValues
Constructor Detail |
---|
public ConstrainedMVHashtable()
public ConstrainedMVHashtable(ConstrainedMVHashtable constrainedMultivaluedHashtable)
constrainedMultivaluedHashtable
- the ConstrainedMVHashtable to be copiedMethod Detail |
---|
public void setRequired(String key, boolean req)
key
- the key of the attribute to be constrainedreq
- true if required, false if optionalpublic void setRequired(String[] keys, boolean required)
keys
- an array of the keys to be constrainedrequired
- true if all are required, false if all are optionalpublic boolean isRequired(String key)
key
- the key of attribute to check
boolean
true if required, false if optionalpublic void setSingleValued(String key, boolean single)
key
- the key of the attribute to be constrainedsingle
- true if single-valued, false if multi-valuedpublic void setSingleValued(String[] keys, boolean single)
keys
- an array of keys of the attributes to be constrainedsingle
- true if all should be single-valued, false if multi-valuedpublic boolean isSingleValued(String key)
key
- the key of the attribute to be checked
boolean
true if single-valued, false if multi-valuedpublic void setMaximum(String key, int maxValues)
key
- the key of the attribute to be constrainedmaxValues
- the maximum number of values this attribute can have
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |