Java – AbstractList Class

Java AbstractList Class methods, constructors, variables available in Java 8 release are listed below. We will publish example program on each methods ASAP.

Variables in Java AbstractList Class

S.No Variable & Description
1 protected int modCount

The number of times this list has been structurally modified.

Constructors in Java AbstractList Class

S.No Constructor & Description
1 protected AbstractList()

Sole constructor.

Methods in Java AbstractList Class

S.No Method & Description
1 boolean add(E e)

Appends the specified element to the end of this list (optional operation).
2 void add(int index, E element)

Inserts the specified element at the specified position in this list (optional operation).
3 boolean addAll(int index, Collection<? extends E> c)

Inserts all of the elements in the specified collection into this list at the specified position (optional operation).
4 void clear()

Removes all of the elements from this list (optional operation).
5 boolean equals(Object o)

Compares the specified object with this list for equality.
6 abstract E get(int index)

Returns the element at the specified position in this list.
7 int hashCode()

Returns the hash code value for this list.
8 int indexOf(Object o)

Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.
9 Iterator<E> iterator()

Returns an iterator over the elements in this list in proper sequence.
10 int lastIndexOf(Object o)

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.
11 ListIterator<E> listIterator()

Returns a list iterator over the elements in this list (in proper sequence).
12 ListIterator<E> listIterator(int index)

Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.
13 E remove(int index)

Removes the element at the specified position in this list (optional operation).
14 protected void removeRange(int fromIndex, int toIndex)

Removes from this list all of the elements whose index is between fromIndex, inclusive, and toIndex, exclusive.
15 E set(int index, E element)

Replaces the element at the specified position in this list with the specified element (optional operation).
16 List<E> subList(int fromIndex, int toIndex)

Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.

Ask your questions in eHowToNow Forum

Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers

  1. How to replace all occurrences of a string using RegEx
  2. Java – CompletableFuture Class
  3. Java – PrimitiveIterator.OfDouble Interface
  4. Java – SortedMap Interface
  5. Java – AbstractMap Class
  6. Java – ToLongBiFunction Interface
  7. Java – LongFunction Interface
  8. Java – Readable Interface
  9. Java – IntStream.Builder Interface
  10. Java – LongBinaryOperator Interface
  11. Java – ReentrantReadWriteLock.ReadLock Class
  12. Java – AbstractCollection Class
  13. Java – LongUnaryOperator Interface
  14. Java – IntBinaryOperator Interface
  15. Java – DoubleAdder Class

Be the first to comment

Leave a Reply