Project Wonder 5.0

com.webobjects.foundation
Class NSMutableSet<E>

java.lang.Object
  extended by com.webobjects.foundation.NSSet<E>
      extended by com.webobjects.foundation.NSMutableSet<E>
Type Parameters:
E - type of set contents
All Implemented Interfaces:
_NSFoundationCollection, NSCoding, Serializable, Cloneable, Iterable<E>, Collection<E>, Set<E>

public class NSMutableSet<E>
extends NSSet<E>

NSSet reimplementation to support JDK 1.5 templates. Use with

 NSMutableSet<E> set = new NSMutableSet<E>();
 set.put(new E())
 
 for (E t : set)
     logger.debug(t);
 

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSCoding
NSCoding._BigDecimalSupport, NSCoding._BigIntegerSupport, NSCoding._BooleanSupport, NSCoding._ByteSupport, NSCoding._CharacterSupport, NSCoding._DateSupport, NSCoding._DoubleSupport, NSCoding._FloatSupport, NSCoding._IntegerSupport, NSCoding._LongSupport, NSCoding._NumberSupport, NSCoding._ShortSupport, NSCoding._StringSupport, NSCoding.Support
 
Field Summary
static Class _CLASS
           
 
Fields inherited from class com.webobjects.foundation.NSSet
_capacity, _count, _deletionLimit, _flags, _hashCache, _hashtableBuckets, _NSSetClassHashCode, _objects, _objectsCache, EmptySet
 
Constructor Summary
NSMutableSet()
           
NSMutableSet(Collection<? extends E> collection)
           
NSMutableSet(E object)
           
NSMutableSet(E[] objects)
           
NSMutableSet(E object, E... objects)
           
NSMutableSet(int capacity)
           
NSMutableSet(NSArray<? extends E> objects)
           
NSMutableSet(NSSet<? extends E> otherSet)
           
NSMutableSet(Set<? extends E> set, boolean ignoreNull)
           
 
Method Summary
 boolean add(E o)
           
 boolean addAll(Collection<? extends E> c)
           
 void addObject(E object)
           
 void addObjects(E... objects)
           
 void addObjectsFromArray(NSArray<? extends E> array)
           
 void clear()
           
 Object clone()
           
 NSSet<E> immutableClone()
           
 void intersectSet(NSSet<?> otherSet)
           
 NSMutableSet<E> mutableClone()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 void removeAllObjects()
           
 E removeObject(Object object)
           
 boolean retainAll(Collection<?> c)
           
 void setSet(NSSet<? extends E> otherSet)
           
 void subtractSet(NSSet<?> otherSet)
           
 void unionSet(NSSet<? extends E> otherSet)
           
 
Methods inherited from class com.webobjects.foundation.NSSet
_allObjects, _clearDeletionsAndCollisions, _ensureCapacity, _initializeSet, _setCapacity, _setCount, _shallowHashCode, allObjects, anyObject, capacity, classForCoder, contains, containsAll, containsObject, count, decodeObject, emptySet, encodeWithCoder, equals, hashCode, hashSet, intersectsSet, isEmpty, isEqualToSet, isSubsetOfSet, iterator, member, objectEnumerator, objectsNoCopy, setByIntersectingSet, setBySubtractingSet, setByUnioningSet, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_CLASS

public static final Class _CLASS
Constructor Detail

NSMutableSet

public NSMutableSet()

NSMutableSet

public NSMutableSet(int capacity)

NSMutableSet

public NSMutableSet(Collection<? extends E> collection)

NSMutableSet

public NSMutableSet(E object)

NSMutableSet

public NSMutableSet(E[] objects)

NSMutableSet

public NSMutableSet(E object,
                    E... objects)

NSMutableSet

public NSMutableSet(NSArray<? extends E> objects)

NSMutableSet

public NSMutableSet(NSSet<? extends E> otherSet)

NSMutableSet

public NSMutableSet(Set<? extends E> set,
                    boolean ignoreNull)
Method Detail

addObject

public void addObject(E object)

addObjects

public void addObjects(E... objects)

removeObject

public E removeObject(Object object)

removeAllObjects

public void removeAllObjects()

setSet

public void setSet(NSSet<? extends E> otherSet)

addObjectsFromArray

public void addObjectsFromArray(NSArray<? extends E> array)

intersectSet

public void intersectSet(NSSet<?> otherSet)

subtractSet

public void subtractSet(NSSet<?> otherSet)

unionSet

public void unionSet(NSSet<? extends E> otherSet)

clone

public Object clone()
Overrides:
clone in class NSSet<E>

immutableClone

public NSSet<E> immutableClone()
Overrides:
immutableClone in class NSSet<E>

mutableClone

public NSMutableSet<E> mutableClone()
Overrides:
mutableClone in class NSSet<E>

add

public boolean add(E o)
Specified by:
add in interface Collection<E>
Specified by:
add in interface Set<E>
Overrides:
add in class NSSet<E>

remove

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

addAll

public boolean addAll(Collection<? extends E> c)
Specified by:
addAll in interface Collection<E>
Specified by:
addAll in interface Set<E>
Overrides:
addAll in class NSSet<E>

retainAll

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

removeAll

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

clear

public void clear()
Specified by:
clear in interface Collection<E>
Specified by:
clear in interface Set<E>
Overrides:
clear in class NSSet<E>

Last updated: Wed, Feb 22, 2012 • 07:00 AM EST

Copyright © 2002 – 2011 Project Wonder.