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
com.webobjects.foundation.NSCoding._BigDecimalSupport, com.webobjects.foundation.NSCoding._BigIntegerSupport, com.webobjects.foundation.NSCoding._BooleanSupport, com.webobjects.foundation.NSCoding._ByteSupport, com.webobjects.foundation.NSCoding._CharacterSupport, com.webobjects.foundation.NSCoding._DateSupport, com.webobjects.foundation.NSCoding._DoubleSupport, com.webobjects.foundation.NSCoding._FloatSupport, com.webobjects.foundation.NSCoding._IntegerSupport, com.webobjects.foundation.NSCoding._LongSupport, com.webobjects.foundation.NSCoding._NumberSupport, com.webobjects.foundation.NSCoding._ShortSupport, com.webobjects.foundation.NSCoding._StringSupport, com.webobjects.foundation.NSCoding.Support
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.MapImplementation, com.webobjects.foundation.NSKeyValueCoding.Null<T>, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.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
Constructor and Description |
---|
NSMutableArray() |
NSMutableArray(Collection<? extends E> collection) |
NSMutableArray(E object) |
NSMutableArray(E[] objects) |
NSMutableArray(E[] objects,
com.webobjects.foundation.NSRange range) |
NSMutableArray(E object,
E... objects) |
NSMutableArray(int capacity) |
NSMutableArray(List<? extends E> list,
com.webobjects.foundation.NSRange range,
boolean ignoreNull) |
NSMutableArray(NSArray<? extends E> otherArray) |
NSMutableArray(Vector<? extends E> vector,
com.webobjects.foundation.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,
com.webobjects.foundation.NSRange range) |
E |
removeLastObject() |
boolean |
removeObject(Object object) |
boolean |
removeObject(Object object,
com.webobjects.foundation.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(com.webobjects.foundation.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(com.webobjects.foundation.NSRange range,
NSArray<? extends E> otherArray,
com.webobjects.foundation.NSRange otherRange) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E element) |
void |
setArray(NSArray<? extends E> otherArray) |
void |
sortUsingComparator(com.webobjects.foundation.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, 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)
public NSMutableArray(E[] objects, com.webobjects.foundation.NSRange range)
public NSMutableArray(Vector<? extends E> vector, com.webobjects.foundation.NSRange range, boolean ignoreNull)
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(com.webobjects.foundation.NSComparator comparator) throws com.webobjects.foundation.NSComparator.ComparisonException
com.webobjects.foundation.NSComparator.ComparisonException
public void replaceObjectsInRange(com.webobjects.foundation.NSRange range, NSArray<? extends E> otherArray, com.webobjects.foundation.NSRange otherRange)
public E removeLastObject()
public boolean removeObject(Object object)
public boolean removeObject(Object object, com.webobjects.foundation.NSRange range)
public boolean removeIdenticalObject(Object object)
public boolean removeIdenticalObject(Object object, com.webobjects.foundation.NSRange range)
public void removeObjectsInArray(NSArray<?> otherArray)
public void removeObjectsInRange(com.webobjects.foundation.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 – 2020 Project Wonder.