Class NSSet<T extends NSObject>

    • Constructor Detail

      • NSSet

        public NSSet()
      • NSSet

        public NSSet​(java.util.Collection<T> c)
      • NSSet

        public NSSet​(T... objects)
    • Method Detail

      • getCount

        protected long getCount()
      • getValues

        public NSArray<T> getValues()
      • checkNull

        protected static void checkNull​(java.lang.Object o)
      • createAdapter

        protected java.util.AbstractSet<T> createAdapter()
      • add

        public boolean add​(T e)
        Specified by:
        add in interface java.util.Collection<T extends NSObject>
        Specified by:
        add in interface java.util.Set<T extends NSObject>
      • addAll

        public boolean addAll​(java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.Collection<T extends NSObject>
        Specified by:
        addAll in interface java.util.Set<T extends NSObject>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<T extends NSObject>
        Specified by:
        clear in interface java.util.Set<T extends NSObject>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<T extends NSObject>
        Specified by:
        contains in interface java.util.Set<T extends NSObject>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<T extends NSObject>
        Specified by:
        containsAll in interface java.util.Set<T extends NSObject>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<T extends NSObject>
        Specified by:
        isEmpty in interface java.util.Set<T extends NSObject>
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T extends NSObject>
        Specified by:
        iterator in interface java.lang.Iterable<T extends NSObject>
        Specified by:
        iterator in interface java.util.Set<T extends NSObject>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<T extends NSObject>
        Specified by:
        remove in interface java.util.Set<T extends NSObject>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<T extends NSObject>
        Specified by:
        removeAll in interface java.util.Set<T extends NSObject>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<T extends NSObject>
        Specified by:
        retainAll in interface java.util.Set<T extends NSObject>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<T extends NSObject>
        Specified by:
        size in interface java.util.Set<T extends NSObject>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<T extends NSObject>
        Specified by:
        toArray in interface java.util.Set<T extends NSObject>
      • toArray

        public <U> U[] toArray​(U[] a)
        Specified by:
        toArray in interface java.util.Collection<T extends NSObject>
        Specified by:
        toArray in interface java.util.Set<T extends NSObject>
      • asStringSet

        public java.util.Set<java.lang.String> 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:
        java.lang.UnsupportedOperationException - when the set items are not of type NSString.
      • asStringList

        public java.util.List<java.lang.String> asStringList()
      • fromStrings

        public static NSSet<NSString> fromStrings​(java.lang.String... strings)
      • fromStrings

        public static NSSet<NSString> fromStrings​(java.util.Collection<java.lang.String> strings)
      • objectEnumerator

        protected NSEnumerator<T> objectEnumerator()
      • init

        protected long init​(long objects,
                            long cnt)
      • any

        public T any()
      • init

        protected long init​(NSSet<?> set)
      • init

        protected long init​(NSArray<?> array)