Class NSArray<_ObjectType>

    • Constructor Detail

      • NSArray

        protected NSArray​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static NSArray<?> alloc()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • array

        public static <_ObjectType> NSArray<?> array()
      • arrayWithArray

        public static <_ObjectType> NSArray<?> arrayWithArray​(NSArray<_ObjectType> array)
      • arrayWithContentsOfFile

        public static <_ObjectType> NSArray<_ObjectType> arrayWithContentsOfFile​(java.lang.String path)
        These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead.
      • arrayWithContentsOfURL

        public static <_ObjectType> NSArray<_ObjectType> arrayWithContentsOfURL​(NSURL url)
      • arrayWithObject

        public static <_ObjectType> NSArray<?> arrayWithObject​(_ObjectType anObject)
      • arrayWithObjects

        public static <_ObjectType> NSArray<?> arrayWithObjects​(_ObjectType firstObj,
                                                                java.lang.Object... varargs)
      • arrayWithObjectsCount

        public static <_ObjectType> NSArray<?> arrayWithObjectsCount​(org.moe.natj.general.ptr.Ptr<_ObjectType> objects,
                                                                     long cnt)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static <_ObjectType> boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • addObserverForKeyPathOptionsContext

        public void addObserverForKeyPathOptionsContext​(NSObject observer,
                                                        java.lang.String keyPath,
                                                        long options,
                                                        org.moe.natj.general.ptr.VoidPtr context)
        NSArrays are not observable, so these methods raise exceptions when invoked on NSArrays. Instead of observing an array, observe the ordered to-many relationship for which the array is the collection of related objects.
        Overrides:
        addObserverForKeyPathOptionsContext in class NSObject
      • addObserverToObjectsAtIndexesForKeyPathOptionsContext

        public void addObserverToObjectsAtIndexesForKeyPathOptionsContext​(NSObject observer,
                                                                          NSIndexSet indexes,
                                                                          java.lang.String keyPath,
                                                                          long options,
                                                                          org.moe.natj.general.ptr.VoidPtr context)
        Register or deregister as an observer of the values at a key path relative to each indexed element of the array. The options determine what is included in observer notifications and when they're sent, as described above, and the context is passed in observer notifications as described above. These are not merely convenience methods; invoking them is potentially much faster than repeatedly invoking NSObject(NSKeyValueObserverRegistration) methods. You should use -removeObserver:fromObjectsAtIndexes:forKeyPath:context: instead of -removeObserver:fromObjectsAtIndexes:forKeyPath: whenever possible for the same reason described in the NSObject(NSKeyValueObserverRegistration) comment.
      • componentsJoinedByString

        public java.lang.String componentsJoinedByString​(java.lang.String separator)
      • containsObject

        public boolean containsObject​(_ObjectType anObject)
      • copyWithZone

        public java.lang.Object copyWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • count

        public long count()
      • countByEnumeratingWithStateObjectsCount

        public long countByEnumeratingWithStateObjectsCount​(org.moe.natj.general.ptr.VoidPtr state,
                                                            org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffer,
                                                            long len)
        Specified by:
        countByEnumeratingWithStateObjectsCount in interface NSFastEnumeration
      • descriptionWithLocale

        public java.lang.String descriptionWithLocale​(java.lang.Object locale)
      • descriptionWithLocaleIndent

        public java.lang.String descriptionWithLocaleIndent​(java.lang.Object locale,
                                                            long level)
      • filteredArrayUsingPredicate

        public NSArray<_ObjectType> filteredArrayUsingPredicate​(NSPredicate predicate)
        evaluate a predicate against an array of objects and return a filtered array
      • getObjects

        public void getObjects​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> objects)
        This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead.
      • getObjectsRange

        public void getObjectsRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> objects,
                                    NSRange range)
      • indexOfObject

        public long indexOfObject​(_ObjectType anObject)
      • indexOfObjectInRange

        public long indexOfObjectInRange​(_ObjectType anObject,
                                         NSRange range)
      • indexOfObjectIdenticalTo

        public long indexOfObjectIdenticalTo​(_ObjectType anObject)
      • indexOfObjectIdenticalToInRange

        public long indexOfObjectIdenticalToInRange​(_ObjectType anObject,
                                                    NSRange range)
      • initWithContentsOfFile

        public NSArray<_ObjectType> initWithContentsOfFile​(java.lang.String path)
      • initWithObjects

        public NSArray<?> initWithObjects​(_ObjectType firstObj,
                                          java.lang.Object... varargs)
      • initWithObjectsCount

        public NSArray<?> initWithObjectsCount​(org.moe.natj.general.ptr.Ptr<_ObjectType> objects,
                                               long cnt)
      • makeObjectsPerformSelector

        public void makeObjectsPerformSelector​(org.moe.natj.objc.SEL aSelector)
      • makeObjectsPerformSelectorWithObject

        public void makeObjectsPerformSelectorWithObject​(org.moe.natj.objc.SEL aSelector,
                                                         java.lang.Object argument)
      • mutableCopyWithZone

        public java.lang.Object mutableCopyWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        mutableCopyWithZone in interface NSMutableCopying
      • objectAtIndex

        public _ObjectType objectAtIndex​(long index)
      • objectAtIndexedSubscript

        public _ObjectType objectAtIndexedSubscript​(long idx)
      • pathsMatchingExtensions

        public NSArray<java.lang.String> pathsMatchingExtensions​(NSArray<java.lang.String> filterTypes)
      • removeObserverForKeyPathContext

        public void removeObserverForKeyPathContext​(NSObject observer,
                                                    java.lang.String keyPath,
                                                    org.moe.natj.general.ptr.VoidPtr context)
        Overrides:
        removeObserverForKeyPathContext in class NSObject
      • removeObserverFromObjectsAtIndexesForKeyPath

        public void removeObserverFromObjectsAtIndexesForKeyPath​(NSObject observer,
                                                                 NSIndexSet indexes,
                                                                 java.lang.String keyPath)
      • removeObserverFromObjectsAtIndexesForKeyPathContext

        public void removeObserverFromObjectsAtIndexesForKeyPathContext​(NSObject observer,
                                                                        NSIndexSet indexes,
                                                                        java.lang.String keyPath,
                                                                        org.moe.natj.general.ptr.VoidPtr context)
      • setValueForKey

        public void setValueForKey​(java.lang.Object value,
                                   java.lang.String key)
        Invoke -setValue:forKey: on each of the receiver's elements.
        Overrides:
        setValueForKey in class NSObject
      • shuffledArray

        public NSArray<_ObjectType> shuffledArray()
        Returns a shuffled instance of this array using the systems underlying random source, as with [GKRandomSource sharedRandom]
      • shuffledArrayWithRandomSource

        public NSArray<_ObjectType> shuffledArrayWithRandomSource​(GKRandomSource randomSource)
        Returns a shuffled instance of this array using the given random source.
      • sortedArrayHint

        public NSData sortedArrayHint()
      • sortedArrayUsingSelector

        public NSArray<_ObjectType> sortedArrayUsingSelector​(org.moe.natj.objc.SEL comparator)
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • valueForKey

        public java.lang.Object valueForKey​(java.lang.String key)
        Return an array containing the results of invoking -valueForKey: on each of the receiver's elements. The returned array will contain NSNull elements for each instance of -valueForKey: returning nil.
        Overrides:
        valueForKey in class NSObject
      • writeToFileAtomically

        public boolean writeToFileAtomically​(java.lang.String path,
                                             boolean useAuxiliaryFile)
      • writeToURLAtomically

        public boolean writeToURLAtomically​(NSURL url,
                                            boolean atomically)
      • add

        public boolean add​(_ObjectType e)
        Specified by:
        add in interface java.util.Collection<_ObjectType>
        Specified by:
        add in interface java.util.List<_ObjectType>
      • add

        public void add​(int index,
                        _ObjectType element)
        Specified by:
        add in interface java.util.List<_ObjectType>
      • addAll

        public boolean addAll​(java.util.Collection<? extends _ObjectType> c)
        Specified by:
        addAll in interface java.util.Collection<_ObjectType>
        Specified by:
        addAll in interface java.util.List<_ObjectType>
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends _ObjectType> c)
        Specified by:
        addAll in interface java.util.List<_ObjectType>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<_ObjectType>
        Specified by:
        clear in interface java.util.List<_ObjectType>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<_ObjectType>
        Specified by:
        contains in interface java.util.List<_ObjectType>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<_ObjectType>
        Specified by:
        containsAll in interface java.util.List<_ObjectType>
      • indexOf

        public int indexOf​(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List<_ObjectType>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<_ObjectType>
        Specified by:
        isEmpty in interface java.util.List<_ObjectType>
      • iterator

        public java.util.Iterator<_ObjectType> iterator()
        Specified by:
        iterator in interface java.util.Collection<_ObjectType>
        Specified by:
        iterator in interface java.lang.Iterable<_ObjectType>
        Specified by:
        iterator in interface java.util.List<_ObjectType>
      • lastIndexOf

        public int lastIndexOf​(java.lang.Object o)
        Specified by:
        lastIndexOf in interface java.util.List<_ObjectType>
      • listIterator

        public java.util.ListIterator<_ObjectType> listIterator()
        Specified by:
        listIterator in interface java.util.List<_ObjectType>
      • listIterator

        public java.util.ListIterator<_ObjectType> listIterator​(int index)
        Specified by:
        listIterator in interface java.util.List<_ObjectType>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<_ObjectType>
        Specified by:
        remove in interface java.util.List<_ObjectType>
      • remove

        public _ObjectType remove​(int index)
        Specified by:
        remove in interface java.util.List<_ObjectType>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<_ObjectType>
        Specified by:
        removeAll in interface java.util.List<_ObjectType>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<_ObjectType>
        Specified by:
        retainAll in interface java.util.List<_ObjectType>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<_ObjectType>
        Specified by:
        size in interface java.util.List<_ObjectType>
      • subList

        public java.util.List<_ObjectType> subList​(int fromIndex,
                                                   int toIndex)
        Specified by:
        subList in interface java.util.List<_ObjectType>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<_ObjectType>
        Specified by:
        toArray in interface java.util.List<_ObjectType>
      • toArray

        public java.lang.Object[] toArray​(java.lang.Object[] a)
        Specified by:
        toArray in interface java.util.Collection<_ObjectType>
        Specified by:
        toArray in interface java.util.List<_ObjectType>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<_ObjectType>
        Specified by:
        hashCode in interface java.util.List<_ObjectType>
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<_ObjectType>
        Specified by:
        equals in interface java.util.List<_ObjectType>
        Overrides:
        equals in class org.moe.natj.objc.ObjCObject
      • arrayWithContentsOfURLError

        public static <_ObjectType> NSArray<_ObjectType> arrayWithContentsOfURLError​(NSURL url,
                                                                                     org.moe.natj.general.ptr.Ptr<NSError> error)
        Reads array stored in NSPropertyList format from the specified url.
      • initWithContentsOfURLError

        public NSArray<_ObjectType> initWithContentsOfURLError​(NSURL url,
                                                               org.moe.natj.general.ptr.Ptr<NSError> error)
        Reads array stored in NSPropertyList format from the specified url.
      • writeToURLError

        public boolean writeToURLError​(NSURL url,
                                       org.moe.natj.general.ptr.Ptr<NSError> error)
        Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly.