java.util
Class Collections.CopiesList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Collections.CopiesList
All Implemented Interfaces:
Collection, List, RandomAccess, Serializable
Enclosing class:
Collections

private static class Collections.CopiesList
extends AbstractList
implements RandomAccess, Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.AbstractList
 
Field Summary
(package private)  Object element
           
(package private)  int n
           
(package private) static long serialVersionUID
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
(package private) Collections.CopiesList(int n, Object o)
           
 
Method Summary
 boolean contains(Object obj)
          Returns true if this list contains the specified element.
 Object get(int index)
          Returns the element at the specified position in this list.
 int size()
          Returns the number of elements in this list.
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

n

int n

element

Object element
Constructor Detail

Collections.CopiesList

Collections.CopiesList(int n,
                       Object o)
Method Detail

size

public int size()
Description copied from interface: List
Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Specified by:
size in interface List
Specified by:
size in class AbstractCollection
Returns:
the number of elements in this collection.

contains

public boolean contains(Object obj)
Description copied from interface: List
Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that (o==null ? e==null : o.equals(e)).

Specified by:
contains in interface List
Overrides:
contains in class AbstractCollection
Parameters:
obj - object to be checked for containment in this collection.
Returns:
true if this collection contains the specified element.

get

public Object get(int index)
Description copied from class: AbstractList
Returns the element at the specified position in this list.

Specified by:
get in interface List
Specified by:
get in class AbstractList
Parameters:
index - index of element to return.
Returns:
the element at the specified position in this list.