fedora.server.resourceIndex
Class ParamDomain

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.TreeSet<java.lang.String>
              extended by fedora.server.resourceIndex.ParamDomain
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.String>, java.util.Collection<java.lang.String>, java.util.NavigableSet<java.lang.String>, java.util.Set<java.lang.String>, java.util.SortedSet<java.lang.String>

public class ParamDomain
extends java.util.TreeSet<java.lang.String>

A sorted set of domain values for a parameter. As per the SortedSet contract, iterators over the values in this collection will provide the elements in ascending order.

Author:
cwilper@cs.cornell.edu
See Also:
Serialized Form

Constructor Summary
ParamDomain(java.lang.String parameterName, boolean isRequired)
          Construct an empty ParamDomain.
ParamDomain(java.lang.String parameterName, boolean isRequired, java.lang.String[] domainValues)
          Construct a ParamDomain with values from the given array.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getParameterName()
          Get the name of the parameter whose domain is being described.
 boolean isRequired()
          Tell whether specifying a value is required.
 
Methods inherited from class java.util.TreeSet
add, addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, subSet, subSet, tailSet, tailSet
 
Methods inherited from class java.util.AbstractSet
hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

ParamDomain

public ParamDomain(java.lang.String parameterName,
                   boolean isRequired)
Construct an empty ParamDomain.

Parameters:
parameterName - the parameter whose domain is being described.
isRequired - whether specifying a value is required.

ParamDomain

public ParamDomain(java.lang.String parameterName,
                   boolean isRequired,
                   java.lang.String[] domainValues)
Construct a ParamDomain with values from the given array.

Parameters:
parameterName - the parameter whose domain is being described.
isRequired - whether specifying a value is required.
values - the domain values.
Method Detail

getParameterName

public java.lang.String getParameterName()
Get the name of the parameter whose domain is being described.


isRequired

public boolean isRequired()
Tell whether specifying a value is required.


equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface java.util.Collection<java.lang.String>
Specified by:
equals in interface java.util.Set<java.lang.String>
Overrides:
equals in class java.util.AbstractSet<java.lang.String>