net.sf.jtreemap.ktreemap.example
Class BuilderXML

java.lang.Object
  extended by net.sf.jtreemap.ktreemap.TreeMapNodeBuilder
      extended by net.sf.jtreemap.ktreemap.example.BuilderXML

public class BuilderXML
extends TreeMapNodeBuilder

Parse a XML file to build the tree.

 

Constructor Summary
BuilderXML(java.io.File file)
          Constructor
 
Method Summary
 double getWeight(java.lang.Object value)
          Return the weight of an Object.
 
Methods inherited from class net.sf.jtreemap.ktreemap.TreeMapNodeBuilder
buildBranch, buildLeaf, getRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuilderXML

public BuilderXML(java.io.File file)
           throws java.text.ParseException
Constructor

Throws:
java.text.ParseException - if the file don't correspond to the TreeMap.dtd
Parameters:
file - XML file name
Method Detail

getWeight

public double getWeight(java.lang.Object value)
Description copied from class: TreeMapNodeBuilder
Return the weight of an Object.
This method have to be extended

Specified by:
getWeight in class TreeMapNodeBuilder
Parameters:
value - the object (generaly, the TreeMapNode.getValue())
Returns:
the weight of the value