/** * 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. */ public Number getValue(Comparable key) { if (key == null) { throw new IllegalArgumentException("Null 'key' argument."); } return this.data.getValue(key); }
/** * Returns a value. * * @param item the value index. * * @return The value (possibly <code>null</code>). */ public Number getValue(int item) { Number result = null; if (getItemCount() > item) { result = this.data.getValue(item); } return result; }
/** * Returns the data value associated with a key. * * @param key the key ({@code null} not permitted). * * @return The value (possibly {@code null}). * * @throws UnknownKeyException if the key is not recognised. */ @Override public Number getValue(Comparable key) { Args.nullNotPermitted(key, "key"); return this.data.getValue(key); }
/** * Returns a value. * * @param item the value index. * * @return The value (possibly {@code null}). */ @Override public Number getValue(int item) { Number result = null; if (getItemCount() > item) { result = this.data.getValue(item); } return result; }
/** * Returns the value for a given row and column. * * @param row the row index. * @param column the column index. * * @return The value. * * @see #getValue(Comparable, Comparable) */ public Number getValue(int row, int column) { Number result = null; DefaultKeyedValues rowData = (DefaultKeyedValues) this.rows.get(row); if (rowData != null) { Comparable columnKey = (Comparable) this.columnKeys.get(column); // the row may not have an entry for this key, in which case the // return value is null int index = rowData.getIndex(columnKey); if (index >= 0) { result = rowData.getValue(index); } } return result; }
/** * Returns the value for a given row and column. * * @param row the row index. * @param column the column index. * * @return The value. * * @see #getValue(Comparable, Comparable) */ @Override public Number getValue(int row, int column) { Number result = null; DefaultKeyedValues rowData = (DefaultKeyedValues) this.rows.get(row); if (rowData != null) { Comparable columnKey = (Comparable) this.columnKeys.get(column); // the row may not have an entry for this key, in which case the // return value is null int index = rowData.getIndex(columnKey); if (index >= 0) { result = rowData.getValue(index); } } return result; }
/** * Returns the value for a given 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. * * @see #getValue(int) */ public Number getValue(Comparable key) { int index = getIndex(key); if (index < 0) { throw new UnknownKeyException("Key not found: " + key); } return getValue(index); }
/** * The end of an element. * * @param namespaceURI the namespace. * @param localName the element name. * @param qName the element name. */ @Override public void endElement(String namespaceURI, String localName, String qName) { if (this.root instanceof CategoryDatasetHandler) { CategoryDatasetHandler handler = (CategoryDatasetHandler) this.root; Iterator iterator = this.values.getKeys().iterator(); while (iterator.hasNext()) { Comparable key = (Comparable) iterator.next(); Number value = this.values.getValue(key); handler.addItem(this.seriesKey, key, value); } this.root.popSubHandler(); } }
/** * The end of an element. * * @param namespaceURI the namespace. * @param localName the element name. * @param qName the element name. */ public void endElement(String namespaceURI, String localName, String qName) { if (this.root instanceof CategoryDatasetHandler) { CategoryDatasetHandler handler = (CategoryDatasetHandler) this.root; Iterator iterator = this.values.getKeys().iterator(); while (iterator.hasNext()) { Comparable key = (Comparable) iterator.next(); Number value = this.values.getValue(key); handler.addItem(this.seriesKey, key, value); } this.root.popSubHandler(); } }
/** * Returns the value for a given key. * * @param key the key ({@code null} not permitted). * * @return The value (possibly {@code null}). * * @throws UnknownKeyException if the key is not recognised. * * @see #getValue(int) */ @Override public Number getValue(Comparable key) { int index = getIndex(key); if (index < 0) { throw new UnknownKeyException("Key not found: " + key); } return getValue(index); }
= (DefaultKeyedValues) this.rows.get(row); int col = rowData.getIndex(columnKey); return (col >= 0 ? rowData.getValue(col) : null);
return false; Number v1 = getValue(i); Number v2 = that.getValue(i); if (v1 == null) {
return false; Number v1 = getValue(i); Number v2 = that.getValue(i); if (v1 == null) {
= (DefaultKeyedValues) this.rows.get(row); int col = rowData.getIndex(columnKey); return (col >= 0 ? rowData.getValue(col) : null);