railo.commons.util.mod
Class AbstractSet<E>

java.lang.Object
  extended by railo.commons.util.mod.AbstractCollection<E>
      extended by railo.commons.util.mod.AbstractSet<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>

public abstract class AbstractSet<E>
extends AbstractCollection<E>
implements Set<E>


Method Summary
 boolean equals(Object o)
          Compares the specified object with this set for equality.
 int hashCode()
           
 boolean removeAll(Collection<?> c)
           
 
Methods inherited from class railo.commons.util.mod.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, retainAll, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, retainAll, size, toArray, toArray
 

Method Detail

equals

public boolean equals(Object o)
Compares the specified object with this set for equality. Returns true if the given object is also a set, the two sets have the same size, and every member of the given set is contained in this set. This ensures that the equals method works properly across different implementations of the Set interface.

This implementation first checks if the specified object is this set; if so it returns true. Then, it checks if the specified object is a set whose size is identical to the size of this set; if not, it returns false. If so, it returns containsAll((Collection) o).

Specified by:
equals in interface Collection<E>
Specified by:
equals in interface Set<E>
Overrides:
equals in class Object
Parameters:
o - object to be compared for equality with this set
Returns:
true if the specified object is equal to this set

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<E>
Specified by:
hashCode in interface Set<E>
Overrides:
hashCode in class Object

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<E>
Specified by:
removeAll in interface Set<E>
Overrides:
removeAll in class AbstractCollection<E>


Copyright © 2012 Railo