public class NonGenericList extends Object implements List
Non generic list of objects
| Constructor and Description |
|---|
NonGenericList(List list)
Initializes a new instance of the
NonGenericList class. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object element) |
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
boolean |
addAll(int index,
Collection c) |
int |
addItem(Object value)
Adds an item to the
System.Collections.IList. |
void |
clear()
Removes all items from the
System.Collections.IList. |
boolean |
contains(Object value)
Determines whether the
System.Collections.IList contains a specific value. |
boolean |
containsAll(Collection c) |
Object |
get(int index)
Gets the element at the specified index.
|
List |
getList() |
int |
indexOf(Object value)
Determines the index of a specific item in the
System.Collections.IList. |
void |
insertItem(int index,
Object value)
Inserts an item to the
System.Collections.IList at the specified index. |
boolean |
isEmpty() |
Iterator |
iterator()
Returns an enumerator that iterates through a collection.
|
int |
lastIndexOf(Object o) |
ListIterator<Object> |
listIterator() |
ListIterator<Object> |
listIterator(int index) |
Object |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
void |
removeAt(int index)
Removes the
System.Collections.IList item at the specified index. |
void |
removeItem(Object value)
Removes the first occurrence of a specific object from the
System.Collections.IList. |
boolean |
retainAll(Collection c) |
Object |
set(int index,
Object value)
Sets the element at the specified index.
|
int |
size()
Gets the number of elements contained in the
System.Collections.ICollection. |
List<Object> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, replaceAll, sort, spliteratorparallelStream, removeIf, streampublic NonGenericList(List list)
Initializes a new instance of the NonGenericList class.
list - The list - container of objects.public List getList()
public int addItem(Object value)
Adds an item to the System.Collections.IList.
value - The System.Object to add to the System.Collections.IList.public void clear()
Removes all items from the System.Collections.IList.
clear in interface Collectionclear in interface Listpublic boolean contains(Object value)
Determines whether the System.Collections.IList contains a specific value.
contains in interface Collectioncontains in interface Listvalue - The System.Object to locate in the System.Collections.IList.System.Object is found in the System.Collections.IList; otherwise, false.public int indexOf(Object value)
Determines the index of a specific item in the System.Collections.IList.
public void insertItem(int index,
Object value)
Inserts an item to the System.Collections.IList at the specified index.
index - The zero-based index at which value should be inserted.value - The System.Object to insert into the System.Collections.IList.public Object get(int index)
Gets the element at the specified index.
public void removeItem(Object value)
Removes the first occurrence of a specific object from the System.Collections.IList.
value - The System.Object to remove from the System.Collections.IList.public void removeAt(int index)
Removes the System.Collections.IList item at the specified index.
index - The zero-based index of the item to remove.public int size()
Gets the number of elements contained in the System.Collections.ICollection.
size in interface Collectionsize in interface Listpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface Listpublic Object[] toArray()
toArray in interface CollectiontoArray in interface Listpublic boolean add(Object o)
add in interface Collectionadd in interface Listpublic boolean remove(Object o)
remove in interface Collectionremove in interface Listpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface Listpublic boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface Listpublic boolean addAll(int index,
Collection c)
public boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface Listpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface Listpublic int lastIndexOf(Object o)
lastIndexOf in interface Listpublic ListIterator<Object> listIterator()
listIterator in interface Listpublic ListIterator<Object> listIterator(int index)
listIterator in interface Listpublic Iterator iterator()
Returns an enumerator that iterates through a collection.
Copyright (c) 2008-2022 Aspose Pty Ltd. All Rights Reserved.