E - - type of set contentspublic class NSSet<E> extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable, NSCoding, _NSFoundationCollection, java.util.Set<E>
NSSet<E> setA = new NSSet<E>(NSArray<E> listA);
NSSet<E> setB = new NSSet<E>(NSArray<E> listB);
logger.debug("intersection contains " + setA.setByIntersectingSet(setB));
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| Modifier and Type | Field and Description |
|---|---|
protected int |
_capacity |
static java.lang.Class |
_CLASS |
protected int |
_count |
protected int |
_deletionLimit |
protected byte[] |
_flags |
protected int |
_hashCache |
protected int |
_hashtableBuckets |
protected static int |
_NSSetClassHashCode |
protected java.lang.Object[] |
_objects |
protected java.lang.Object[] |
_objectsCache |
static NSSet |
EmptySet |
| Constructor and Description |
|---|
NSSet() |
NSSet(java.util.Collection<? extends E> collection) |
NSSet(E object) |
NSSet(E[] objects) |
NSSet(E object,
E... objects) |
NSSet(NSArray<? extends E> objects) |
NSSet(NSSet<? extends E> otherSet) |
NSSet(java.util.Set<? extends E> set,
boolean ignoreNull) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object[] |
_allObjects() |
protected void |
_clearDeletionsAndCollisions() |
protected void |
_ensureCapacity(int capacity) |
protected void |
_initializeSet() |
protected void |
_setCapacity(int capacity) |
protected void |
_setCount(int count) |
int |
_shallowHashCode() |
boolean |
add(E o) |
boolean |
addAll(java.util.Collection<? extends E> c) |
NSArray<E> |
allObjects() |
E |
anyObject() |
protected int |
capacity() |
java.lang.Class |
classForCoder() |
void |
clear() |
java.lang.Object |
clone() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
containsObject(java.lang.Object object) |
int |
count() |
static java.lang.Object |
decodeObject(NSCoder coder) |
static <T> NSSet<T> |
emptySet() |
void |
encodeWithCoder(NSCoder coder) |
boolean |
equals(java.lang.Object object) |
int |
hashCode() |
java.util.HashSet<E> |
hashSet() |
NSSet<E> |
immutableClone() |
boolean |
intersectsSet(NSSet<?> otherSet) |
boolean |
isEmpty() |
boolean |
isEqualToSet(NSSet<?> otherSet) |
boolean |
isSubsetOfSet(NSSet<?> otherSet) |
java.util.Iterator<E> |
iterator() |
E |
member(java.lang.Object object) |
NSMutableSet<E> |
mutableClone() |
java.util.Enumeration<E> |
objectEnumerator() |
protected java.lang.Object[] |
objectsNoCopy() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
NSSet<E> |
setByIntersectingSet(NSSet<?> otherSet) |
NSSet<E> |
setBySubtractingSet(NSSet<?> otherSet) |
NSSet<E> |
setByUnioningSet(NSSet<? extends E> otherSet) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] objects) |
java.lang.String |
toString() |
public static final java.lang.Class _CLASS
protected static int _NSSetClassHashCode
public static final NSSet EmptySet
protected transient int _capacity
protected transient int _count
protected transient int _deletionLimit
protected transient byte[] _flags
protected transient int _hashCache
protected transient int _hashtableBuckets
protected java.lang.Object[] _objects
protected transient java.lang.Object[] _objectsCache
public NSSet()
public NSSet(java.util.Collection<? extends E> collection)
public NSSet(java.util.Set<? extends E> set, boolean ignoreNull)
public NSSet(E object)
public NSSet(E[] objects)
public static java.lang.Object decodeObject(NSCoder coder)
public java.lang.Object[] _allObjects()
protected void _clearDeletionsAndCollisions()
protected void _ensureCapacity(int capacity)
protected void _initializeSet()
public int _shallowHashCode()
_shallowHashCode in interface _NSFoundationCollectionpublic boolean add(E o)
public boolean addAll(java.util.Collection<? extends E> c)
public E anyObject()
public java.lang.Class classForCoder()
classForCoder in interface NSCodingpublic void clear()
public java.lang.Object clone()
clone in class java.lang.Objectpublic boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean containsObject(java.lang.Object object)
public int count()
protected void _setCount(int count)
protected int capacity()
protected void _setCapacity(int capacity)
public void encodeWithCoder(NSCoder coder)
encodeWithCoder in interface NSCodingpublic static <T> NSSet<T> emptySet()
public boolean equals(java.lang.Object object)
public int hashCode()
public java.util.HashSet<E> hashSet()
public boolean intersectsSet(NSSet<?> otherSet)
public boolean isEmpty()
public boolean isEqualToSet(NSSet<?> otherSet)
public boolean isSubsetOfSet(NSSet<?> otherSet)
public java.util.Iterator<E> iterator()
public E member(java.lang.Object object)
public NSMutableSet<E> mutableClone()
public java.util.Enumeration<E> objectEnumerator()
protected java.lang.Object[] objectsNoCopy()
public boolean remove(java.lang.Object o)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public int size()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] objects)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2002 – 2022 Project Wonder.