1 package de.lathanda.eos.base.util;
3 import java.util.Iterator;
37 public synchronized void add(T t) {
39 root =
new Node<T>(t);
42 last.next =
new Node<T>(t);
49 root =
new Node<T>(t);
52 root =
new Node<T>(t, root.next);
55 public synchronized void remove(T t) {
58 }
else if (root.t == t) {
67 Node<T> act = root.next;
88 return new TIterator<T>(root);
91 public synchronized void clear() {
96 private static class Node<T> {
97 private volatile Node<T> next;
103 public Node(T t, Node<T> next) {
109 private static class TIterator<T>
implements Iterator<T> {
110 private Node<T> index;
112 public TIterator(Node<T> index) {
117 public boolean hasNext() {
118 return index !=
null;
synchronized void clear()
synchronized void add(T t)
synchronized void addFront(T t)