| | |
| | | private Map<DN,Node<T>> ditCacheMap; |
| | | |
| | | /** |
| | | * Default contructor. |
| | | * Default constructor. |
| | | */ |
| | | public DITCacheMap() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Contructs a new DITCacheMap from a given Map. |
| | | * Constructs a new DITCacheMap from a given Map. |
| | | * @param m existing Map to construct new |
| | | * DITCacheMap from. |
| | | */ |
| | |
| | | { |
| | | if (rootNode != null) |
| | | { |
| | | if (node == rootNode) |
| | | { |
| | | if (rootNode.element != null) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | while (node != null) |
| | | { |
| | | if (node.element != null) |
| | |
| | | } |
| | | else |
| | | { |
| | | if (node != rootNode) |
| | | while ((node.next == null) && |
| | | (node.parent != rootNode)) |
| | | { |
| | | while ((node.next == null) && |
| | | (node.parent != rootNode)) |
| | | { |
| | | node = node.parent; |
| | | } |
| | | node = node.parent; |
| | | } |
| | | node = node.next; |
| | | } |
| | |
| | | |
| | | if (rootNode != null) |
| | | { |
| | | if (node == rootNode) |
| | | { |
| | | node = rootNode.child; |
| | | if (rootNode.element != null) |
| | | { |
| | | return rootNode.element; |
| | | } |
| | | } |
| | | while (node != null) |
| | | { |
| | | if (node.element != null) |
| | |
| | | } |
| | | else |
| | | { |
| | | if (node != rootNode) |
| | | while ((node.next == null) && |
| | | (node.parent != rootNode)) |
| | | { |
| | | while ((node.next == null) && |
| | | (node.parent != rootNode)) |
| | | { |
| | | node = node.parent; |
| | | } |
| | | node = node.parent; |
| | | } |
| | | node = node.next; |
| | | } |