Class MappingElementUniqueList
java.lang.Object
java.util.AbstractCollection<MappingElementIF>
java.util.AbstractList<MappingElementIF>
de.mid.innovator.m2msdk.model.transformation.MappingElementUniqueList
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<MappingElementIF>,Collection<MappingElementIF>,List<MappingElementIF>,RandomAccess,SequencedCollection<MappingElementIF>
public class MappingElementUniqueList
extends AbstractList<MappingElementIF>
implements RandomAccess, Cloneable, Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMappingElementUniqueList(int initialCapacity) Constructs an empty list with the specified initial capacity.MappingElementUniqueList(MappingElementIF iElement) Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, MappingElementIF element) booleanbooleanaddAll(int index, Collection<? extends MappingElementIF> c) booleanaddAll(Collection<? extends MappingElementIF> c) voidclear()clone()Returns a shallow copy of thisArrayListinstance.booleanvoidensureCapacity(int minCapacity) Increases the capacity of thisArrayListinstance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.get(int index) Returns the element at the specified position in this list.intReturns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.booleanisEmpty()Returns true if this list contains no elements.intReturns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) set(int index, MappingElementIF element) Replaces the element at the specified position in this list with the specified element.intsize()Returns the number of elements in this list.Object[]toArray()Returns an array containing all of the elements in this list in proper sequence (from first to last element).toArray(MappingElementIF[] a) Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array.toList()toString()voidTrims the capacity of thisArrayListinstance to be the list's current size.Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subListMethods inherited from class java.util.AbstractCollection
containsAll, toArrayMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, containsAll, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator, toArray
-
Constructor Details
-
MappingElementUniqueList
public MappingElementUniqueList(int initialCapacity) Constructs an empty list with the specified initial capacity.- Parameters:
initialCapacity- the initial capacity of the list- Throws:
IllegalArgumentException- if the specified initial capacity is negative
-
MappingElementUniqueList
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.- Parameters:
c- the collection whose elements are to be placed into this list- Throws:
NullPointerException- if the specified collection is null
-
MappingElementUniqueList
public MappingElementUniqueList() -
MappingElementUniqueList
-
-
Method Details
-
trimToSize
public void trimToSize()Trims the capacity of thisArrayListinstance to be the list's current size. An application can use this operation to minimize the storage of anArrayListinstance. -
ensureCapacity
public void ensureCapacity(int minCapacity) Increases the capacity of thisArrayListinstance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.- Parameters:
minCapacity- the desired minimum capacity
-
size
public int size()Returns the number of elements in this list.- Specified by:
sizein interfaceCollection<MappingElementIF>- Specified by:
sizein interfaceList<MappingElementIF>- Specified by:
sizein classAbstractCollection<MappingElementIF>- Returns:
- the number of elements in this list
-
isEmpty
public boolean isEmpty()Returns true if this list contains no elements.- Specified by:
isEmptyin interfaceCollection<MappingElementIF>- Specified by:
isEmptyin interfaceList<MappingElementIF>- Overrides:
isEmptyin classAbstractCollection<MappingElementIF>- Returns:
- true if this list contains no elements
-
indexOf
Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the lowest indexisuch that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.- Specified by:
indexOfin interfaceList<MappingElementIF>- Overrides:
indexOfin classAbstractList<MappingElementIF>
-
lastIndexOf
Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the highest indexisuch that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.- Specified by:
lastIndexOfin interfaceList<MappingElementIF>- Overrides:
lastIndexOfin classAbstractList<MappingElementIF>
-
clone
Returns a shallow copy of thisArrayListinstance. (The elements themselves are not copied.)- Returns:
- a clone of this
ArrayListinstance
-
toArray
Returns an array containing all of the elements in this list in proper sequence (from first to last element).The returned array will be "safe" in that no references to it are maintained by this list. (In other words, this method must allocate a new array). The caller is thus free to modify the returned array.
This method acts as bridge between array-based and collection-based APIs.
- Specified by:
toArrayin interfaceCollection<MappingElementIF>- Specified by:
toArrayin interfaceList<MappingElementIF>- Overrides:
toArrayin classAbstractCollection<MappingElementIF>- Returns:
- an array containing all of the elements in this list in proper sequence
-
toArray
Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list.If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), the element in the array immediately following the end of the collection is set to null. (This is useful in determining the length of the list only if the caller knows that the list does not contain any null elements.)
- Parameters:
a- the array into which the elements of the list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.- Returns:
- an array containing the elements of the list
- Throws:
ArrayStoreException- if the runtime type of the specified array is not a supertype of the runtime type of every element in this listNullPointerException- if the specified array is null
-
get
Returns the element at the specified position in this list.- Specified by:
getin interfaceList<MappingElementIF>- Specified by:
getin classAbstractList<MappingElementIF>- Parameters:
index- index of the element to return- Returns:
- the element at the specified position in this list
-
set
Replaces the element at the specified position in this list with the specified element.- Specified by:
setin interfaceList<MappingElementIF>- Overrides:
setin classAbstractList<MappingElementIF>- Parameters:
index- index of the element to replaceelement- element to be stored at the specified position- Returns:
- the element previously at the specified position
-
toList
-
add
- Specified by:
addin interfaceList<MappingElementIF>- Overrides:
addin classAbstractList<MappingElementIF>
-
add
- Specified by:
addin interfaceCollection<MappingElementIF>- Specified by:
addin interfaceList<MappingElementIF>- Overrides:
addin classAbstractList<MappingElementIF>
-
addAll
- Specified by:
addAllin interfaceCollection<MappingElementIF>- Specified by:
addAllin interfaceList<MappingElementIF>- Overrides:
addAllin classAbstractCollection<MappingElementIF>
-
addAll
- Specified by:
addAllin interfaceList<MappingElementIF>- Overrides:
addAllin classAbstractList<MappingElementIF>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<MappingElementIF>- Specified by:
clearin interfaceList<MappingElementIF>- Overrides:
clearin classAbstractList<MappingElementIF>
-
remove
- Specified by:
removein interfaceList<MappingElementIF>- Overrides:
removein classAbstractList<MappingElementIF>
-
remove
- Specified by:
removein interfaceCollection<MappingElementIF>- Specified by:
removein interfaceList<MappingElementIF>- Overrides:
removein classAbstractCollection<MappingElementIF>
-
removeAll
- Specified by:
removeAllin interfaceCollection<MappingElementIF>- Specified by:
removeAllin interfaceList<MappingElementIF>- Overrides:
removeAllin classAbstractCollection<MappingElementIF>
-
retainAll
- Specified by:
retainAllin interfaceCollection<MappingElementIF>- Specified by:
retainAllin interfaceList<MappingElementIF>- Overrides:
retainAllin classAbstractCollection<MappingElementIF>
-
toString
- Overrides:
toStringin classAbstractCollection<MappingElementIF>
-
contains
- Specified by:
containsin interfaceCollection<MappingElementIF>- Specified by:
containsin interfaceList<MappingElementIF>- Overrides:
containsin classAbstractCollection<MappingElementIF>
-