NSSet< E > Class Reference

Inherits java::io::Serializable, com::webobjects::foundation::_NSFoundationCollection, and java::util::Set<E>.

Inherited by NSMutableSet< E >.

Collaboration diagram for NSSet< E >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

Object[] _allObjects ()
int _shallowHashCode ()
boolean add (E o)
boolean addAll (Collection<?extends E > c)
NSArray< E > allObjects ()
anyObject ()
Class classForCoder ()
void clear ()
Object clone ()
boolean contains (Object o)
boolean containsAll (Collection<?> c)
boolean containsObject (Object object)
int count ()
void encodeWithCoder (NSCoder coder)
boolean equals (Object object)
int hashCode ()
HashSet< E > hashSet ()
NSSet< E > immutableClone ()
boolean intersectsSet (NSSet<?> otherSet)
boolean isEmpty ()
boolean isEqualToSet (NSSet<?> otherSet)
boolean isSubsetOfSet (NSSet<?> otherSet)
Iterator< E > iterator ()
member (Object object)
NSMutableSet< E > mutableClone ()
 NSSet (E object, E...objects)
 NSSet (E[] objects)
 NSSet (E object)
 NSSet (Set<?extends E > set, boolean ignoreNull)
 NSSet (NSSet<?extends E > otherSet)
 NSSet (NSArray<?extends E > objects)
 NSSet (Collection<?extends E > collection)
 NSSet ()
Enumeration< E > objectEnumerator ()
boolean remove (Object o)
boolean removeAll (Collection<?> c)
boolean retainAll (Collection<?> c)
NSSet< E > setByIntersectingSet (NSSet<?> otherSet)
NSSet< E > setBySubtractingSet (NSSet<?> otherSet)
NSSet< E > setByUnioningSet (NSSet<?extends E > otherSet)
int size ()
Object[] toArray ()
String toString ()

Static Public Member Functions

static Object decodeObject (NSCoder coder)
static< T > NSSet< T > emptySet ()

Static Public Attributes

static final Class _CLASS = _NSUtilities._classWithFullySpecifiedName("com.webobjects.foundation.NSSet")
static final NSSet EmptySet = new NSSet()

Protected Member Functions

void _clearDeletionsAndCollisions ()
void _ensureCapacity (int capacity)
void _initializeSet ()
Object[] objectsNoCopy ()

Protected Attributes

transient int _capacity
transient int _count
transient int _deletionLimit
transient byte[] _flags
transient int _hashCache
transient int _hashtableBuckets
Object[] _objects
transient Object[] _objectsCache

Static Protected Attributes

static int _NSSetClassHashCode = _CLASS.hashCode()

Package Functions

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

Static Package Attributes

static final long serialVersionUID = -8833684352747517048L

Private Member Functions

boolean _equalsSet (NSSet<?> otherSet)
void initFromObjects (Object[] objects, boolean checkForNull)
 NSSet (E[] objects, boolean checkForNull)
void readObject (ObjectInputStream s) throws IOException, ClassNotFoundException
Object readResolve () throws ObjectStreamException
void writeObject (ObjectOutputStream s) throws IOException

Static Private Attributes

static final String SerializationValuesFieldKey = "objects"
static final ObjectStreamField[] serialPersistentFields = (new ObjectStreamField[] { new ObjectStreamField(SerializationValuesFieldKey, ((Object) (_NSUtilities._NoObjectArray)).getClass()) })


Detailed Description

NSSet reimplementation to support JDK 1.5 templates. Use with

 NSSet<T> setA = new NSSet<T>(NSArray < T > listA);
 NSSet<T> setB = new NSSet<T>(NSArray < T > listB);
 logger.debug("intersection contains " + setA.setByIntersectingSet(setB));
 

Parameters:
&lt;T&gt; type of set contents

Constructor & Destructor Documentation

NSSet (  ) 

NSSet ( Collection<?extends E >  collection  ) 

NSSet ( NSArray<?extends E >  objects  ) 

NSSet ( NSSet<?extends E >  otherSet  ) 

NSSet ( Set<?extends E >  set,
boolean  ignoreNull 
)

