E
- type of array contentspublic class NSMutableArray<E> extends NSArray<E> implements RandomAccess
It fixes a lot of issues:
anArray.add(anObject)
_EOCheapCopyMutableArray
次の問題を対応しています:
anArray.add(anObject)
が可能
_EOCheapCopyMutableArray
でのフォルトはトリーガされない問題のバッグフィックス
NSArray._AvgNumberOperator, NSArray._CountOperator, NSArray._MaxOperator, NSArray._MinOperator, NSArray._Operator, NSArray._SumNumberOperator, NSArray.Operator
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
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
Modifier and Type | Field and Description |
---|---|
protected int |
_capacity |
static Class |
_CLASS |
protected int |
_count |
protected Object[] |
_objectsCache |
static Object |
ERX_MARKER |
protected int |
modCount |
_hashCache, _NSArrayClassHashCode, _objects, AverageOperatorName, CheckForNull, CountOperatorName, EmptyArray, IgnoreNull, MaximumOperatorName, MinimumOperatorName, NotFound, SumOperatorName
_KeyPathSeparatorChar, KeyPathSeparator
NullValue
Constructor and Description |
---|
NSMutableArray() |
NSMutableArray(Collection<? extends E> collection) |
NSMutableArray(E object) |
NSMutableArray(E[] objects) |
NSMutableArray(E[] objects,
NSRange range) |
NSMutableArray(E object,
E... objects) |
NSMutableArray(int capacity) |
NSMutableArray(List<? extends E> list,
NSRange range,
boolean ignoreNull) |
NSMutableArray(NSArray<? extends E> otherArray) |
NSMutableArray(Vector<? extends E> vector,
NSRange range,
boolean ignoreNull) |
Modifier and Type | Method and Description |
---|---|
protected void |
_ensureCapacity(int capacity) |
protected void |
_initializeWithCapacity(int capacity) |
void |
_moveObjectAtIndexToIndex(int sourceIndex,
int destIndex) |
protected void |
_setCount(int count) |
boolean |
add(E element) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> collection) |
boolean |
addAll(int index,
Collection<? extends E> collection) |
void |
addObject(E object) |
void |
addObjects(E... objects) |
void |
addObjectsFromArray(NSArray<? extends E> otherArray) |
void |
clear() |
Object |
clone() |
int |
count() |
void |
ensureCapacity(int capacity) |
NSArray<E> |
immutableClone() |
void |
insertObjectAtIndex(E object,
int index) |
Iterator<E> |
iterator() |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
NSMutableArray<E> |
mutableClone() |
protected Object[] |
objectsNoCopy() |
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> collection) |
void |
removeAllObjects() |
boolean |
removeIdenticalObject(Object object) |
boolean |
removeIdenticalObject(Object object,
NSRange range) |
E |
removeLastObject() |
boolean |
removeObject(Object object) |
boolean |
removeObject(Object object,
NSRange range) |
E |
removeObjectAtIndex(int index) |
void |
removeObjects(Object... otherObjects)
Much faster implementation of the remove method for larger arrays.
|
void |
removeObjectsInArray(NSArray<?> otherArray) |
void |
removeObjectsInRange(NSRange range) |
protected void |
removeRange(int fromIndex,
int toIndex) |
E |
replaceObjectAtIndex(E object,
int index)
Clears the objectsNoCopy too.
|
void |
replaceObjectAtIndex(int index,
E object)
Deprecated.
|
void |
replaceObjectsInRange(NSRange range,
NSArray<? extends E> otherArray,
NSRange otherRange) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E element) |
void |
setArray(NSArray<? extends E> otherArray) |
void |
sortUsingComparator(NSComparator comparator) |
List<E> |
subList(int fromIndex,
int toIndex) |
<T> T[] |
toArray(T[] array)
Bugfix for the broken implementation in NSArray.
|
void |
trimToSize() |
_mustRecomputeHash, _mutableComponentsSeparatedByString, _objects, _setMustRecomputeHash, _setObjects, _shallowHashCode, arrayByAddingObject, arrayByAddingObjectsFromArray, arrayList, classForCoder, componentsJoinedByString, componentsSeparatedByString, contains, containsAll, containsObject, decodeObject, emptyArray, encodeWithCoder, equals, firstObjectCommonWithArray, get, getObjects, getObjects, hashCode, indexOf, indexOfIdenticalObject, indexOfIdenticalObject, indexOfObject, indexOfObject, isEmpty, isEqualToArray, lastIndexOf, lastObject, makeObjectsPerformSelector, objectAtIndex, objectEnumerator, objects, objects, of, of, of, operatorForKey, operatorNames, removeOperatorForKey, reverseObjectEnumerator, setOperatorForKey, size, sortedArrayUsingComparator, sortedArrayUsingSelector, subarrayWithRange, takeValueForKey, takeValueForKeyPath, toArray, toString, valueForKey, valueForKey, valueForKey, valueForKeyPath, valueForKeyPath, vector
finalize, getClass, notify, notifyAll, wait, wait, wait
replaceAll, sort, spliterator
parallelStream, removeIf, stream
public static final Class _CLASS
public static final Object ERX_MARKER
protected transient int modCount
protected transient int _capacity
protected transient Object[] _objectsCache
protected transient int _count
public NSMutableArray()
public NSMutableArray(Collection<? extends E> collection)
public NSMutableArray(int capacity)
public NSMutableArray(E object)
public NSMutableArray(E[] objects)
protected void _initializeWithCapacity(int capacity)
_initializeWithCapacity
in class NSArray<E>
protected void _ensureCapacity(int capacity)
public void ensureCapacity(int capacity)
public void trimToSize()
protected Object[] objectsNoCopy()
objectsNoCopy
in class NSArray<E>
public void addObject(E object)
public void addObjects(E... objects)
@Deprecated public void replaceObjectAtIndex(int index, E object)
replaceObjectAtIndex(Object, int)
public void insertObjectAtIndex(E object, int index)
public E removeObjectAtIndex(int index)
public void removeAllObjects()
public void sortUsingComparator(NSComparator comparator) throws NSComparator.ComparisonException
NSComparator.ComparisonException
public void replaceObjectsInRange(NSRange range, NSArray<? extends E> otherArray, NSRange otherRange)
public E removeLastObject()
public boolean removeObject(Object object)
public boolean removeIdenticalObject(Object object)
public void removeObjectsInArray(NSArray<?> otherArray)
public void removeObjectsInRange(NSRange range)
public NSArray<E> immutableClone()
immutableClone
in class NSArray<E>
public NSMutableArray<E> mutableClone()
mutableClone
in class NSArray<E>
public void _moveObjectAtIndexToIndex(int sourceIndex, int destIndex)
public E replaceObjectAtIndex(E object, int index)
object
- the replacement objectindex
- index of object to replacepublic void removeObjects(Object... otherObjects)
otherObjects
- objects to removepublic <T> T[] toArray(T[] array)
public void add(int index, E element)
public boolean add(E element)
public boolean addAll(Collection<? extends E> collection)
public boolean addAll(int index, Collection<? extends E> collection)
public E remove(int index)
public boolean remove(Object o)
public void clear()
public boolean retainAll(Collection<?> c)
public boolean removeAll(Collection<?> collection)
public ListIterator<E> listIterator()
listIterator
in interface List<E>
listIterator
in class NSArray<E>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
listIterator
in class NSArray<E>
protected void removeRange(int fromIndex, int toIndex)
Copyright © 2002 – 2024 Project Wonder.