net.rationalminds.util.TreeChar Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of DateParser Show documentation
Show all versions of DateParser Show documentation
auto date pattern identification and extraction
The newest version!
package net.rationalminds.util;
/**
* To create a bit map type structure for lietrals of the tree
* @author Vaibhav Singh
*
*/
public class TreeChar implements Comparable{
public String symbol="";
public int leftSpace=0;
public int level=0;
public TreeChar(String symbol, int leftSpace, int level) {
super();
this.symbol = symbol;
this.leftSpace = leftSpace;
this.level = level;
}
public TreeChar(String symbol) {
super();
this.symbol = symbol;
}
@Override
public String toString() {
return "TreeChar [symbol=" + symbol + ", level=" + level+", leftSpace=" + leftSpace + "]";
}
@Override
public int compareTo(TreeChar arg0) {
if(level>arg0.level){
return 1;
}
if(level