NSSet ( object  ) 

NSSet ( E[]  objects  ) 

NSSet ( object,
E...  objects 
)

NSSet ( E[]  objects,
boolean  checkForNull 
) [private]


Member Function Documentation

Object [] _allObjects (  ) 

void _clearDeletionsAndCollisions (  )  [protected]

void _ensureCapacity ( int  capacity  )  [protected]

boolean _equalsSet ( NSSet<?>  otherSet  )  [private]

void _initializeSet (  )  [protected]

int _shallowHashCode (  ) 

boolean add ( o  ) 

Reimplemented in NSMutableSet< E >.

boolean addAll ( Collection<?extends E >  c  ) 

Reimplemented in NSMutableSet< E >.

NSArray<E> allObjects (  ) 

E anyObject (  ) 

Class classForCoder (  ) 

void clear (  ) 

Reimplemented in NSMutableSet< E >.

Object clone (  ) 

Reimplemented in NSMutableSet< E >.

boolean contains ( Object  o  ) 

boolean containsAll ( Collection<?>  c  ) 

boolean containsObject ( Object  object  ) 

int count (  ) 

static Object decodeObject ( NSCoder  coder  )  [static]

static <T> NSSet<T> emptySet (  )  [static]

void encodeWithCoder ( NSCoder  coder  ) 

boolean equals ( Object  object  ) 

int hashCode (  ) 

HashSet<E> hashSet (  ) 

NSSet<E> immutableClone (  ) 

Reimplemented in NSMutableSet< E >.

void initFromObjects ( Object[]  objects,
boolean  checkForNull 
) [private]

boolean intersectsSet ( NSSet<?>  otherSet  ) 

boolean isEmpty (  ) 

boolean isEqualToSet ( NSSet<?>  otherSet  ) 

boolean isSubsetOfSet ( NSSet<?>  otherSet  ) 

Iterator<E> iterator (  ) 

E member ( Object  object  ) 

NSMutableSet<E> mutableClone (  ) 

Reimplemented in NSMutableSet< E >.

Enumeration<E> objectEnumerator (  ) 

Object [] objectsNoCopy (  )  [protected]

void readObject ( ObjectInputStream  s  )  throws IOException, ClassNotFoundException [private]

Object readResolve (  )  throws ObjectStreamException [private]

boolean remove ( Object  o  ) 

Reimplemented in NSMutableSet< E >.

boolean removeAll ( Collection<?>  c  ) 

Reimplemented in NSMutableSet< E >.

boolean retainAll ( Collection<?>  c  ) 

Reimplemented in NSMutableSet< E >.

NSSet<E> setByIntersectingSet ( NSSet<?>  otherSet  ) 

NSSet<E> setBySubtractingSet ( NSSet<?>  otherSet  ) 

NSSet<E> setByUnioningSet ( NSSet<?extends E >  otherSet  ) 

int size (  ) 

public<T> T [] toArray ( T[]  objects  )  [package]

Object [] toArray (  ) 

String toString (  ) 

void writeObject ( ObjectOutputStream  s  )  throws IOException [private]


Member Data Documentation

transient int _capacity [protected]

final Class _CLASS = _NSUtilities._classWithFullySpecifiedName("com.webobjects.foundation.NSSet") [static]

Reimplemented in NSMutableSet< E >.

transient int _count [protected]

transient int _deletionLimit [protected]

transient byte [] _flags [protected]

transient int _hashCache [protected]

transient int _hashtableBuckets [protected]

int _NSSetClassHashCode = _CLASS.hashCode() [static, protected]

Object [] _objects [protected]

transient Object [] _objectsCache [protected]

final NSSet EmptySet = new NSSet() [static]

final String SerializationValuesFieldKey = "objects" [static, private]

final ObjectStreamField [] serialPersistentFields = (new ObjectStreamField[] { new ObjectStreamField(SerializationValuesFieldKey, ((Object) (_NSUtilities._NoObjectArray)).getClass()) }) [static, private]

final long serialVersionUID = -8833684352747517048L [static, package]

Reimplemented in NSMutableSet< E >.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:32 2012 for Project Wonder by  doxygen 1.5.8