Package generic.stl
Class ListSTL<T>
- java.lang.Object
-
- generic.stl.ListSTL<T>
-
public class ListSTL<T> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EOL
-
Constructor Summary
Constructors Constructor Description ListSTL()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
back()
IteratorSTL<T>
begin()
void
clear()
IteratorSTL<T>
end()
boolean
equals(java.lang.Object obj)
void
erase(IteratorSTL<T> position)
T
front()
IteratorSTL<T>
insert(IteratorSTL<T> position, T value)
boolean
isEmpty()
T
pop_back()
T
pop_front()
void
printDebug()
void
push_back(T value)
void
push_front(T value)
IteratorSTL<T>
rBegin()
IteratorSTL<T>
rEnd()
int
size()
void
sort(java.util.Comparator<T> comparator)
void
splice(IteratorSTL<T> position, ListSTL<T> list, IteratorSTL<T> listPosition)
moves a single element, decreasing the length of list by 1 and increasing this list by 1.java.lang.String
toString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
printDebug
public void printDebug()
-
begin
public IteratorSTL<T> begin()
-
end
public IteratorSTL<T> end()
-
rBegin
public IteratorSTL<T> rBegin()
-
rEnd
public IteratorSTL<T> rEnd()
-
size
public int size()
-
clear
public void clear()
-
isEmpty
public boolean isEmpty()
-
front
public T front()
-
back
public T back()
-
push_back
public void push_back(T value)
-
push_front
public void push_front(T value)
-
insert
public IteratorSTL<T> insert(IteratorSTL<T> position, T value)
-
erase
public void erase(IteratorSTL<T> position)
-
pop_front
public T pop_front()
-
pop_back
public T pop_back()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
sort
public void sort(java.util.Comparator<T> comparator)
-
splice
public void splice(IteratorSTL<T> position, ListSTL<T> list, IteratorSTL<T> listPosition)
moves a single element, decreasing the length of list by 1 and increasing this list by 1.- Parameters:
position
- the position into this list where the element is to be insertedlist
- the list from which the element is removed.listPosition
- the postion of the element to be removed.
-
-