ch.randelshofer.tree.demo
Class TreevizFileSystemXMLInfoWeighter
java.lang.Object
ch.randelshofer.tree.demo.TreevizFileSystemXMLInfoWeighter
- All Implemented Interfaces:
- Weighter
- Direct Known Subclasses:
- TreevizFileSystemXMLByYearInfoWeighter
public class TreevizFileSystemXMLInfoWeighter
- extends java.lang.Object
- implements Weighter
InfoWeighter.
- Version:
- 1.0 23. Juni 2008 Created.
- Author:
- Werner Randelshofer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
info
protected TreevizFileSystemXMLNodeInfo info
key
protected java.lang.String key
sizeKey
protected java.lang.String sizeKey
histogram
protected int[] histogram
sizeHistogram
protected long[] sizeHistogram
size
protected long[] size
min
protected java.lang.Object min
max
protected java.lang.Object max
median
protected java.lang.Object median
isoDateFormatter
protected java.text.DateFormat isoDateFormatter
isoDateFormatter2
protected java.text.DateFormat isoDateFormatter2
shortWeightFormat
protected static FileSizeFormat shortWeightFormat
intFormat
protected static java.text.NumberFormat intFormat
TreevizFileSystemXMLInfoWeighter
public TreevizFileSystemXMLInfoWeighter(TreevizFileSystemXMLNodeInfo info,
java.lang.String key)
- Creates a new instance.
TreevizFileSystemXMLInfoWeighter
public TreevizFileSystemXMLInfoWeighter(TreevizFileSystemXMLNodeInfo info,
java.lang.String key,
java.lang.String sizeKey)
init
public void init(TreeNode root)
- Specified by:
init in interface Weighter
collectDatesRecursive
protected void collectDatesRecursive(TreevizFileSystemXMLNode node,
java.util.List<java.util.Date> dates)
calculateDateHistogramRecursive
protected void calculateDateHistogramRecursive(TreeNode root)
- Calculates the date histogram recursively.
- Parameters:
root -
getWeight
public float getWeight(TreePath2 path)
- Specified by:
getWeight in interface Weighter
getHistogram
public int[] getHistogram()
- Specified by:
getHistogram in interface Weighter
getMinimumWeightLabel
public java.lang.String getMinimumWeightLabel()
- Specified by:
getMinimumWeightLabel in interface Weighter
getMaximumWeightLabel
public java.lang.String getMaximumWeightLabel()
- Specified by:
getMaximumWeightLabel in interface Weighter
getHistogramLabel
public java.lang.String getHistogramLabel(int index)
- Specified by:
getHistogramLabel in interface Weighter
getMedianWeight
public float getMedianWeight()
- Specified by:
getMedianWeight in interface Weighter