com.github.andrewoma.dexx.collection.internal.base
Class AbstractList<E>

java.lang.Object
  extended by com.github.andrewoma.dexx.collection.internal.base.AbstractTraversable<E>
      extended by com.github.andrewoma.dexx.collection.internal.base.AbstractIterable<E>
          extended by com.github.andrewoma.dexx.collection.internal.base.AbstractList<E>
All Implemented Interfaces:
List<E>, Traversable<E>, Iterable<E>
Direct Known Subclasses:
AbstractIndexedList, AbstractLinkedList

public abstract class AbstractList<E>
extends AbstractIterable<E>
implements List<E>


Constructor Summary
AbstractList()
           
 
Method Summary
 List<E> asList()
          Returns an immutable view of this list as an instance of java.util.List.
 boolean equals(Object other)
           
 int hashCode()
           
 int indexOf(E elem)
          Returns the index of the first occurrence of the specified element in the list or -1 if there are no occurrences.
 int lastIndexOf(E elem)
          Returns the index of the last occurrence of the specified element in the list or -1 if there are no occurrences.
 
Methods inherited from class com.github.andrewoma.dexx.collection.internal.base.AbstractIterable
forEach
 
Methods inherited from class com.github.andrewoma.dexx.collection.internal.base.AbstractTraversable
isEmpty, makeString, makeString, size, to, toArray, toArray, toIndexedList, toSet, toSortedSet, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.github.andrewoma.dexx.collection.List
append, drop, first, get, last, prepend, range, set, tail, take
 
Methods inherited from interface com.github.andrewoma.dexx.collection.Iterable
iterator
 
Methods inherited from interface com.github.andrewoma.dexx.collection.Traversable
forEach, isEmpty, makeString, makeString, size, to, toArray, toArray, toIndexedList, toSet, toSortedSet
 

Constructor Detail

AbstractList

public AbstractList()
Method Detail

indexOf

public int indexOf(E elem)
Description copied from interface: List
Returns the index of the first occurrence of the specified element in the list or -1 if there are no occurrences.

Specified by:
indexOf in interface List<E>

lastIndexOf

public int lastIndexOf(E elem)
Description copied from interface: List
Returns the index of the last occurrence of the specified element in the list or -1 if there are no occurrences.

Specified by:
lastIndexOf in interface List<E>

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

asList

@NotNull
public List<E> asList()
Description copied from interface: List
Returns an immutable view of this list as an instance of java.util.List.

Specified by:
asList in interface List<E>


Copyright © 2014. All Rights Reserved.