Package sleep.engine.types
Class MyLinkedList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.AbstractSequentialList
-
- sleep.engine.types.MyLinkedList
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable
,java.util.Collection
,java.util.List
public class MyLinkedList extends java.util.AbstractSequentialList implements java.lang.Cloneable, java.io.Serializable, java.util.List
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MyLinkedList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, java.lang.Object element)
add an object to the list at the specified indexboolean
add(java.lang.Object o)
add an object to the listvoid
checkSafety()
java.lang.Object
get(int index)
get an object from the linked listjava.util.ListIterator
listIterator(int index)
java.lang.Object
remove(int index)
remove an object at the specified indexint
size()
java.util.List
subList(int beginAt, int endAt)
-
Methods inherited from class java.util.AbstractList
clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection
- Specified by:
size
in interfacejava.util.List
- Specified by:
size
in classjava.util.AbstractCollection
-
subList
public java.util.List subList(int beginAt, int endAt)
- Specified by:
subList
in interfacejava.util.List
- Overrides:
subList
in classjava.util.AbstractList
-
add
public boolean add(java.lang.Object o)
add an object to the list- Specified by:
add
in interfacejava.util.Collection
- Specified by:
add
in interfacejava.util.List
- Overrides:
add
in classjava.util.AbstractList
-
add
public void add(int index, java.lang.Object element)
add an object to the list at the specified index- Specified by:
add
in interfacejava.util.List
- Overrides:
add
in classjava.util.AbstractSequentialList
-
get
public java.lang.Object get(int index)
get an object from the linked list- Specified by:
get
in interfacejava.util.List
- Overrides:
get
in classjava.util.AbstractSequentialList
-
remove
public java.lang.Object remove(int index)
remove an object at the specified index- Specified by:
remove
in interfacejava.util.List
- Overrides:
remove
in classjava.util.AbstractSequentialList
-
listIterator
public java.util.ListIterator listIterator(int index)
- Specified by:
listIterator
in interfacejava.util.List
- Specified by:
listIterator
in classjava.util.AbstractSequentialList
-
checkSafety
public void checkSafety()
-
-