java.util
Class AbstractList
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
- All Implemented Interfaces:
- Collection, List
- Direct Known Subclasses:
- AbstractSequentialList, ArrayList, Vector
- public abstract synchronized class AbstractList
- extends AbstractCollection
- implements List
Methods inherited from class java.util.AbstractCollection |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString |
modCount
protected transient int modCount
AbstractList
protected AbstractList()
add
public boolean add(Object)
- Specified by:
add
in interface List
- Overrides:
add
in class AbstractCollection
get
public abstract Object get(int)
- Specified by:
get
in interface List
set
public Object set(int,
Object)
- Specified by:
set
in interface List
add
public void add(int,
Object)
- Specified by:
add
in interface List
remove
public Object remove(int)
- Specified by:
remove
in interface List
indexOf
public int indexOf(Object)
- Specified by:
indexOf
in interface List
lastIndexOf
public int lastIndexOf(Object)
- Specified by:
lastIndexOf
in interface List
clear
public void clear()
- Specified by:
clear
in interface List
- Overrides:
clear
in class AbstractCollection
addAll
public boolean addAll(int,
Collection)
- Specified by:
addAll
in interface List
iterator
public Iterator iterator()
- Specified by:
iterator
in interface List
- Specified by:
iterator
in class AbstractCollection
listIterator
public ListIterator listIterator()
- Specified by:
listIterator
in interface List
listIterator
public ListIterator listIterator(int)
- Specified by:
listIterator
in interface List
subList
public List subList(int,
int)
- Specified by:
subList
in interface List
equals
public boolean equals(Object)
- Description copied from class:
Object
- Determines if this object is "equal" to another object.
In general, objects should be instances of the same class
with the same guts to be considered equal. For example,
the code below only prints same value since
s
and t
are different strings though
they have the same value: "hello".
String s = new String("hello");
String t = new String("hello");
if (s.equals(t)) System.out.println("same value");
if (s == t) System.out.println("same string");
- Specified by:
equals
in interface List
- Overrides:
equals
in class Object
- Following copied from class:
java.lang.Object
- Parameters:
is
- the other Object to which this one is compared- Returns:
- true if this Object is equal to
other
hashCode
public int hashCode()
- Specified by:
hashCode
in interface List
- Overrides:
hashCode
in class Object
removeRange
protected void removeRange(int,
int)