org.glite.authz.common.model.util
Class LazySet<ElementType>

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

public class LazySet<ElementType>
extends java.lang.Object
implements java.util.Set<ElementType>, java.io.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(java.util.Collection<? extends ElementType> collection)
          
 void clear()
          
 boolean contains(java.lang.Object element)
          
 boolean containsAll(java.util.Collection<?> collection)
          
 boolean equals(java.lang.Object obj)
          
 int hashCode()
          
 boolean isEmpty()
          
 java.util.Iterator<ElementType> iterator()
          
 boolean remove(java.lang.Object element)
          
 boolean removeAll(java.util.Collection<?> collection)
          
 boolean retainAll(java.util.Collection<?> collection)
          
 int size()
          
 java.lang.Object[] toArray()
          
<T> T[]
toArray(T[] type)
          
 java.lang.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 java.util.Collection<ElementType>
Specified by:
add in interface java.util.Set<ElementType>

addAll

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

Specified by:
addAll in interface java.util.Collection<ElementType>
Specified by:
addAll in interface java.util.Set<ElementType>

clear

public void clear()

Specified by:
clear in interface java.util.Collection<ElementType>
Specified by:
clear in interface java.util.Set<ElementType>

contains

public boolean contains(java.lang.Object element)

Specified by:
contains in interface java.util.Collection<ElementType>
Specified by:
contains in interface java.util.Set<ElementType>

containsAll

public boolean containsAll(java.util.Collection<?> collection)

Specified by:
containsAll in interface java.util.Collection<ElementType>
Specified by:
containsAll in interface java.util.Set<ElementType>

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface java.util.Collection<ElementType>
Specified by:
isEmpty in interface java.util.Set<ElementType>

iterator

public java.util.Iterator<ElementType> iterator()

Specified by:
iterator in interface java.lang.Iterable<ElementType>
Specified by:
iterator in interface java.util.Collection<ElementType>
Specified by:
iterator in interface java.util.Set<ElementType>

remove

public boolean remove(java.lang.Object element)

Specified by:
remove in interface java.util.Collection<ElementType>
Specified by:
remove in interface java.util.Set<ElementType>

removeAll

public boolean removeAll(java.util.Collection<?> collection)

Specified by:
removeAll in interface java.util.Collection<ElementType>
Specified by:
removeAll in interface java.util.Set<ElementType>

retainAll

public boolean retainAll(java.util.Collection<?> collection)

Specified by:
retainAll in interface java.util.Collection<ElementType>
Specified by:
retainAll in interface java.util.Set<ElementType>

size

public int size()

Specified by:
size in interface java.util.Collection<ElementType>
Specified by:
size in interface java.util.Set<ElementType>

toArray

public java.lang.Object[] toArray()

Specified by:
toArray in interface java.util.Collection<ElementType>
Specified by:
toArray in interface java.util.Set<ElementType>

toArray

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

Specified by:
toArray in interface java.util.Collection<ElementType>
Specified by:
toArray in interface java.util.Set<ElementType>

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()

Specified by:
hashCode in interface java.util.Collection<ElementType>
Specified by:
hashCode in interface java.util.Set<ElementType>
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Specified by:
equals in interface java.util.Collection<ElementType>
Specified by:
equals in interface java.util.Set<ElementType>
Overrides:
equals in class java.lang.Object


Copyright © 2008-2012 EMI - European Middleware Initiative. All Rights Reserved.