edu.rice.cs.drjava.model.definitions.reducedmodel
Class ModelList.Node<T>

java.lang.Object
  extended by edu.rice.cs.drjava.model.definitions.reducedmodel.ModelList.Node<T>
Enclosing class:
ModelList<T>

private static class ModelList.Node<T>
extends Object

The Node class for ModelLists. The _prev and _next pointers are mutable. The _item field is null in _head and _tail.


Field Summary
(package private)  T _item
           
(package private)  ModelList.Node<T> _next
           
(package private)  ModelList.Node<T> _prev
           
 
Constructor Summary
ModelList.Node()
          Constructor for _head and _tail nodes.
ModelList.Node(T item, ModelList.Node<T> pred, ModelList.Node<T> succ)
          Constructor for nodes containing data.
 
Method Summary
(package private)  ModelList.Node<T> insert(T item)
          Insert a new node before "this".
(package private)  void remove()
          Remove the current node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_prev

ModelList.Node<T> _prev

_next

ModelList.Node<T> _next

_item

T _item
Constructor Detail

ModelList.Node

ModelList.Node()
Constructor for _head and _tail nodes.


ModelList.Node

ModelList.Node(T item,
               ModelList.Node<T> pred,
               ModelList.Node<T> succ)
Constructor for nodes containing data.

Method Detail

insert

ModelList.Node<T> insert(T item)
Insert a new node before "this". Returns the new node. Assumes that "this" is not the head node.


remove

void remove()
Remove the current node. Assumes that this is neither _head not _tail.