List of usage examples for org.jfree.data SelectableValue getValue
public Number getValue()
From source file:org.jfree.data.pie.DefaultPieDataset.java
/** * Returns the data value associated with a key. * * @param key the key (<code>null</code> not permitted). * * @return The value (possibly <code>null</code>). * * @throws UnknownKeyException if the key is not recognised. *///from ww w. j a va 2 s. co m public Number getValue(Comparable key) { if (key == null) { throw new IllegalArgumentException("Null 'key' argument."); } SelectableValue dataItem = (SelectableValue) this.data.getObject(key); return dataItem.getValue(); }
From source file:org.jfree.data.pie.DefaultPieDataset.java
/** * Returns a value.//from ww w .j a v a 2 s . com * * @param item the value index. * * @return The value (possibly <code>null</code>). */ public Number getValue(int item) { Number result = null; if (getItemCount() > item) { SelectableValue dataItem = (SelectableValue) this.data.getObject(item); result = dataItem.getValue(); } return result; }