public HierarchicalClassLabel(String name,Pattern regex,String separator){
  super();
  this.separatorPattern=regex;
  this.separatorString=separator;
  String[] levelwiseStrings=separatorPattern.split(name);
  this.levelwiseNames=new Comparable<?>[levelwiseStrings.length];
  for (int i=0; i < levelwiseStrings.length; i++) {
    try {
      levelwiseNames[i]=Integer.valueOf(levelwiseStrings[i]);
    }
 catch (    NumberFormatException e) {
      levelwiseNames[i]=levelwiseStrings[i];
    }
  }
}

public HierarchicalClassLabel ( String name , Pattern regex , String separator ) { super ( ) ; this . separatorPattern = regex ; this . separatorString = separator ; String [ ] levelwiseStrings = separatorPattern . split ( name ) ; this . levelwiseNames = new Comparable < ? > [ levelwiseStrings . length ] ; for ( int i = 0 ; i < levelwiseStrings . length ; i ++ ) { try { levelwiseNames [ i ] = Integer . valueOf ( levelwiseStrings [ i ] ) ; } catch ( NumberFormatException e ) { levelwiseNames [ i ] = levelwiseStrings [ i ] ; } } }
constructs a hierarchical class label from the given name , using the given pattern to match separators of different levels in the given name , and setting the given separator - string to separate different levels in string representations of this hierarchicalclasslabel .
