org.apache.jackrabbit.webdav.property
Class DavPropertyNameSet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byjava.util.HashSet
              extended byorg.apache.jackrabbit.webdav.property.DavPropertyNameSet
All Implemented Interfaces:
Cloneable, Collection, Serializable, Set

public class DavPropertyNameSet
extends HashSet

DavPropertyNameSet represents a Set of DavPropertyName objects.

See Also:
Serialized Form

Constructor Summary
DavPropertyNameSet()
          Create a new empty set.
DavPropertyNameSet(Collection c)
          Create a new set from the given collection.
DavPropertyNameSet(org.jdom.Element propElement)
          Create a new DavPropertyNameSet from the given DAV:prop element.
 
Method Summary
 boolean add(DavPropertyName propertyName)
          Adds the specified DavPropertyName object to this set if it is not already present.
 boolean add(Object o)
          Add the given object to this set.
 org.jdom.Element toXml()
          Returns the xml representation of this property name set with the following format:
 
Methods inherited from class java.util.HashSet
clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, 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
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

DavPropertyNameSet

public DavPropertyNameSet()
Create a new empty set.

See Also:
HashSet()

DavPropertyNameSet

public DavPropertyNameSet(Collection c)
Create a new set from the given collection.

Parameters:
c -
See Also:
HashSet(Collection)

DavPropertyNameSet

public DavPropertyNameSet(org.jdom.Element propElement)
Create a new DavPropertyNameSet from the given DAV:prop element.

Parameters:
propElement -
Throws:
IllegalArgumentException - if the specified element is null or is not a DAV:prop element.
Method Detail

add

public boolean add(DavPropertyName propertyName)
Adds the specified DavPropertyName object to this set if it is not already present.

Parameters:
propertyName - element to be added to this set.
Returns:
true if the set did not already contain the specified element.

add

public boolean add(Object o)
Add the given object to this set. In case the object is not a DavPropertyName this method returns false.

Parameters:
o -
Returns:
true if adding the object was successful.
See Also:
add(DavPropertyName)

toXml

public org.jdom.Element toXml()
Returns the xml representation of this property name set with the following format:
 <!ELEMENT prop (ANY) >
 where ANY consists of a list of elements each reflecting the xml
 representation of an entry in this set.
 

Returns:
xml representation


Copyright © 2005 . All Rights Reserved.