org.apache.asn1.ber.digester
Class TagNode

java.lang.Object
  extended by org.apache.asn1.ber.digester.TagNode

public class TagNode
extends java.lang.Object

A speed (verses size) optimized data structure to match tag patterns. As tuples are pushed and popped off of the decoder's stack and the tag nesting path changes this tree is traversed. A position member of type TagNode is used to track the current position in this tree. If the nesting does not correspond to a valid node then it is null and thus underfined so no rules are correlated with the position. When a node is located and set the rules contained in that node are triggered.

Version:
$Rev: 157644 $
Author:
Apache Directory Project

Field Summary
private  java.util.HashMap children
           
private  int depth
           
private  java.util.ArrayList rules
           
private  java.lang.Integer tag
           
 
Constructor Summary
TagNode(java.lang.Integer tag)
           
 
Method Summary
(package private)  void addNode(TagNode node)
           
(package private)  void addRule(Rule rule)
           
 TagNode getChild(java.lang.Integer tag)
           
 java.util.Iterator getChildren()
           
 int getDepth()
           
 java.util.List getRules()
           
 java.lang.Integer getTag()
           
 boolean hasChild(java.lang.Integer tag)
           
 boolean isLeaf()
           
(package private)  void setDepth(int depth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

private java.lang.Integer tag

depth

private int depth

children

private java.util.HashMap children

rules

private java.util.ArrayList rules
Constructor Detail

TagNode

TagNode(java.lang.Integer tag)
Method Detail

addNode

void addNode(TagNode node)

addRule

void addRule(Rule rule)

setDepth

void setDepth(int depth)

getTag

public java.lang.Integer getTag()

getDepth

public int getDepth()

getRules

public java.util.List getRules()

hasChild

public boolean hasChild(java.lang.Integer tag)

isLeaf

public boolean isLeaf()

getChildren

public java.util.Iterator getChildren()

getChild

public TagNode getChild(java.lang.Integer tag)


Copyright © 2004-2009 . All Rights Reserved.