org.hibernate.validator.internal.util
Class IdentitySet

java.lang.Object
  extended by org.hibernate.validator.internal.util.IdentitySet
All Implemented Interfaces:
Iterable<Object>, Collection<Object>, Set<Object>

public class IdentitySet
extends Object
implements Set<Object>

Set that compares object by identity rather than equality. Wraps around a IdentityHashMap

Author:
Emmanuel Bernard

Constructor Summary
IdentitySet()
           
IdentitySet(int size)
           
 
Method Summary
 boolean add(Object o)
           
 boolean addAll(Collection<? extends Object> c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<? extends Object> c)
           
 boolean isEmpty()
           
 Iterator<Object> iterator()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<? extends Object> c)
           
 boolean retainAll(Collection<? extends Object> c)
           
 int size()
           
 Object[] toArray()
           
 Object[] toArray(Object[] a)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
equals, hashCode
 

Constructor Detail

IdentitySet

public IdentitySet()

IdentitySet

public IdentitySet(int size)
Method Detail

size

public int size()
Specified by:
size in interface Collection<Object>
Specified by:
size in interface Set<Object>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<Object>
Specified by:
isEmpty in interface Set<Object>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<Object>
Specified by:
contains in interface Set<Object>

iterator

public Iterator<Object> iterator()
Specified by:
iterator in interface Iterable<Object>
Specified by:
iterator in interface Collection<Object>
Specified by:
iterator in interface Set<Object>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<Object>
Specified by:
toArray in interface Set<Object>

add

public boolean add(Object o)
Specified by:
add in interface Collection<Object>
Specified by:
add in interface Set<Object>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<Object>
Specified by:
remove in interface Set<Object>

addAll

public boolean addAll(Collection<? extends Object> c)
Specified by:
addAll in interface Collection<Object>
Specified by:
addAll in interface Set<Object>

clear

public void clear()
Specified by:
clear in interface Collection<Object>
Specified by:
clear in interface Set<Object>

removeAll

public boolean removeAll(Collection<? extends Object> c)
Specified by:
removeAll in interface Collection<Object>
Specified by:
removeAll in interface Set<Object>

retainAll

public boolean retainAll(Collection<? extends Object> c)
Specified by:
retainAll in interface Collection<Object>
Specified by:
retainAll in interface Set<Object>

containsAll

public boolean containsAll(Collection<? extends Object> c)
Specified by:
containsAll in interface Collection<Object>
Specified by:
containsAll in interface Set<Object>

toArray

public Object[] toArray(Object[] a)
Specified by:
toArray in interface Collection<Object>
Specified by:
toArray in interface Set<Object>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2013 Red Hat, Inc. All Rights Reserved