org.opensaml.xml.util
Class LazySet<ElementType>

java.lang.Object
  extended by org.opensaml.xml.util.LazySet<ElementType>
Type Parameters:
ElementType - type of the elements within the set
All Implemented Interfaces:
Serializable, Iterable<ElementType>, Collection<ElementType>, Set<ElementType>

@NotThreadSafe
public class LazySet<ElementType>
extends Object
implements Set<ElementType>, Serializable

A set that is lazy initialized. This set takes very little memory when storing zero or one item.

See Also:
Serialized Form

Constructor Summary
LazySet()
           
 
Method Summary
 boolean add(ElementType element)
          
 boolean addAll(Collection<? extends ElementType> collection)
          
 void clear()
          
 boolean contains(Object element)
          
 boolean containsAll(Collection<?> collection)
          
 boolean equals(Object obj)
          
 int hashCode()
          
 boolean isEmpty()
          
 Iterator<ElementType> iterator()
          
 boolean remove(Object element)
          
 boolean removeAll(Collection<?> collection)
          
 boolean retainAll(Collection<?> collection)
          
 int size()
          
 Object[] toArray()
          
<T> T[]
toArray(T[] type)
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazySet

public LazySet()
Method Detail

add

public boolean add(ElementType element)

Specified by:
add in interface Collection<ElementType>
Specified by:
add in interface Set<ElementType>

addAll

public boolean addAll(Collection<? extends ElementType> collection)

Specified by:
addAll in interface Collection<ElementType>
Specified by:
addAll in interface Set<ElementType>

clear

public void clear()

Specified by:
clear in interface Collection<ElementType>
Specified by:
clear in interface Set<ElementType>

contains

public boolean contains(Object element)

Specified by:
contains in interface Collection<ElementType>
Specified by:
contains in interface Set<ElementType>

containsAll

public boolean containsAll(Collection<?> collection)

Specified by:
containsAll in interface Collection<ElementType>
Specified by:
containsAll in interface Set<ElementType>

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface Collection<ElementType>
Specified by:
isEmpty in interface Set<ElementType>

iterator

public Iterator<ElementType> iterator()

Specified by:
iterator in interface Iterable<ElementType>
Specified by:
iterator in interface Collection<ElementType>
Specified by:
iterator in interface Set<ElementType>

remove

public boolean remove(Object element)

Specified by:
remove in interface Collection<ElementType>
Specified by:
remove in interface Set<ElementType>

removeAll

public boolean removeAll(Collection<?> collection)

Specified by:
removeAll in interface Collection<ElementType>
Specified by:
removeAll in interface Set<ElementType>

retainAll

public boolean retainAll(Collection<?> collection)

Specified by:
retainAll in interface Collection<ElementType>
Specified by:
retainAll in interface Set<ElementType>

size

public int size()

Specified by:
size in interface Collection<ElementType>
Specified by:
size in interface Set<ElementType>

toArray

public Object[] toArray()

Specified by:
toArray in interface Collection<ElementType>
Specified by:
toArray in interface Set<ElementType>

toArray

public <T> T[] toArray(T[] type)

Specified by:
toArray in interface Collection<ElementType>
Specified by:
toArray in interface Set<ElementType>

toString

public String toString()

Overrides:
toString in class Object

hashCode

public int hashCode()

Specified by:
hashCode in interface Collection<ElementType>
Specified by:
hashCode in interface Set<ElementType>
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Specified by:
equals in interface Collection<ElementType>
Specified by:
equals in interface Set<ElementType>
Overrides:
equals in class Object


Copyright © 2006-2011 Internet2. All Rights Reserved.