Package org.robovm.apple.foundation
Class NSSet<T extends NSObject>
java.lang.Object
org.robovm.rt.bro.NativeObject
org.robovm.objc.ObjCObject
org.robovm.apple.foundation.NSObject
org.robovm.apple.foundation.NSSet<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Set<T>,NSFastEnumeration,NSObjectProtocol,ObjCProtocol
- Direct Known Subclasses:
NSMutableSet
public class NSSet<T extends NSObject> extends NSObject implements NSFastEnumeration, Set<T>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNSSet.AsSetMarshalerstatic classNSSet.AsStringListMarshalerstatic classNSSet.AsStringSetMarshalerstatic classNSSet.NSSetPtr<T extends NSObject>Nested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInitNested classes/interfaces inherited from class org.robovm.objc.ObjCObject
ObjCObject.ObjCObjectPtr, ObjCObject.Super -
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description NSSet()NSSet(Collection<T> c)protectedNSSet(NSObject.Handle h, long handle)protectedNSSet(NSObject.SkipInit skipInit)NSSet(T... objects) -
Method Summary
Modifier and Type Method Description booleanadd(T e)booleanaddAll(Collection<? extends T> c)protected voidafterMarshaled(int flags)Tany()List<String>asStringList()Set<String>asStringSet()Use this method to convert a NSSet of NSString items to a Set of String items.protected static voidcheckNull(Object o)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)protected AbstractSet<T>createAdapter()static NSSet<NSString>fromStrings(String... strings)static NSSet<NSString>fromStrings(Collection<String> strings)protected longgetCount()NSArray<T>getValues()protected longinit(long objects, long cnt)protected longinit(NSArray<T> array)protected longinit(NSSet<T> set)booleanisEmpty()protected TisMember(T object)Iterator<T>iterator()protected NSEnumerator<T>objectEnumerator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<U> U[]toArray(U[] a)Methods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValuesMethods inherited from class org.robovm.objc.ObjCObject
addStrongRef, dispose, dispose, finalize, getAssociatedObject, getObjCClass, getPeerObject, getSuper, initObject, logRetainRelease, removeStrongRef, retainCustomObjectFromCb, setAssociatedObject, toObjCObject, toObjCObject, updateStrongRef
-
Constructor Details
-
Method Details
-
getCount
protected long getCount() -
getValues
-
checkNull
-
createAdapter
-
afterMarshaled
protected void afterMarshaled(int flags)- Overrides:
afterMarshaledin classNSObject
-
add
-
addAll
-
clear
public void clear() -
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<T extends NSObject>- Specified by:
containsAllin interfaceSet<T extends NSObject>
-
isEmpty
public boolean isEmpty() -
iterator
-
remove
-
removeAll
-
retainAll
-
size
public int size() -
toArray
-
toArray
public <U> U[] toArray(U[] a) -
asStringSet
Use this method to convert a NSSet of NSString items to a Set of String items. Elements of this NSASet must be of type NSString, otherwise an exception will be thrown.- Returns:
- Throws:
UnsupportedOperationException- when the set items are not of type NSString.
-
asStringList
-
fromStrings
-
fromStrings
-
isMember
-
objectEnumerator
-
init
protected long init(long objects, long cnt) -
any
-
init
-
init
-