ch.randelshofer.tree.demo
Class LastModifiedWeighter
java.lang.Object
ch.randelshofer.tree.demo.LastModifiedWeighter
- All Implemented Interfaces:
- Weighter
- Direct Known Subclasses:
- LastModifiedByYearWeighter
public class LastModifiedWeighter
- extends java.lang.Object
- implements Weighter
LastModifiedWeighter.
- Version:
- 2.0 2008-01-27 Added computation and drawing of histogram.
1.0 September 26, 2007 Created.
- Author:
- Werner Randelshofer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
min
protected long min
max
protected long max
median
protected long median
histogram
protected int[] histogram
shortWeightFormat
protected static FileSizeFormat shortWeightFormat
intFormat
protected static java.text.NumberFormat intFormat
LastModifiedWeighter
public LastModifiedWeighter()
- Creates a new instance.
getWeight
public float getWeight(TreePath2 path)
- Specified by:
getWeight in interface Weighter
getMedianWeight
public float getMedianWeight()
- Specified by:
getMedianWeight in interface Weighter
init
public void init(TreeNode root)
- Specified by:
init in interface Weighter
collectDatesRecursive
protected void collectDatesRecursive(TreeNode node,
java.util.List<java.lang.Long> dates)
histogramRecursive
protected void histogramRecursive(TreeNode root)
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_old
public java.lang.String getHistogramLabel_old(int index)
getHistogramLabel
public java.lang.String getHistogramLabel(int index)
- Specified by:
getHistogramLabel in interface Weighter