congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
UnknownKeyException
Code IndexAdd Tabnine to your IDE (free)

How to use
UnknownKeyException
in
org.jfree.data

Best Java code snippets using org.jfree.data.UnknownKeyException (Showing top 20 results out of 315)

origin: fiji/TrackMate

@SuppressWarnings("rawtypes")
public XYEdgeSeries getSeries(Comparable key) {
  for(XYEdgeSeries s : seriesList) 
    if (s.getKey().equals(key)) 
      return s;
  throw new UnknownKeyException("Key not found: " + key);
}

origin: sc.fiji/TrackMate_

@SuppressWarnings("rawtypes")
public XYEdgeSeries getSeries(Comparable key) {
  for(XYEdgeSeries s : seriesList) 
    if (s.getKey().equals(key)) 
      return s;
  throw new UnknownKeyException("Key not found: " + key);
}

origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns a series from the collection.
 *
 * @param key  the key (<code>null</code> not permitted).
 *
 * @return The series with the specified key.
 *
 * @throws UnknownKeyException if <code>key</code> is not found in the
 *         collection.
 *
 * @since 1.0.9
 */
public XYSeries getSeries(Comparable key) {
  if (key == null) {
    throw new IllegalArgumentException("Null 'key' argument.");
  }
  Iterator iterator = this.data.iterator();
  while (iterator.hasNext()) {
    XYSeries series = (XYSeries) iterator.next();
    if (key.equals(series.getKey())) {
      return series;
    }
  }
  throw new UnknownKeyException("Key not found: " + key);
}
origin: jfree/jfreechart

/**
 * Returns a series from the collection.
 *
 * @param key  the key ({@code null} not permitted).
 *
 * @return The series with the specified key.
 *
 * @throws UnknownKeyException if {@code key} is not found in the
 *         collection.
 *
 * @since 1.0.9
 */
public XYSeries getSeries(Comparable key) {
  Args.nullNotPermitted(key, "key");
  Iterator iterator = this.data.iterator();
  while (iterator.hasNext()) {
    XYSeries series = (XYSeries) iterator.next();
    if (key.equals(series.getKey())) {
      return series;
    }
  }
  throw new UnknownKeyException("Key not found: " + key);
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns the start data value for one category in a series.
 *
 * @param series  the required series.
 * @param category  the required category.
 *
 * @return The start data value for one category in a series
 *         (possibly <code>null</code>).
 *
 * @see #getStartValue(int, int)
 */
public Number getStartValue(Comparable series, Comparable category) {
  int seriesIndex = getSeriesIndex(series);
  if (seriesIndex < 0) {
    throw new UnknownKeyException("Unknown 'series' key.");
  }
  int itemIndex = getColumnIndex(category);
  if (itemIndex < 0) {
    throw new UnknownKeyException("Unknown 'category' key.");
  }
  return getStartValue(seriesIndex, itemIndex);
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns the end data value for one category in a series.
 *
 * @param series  the required series.
 * @param category  the required category.
 *
 * @return The end data value for one category in a series (null possible).
 *
 * @see #getEndValue(int, int)
 */
public Number getEndValue(Comparable series, Comparable category) {
  int seriesIndex = getSeriesIndex(series);
  if (seriesIndex < 0) {
    throw new UnknownKeyException("Unknown 'series' key.");
  }
  int itemIndex = getColumnIndex(category);
  if (itemIndex < 0) {
    throw new UnknownKeyException("Unknown 'category' key.");
  }
  return getEndValue(seriesIndex, itemIndex);
}
origin: jfree/jfreechart

/**
 * Returns the start data value for one category in a series.
 *
 * @param series  the required series.
 * @param category  the required category.
 *
 * @return The start data value for one category in a series
 *         (possibly {@code null}).
 *
 * @see #getStartValue(int, int)
 */
@Override
public Number getStartValue(Comparable series, Comparable category) {
  int seriesIndex = getSeriesIndex(series);
  if (seriesIndex < 0) {
    throw new UnknownKeyException("Unknown 'series' key.");
  }
  int itemIndex = getColumnIndex(category);
  if (itemIndex < 0) {
    throw new UnknownKeyException("Unknown 'category' key.");
  }
  return getStartValue(seriesIndex, itemIndex);
}
origin: jfree/jfreechart

/**
 * Returns the percent complete for a given item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 *
 * @return The percent complete.
 */
@Override
public Number getPercentComplete(Comparable rowKey, Comparable columnKey) {
  int r = getRowIndex(rowKey);
  int c = getColumnIndex(columnKey);
  if (c == -1) {
    throw new UnknownKeyException("Unknown columnKey: " + columnKey);
  }
  else if (r == -1) {
    throw new UnknownKeyException("Unknown rowKey: " + rowKey);
  }
  else {
    return this.underlying.getPercentComplete(r,
        c + this.firstCategoryIndex);
  }
}
origin: jfree/jfreechart

/**
 * Returns the end value for the interval for a given series and category.
 *
 * @param rowKey  the series key.
 * @param columnKey  the category key.
 *
 * @return The end value (possibly {@code null}).
 *
 * @see #getStartValue(Comparable, Comparable)
 */
@Override
public Number getEndValue(Comparable rowKey, Comparable columnKey) {
  int r = getRowIndex(rowKey);
  int c = getColumnIndex(columnKey);
  if (c == -1) {
    throw new UnknownKeyException("Unknown columnKey: " + columnKey);
  } else if (r == -1) {
    throw new UnknownKeyException("Unknown rowKey: " + rowKey);
  }
  else {
    return this.underlying.getEndValue(r, c + this.firstCategoryIndex);
  }
}
origin: jfree/jfreechart

/**
 * Returns the end data value for one category in a series.
 *
 * @param series  the required series.
 * @param category  the required category.
 *
 * @return The end data value for one category in a series (null possible).
 *
 * @see #getEndValue(int, int)
 */
@Override
public Number getEndValue(Comparable series, Comparable category) {
  int seriesIndex = getSeriesIndex(series);
  if (seriesIndex < 0) {
    throw new UnknownKeyException("Unknown 'series' key.");
  }
  int itemIndex = getColumnIndex(category);
  if (itemIndex < 0) {
    throw new UnknownKeyException("Unknown 'category' key.");
  }
  return getEndValue(seriesIndex, itemIndex);
}
origin: jfree/jfreechart

/**
 * Returns the start value for the interval for a given series and category.
 *
 * @param rowKey  the series key.
 * @param columnKey  the category key.
 *
 * @return The start value (possibly {@code null}).
 *
 * @see #getEndValue(Comparable, Comparable)
 */
@Override
public Number getStartValue(Comparable rowKey, Comparable columnKey) {
  int r = getRowIndex(rowKey);
  int c = getColumnIndex(columnKey);
  if (c == -1) {
    throw new UnknownKeyException("Unknown columnKey: " + columnKey);
  } else if (r == -1) {
    throw new UnknownKeyException("Unknown rowKey: " + rowKey);
  }
  else {
    return this.underlying.getStartValue(r,
        c + this.firstCategoryIndex);
  }
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Removes a value from the collection.
 *
 * @param key  the key (<code>null</code> not permitted).
 *
 * @see #removeValue(int)
 *
 * @throws UnknownKeyException if the key is not recognised.
 */
public void removeValue(Comparable key) {
  // defer argument checking
  int index = getIndex(key);
  if (index < 0) {
    throw new UnknownKeyException("The key (" + key.toString()
        + ") is not recognised.");
  }
  removeValue(index);
}
origin: net.java.dev.glazedlists/glazedlists_java15

/**
 * Returns the number of values associated with the given <code>rowKey</code>
 * between the given <code>start</code> and <code>end</code> values.
 */
public int getCount(R rowKey, C start, C end) {
  // fetch the relevant pair of trees
  final TreePair<C> treePair = getTreePair(rowKey);
  // ensure we found something
  if (treePair == null)
    throw new UnknownKeyException("unrecognized rowKey: " + rowKey);
  // return the number of values between start and end
  return treePair.getCount(start, end);
}
origin: jfree/jfreechart

/**
 * Returns the number of sub-intervals for a given item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 *
 * @return The sub-interval count.
 *
 * @see #getSubIntervalCount(int, int)
 */
@Override
public int getSubIntervalCount(Comparable rowKey, Comparable columnKey) {
  int r = getRowIndex(rowKey);
  int c = getColumnIndex(columnKey);
  if (c == -1) {
    throw new UnknownKeyException("Unknown columnKey: " + columnKey);
  } else if (r == -1) {
    throw new UnknownKeyException("Unknown rowKey: " + rowKey);
  }
  else {
    return this.underlying.getSubIntervalCount(r,
        c + this.firstCategoryIndex);
  }
}
origin: jfree/jfreechart

/**
 * Returns the value for a pair of keys.
 *
 * @param rowKey  the row key ({@code null} not permitted).
 * @param columnKey  the column key ({@code null} not permitted).
 *
 * @return The value (possibly {@code null}).
 *
 * @throws UnknownKeyException if either key is not defined in the dataset.
 */
@Override
public Number getValue(Comparable rowKey, Comparable columnKey) {
  int r = getRowIndex(rowKey);
  int c = getColumnIndex(columnKey);
  if (c == -1) {
    throw new UnknownKeyException("Unknown columnKey: " + columnKey);
  }
  else if (r == -1) {
    throw new UnknownKeyException("Unknown rowKey: " + rowKey);
  }
  else {
    return this.underlying.getValue(r, c + this.firstCategoryIndex);
  }
}
origin: net.java.dev.glazedlists/glazedlists_java16

/**
 * Returns the number of values associated with the given <code>rowKey</code>
 * between the given <code>start</code> and <code>end</code> values.
 */
public int getCount(R rowKey, C start, C end) {
  // fetch the relevant pair of trees
  final TreePair<C> treePair = getTreePair(rowKey);
  // ensure we found something
  if (treePair == null)
    throw new UnknownKeyException("unrecognized rowKey: " + rowKey);
  // return the number of values between start and end
  return treePair.getCount(start, end);
}
origin: com.haulmont.thirdparty/glazedlists

/**
 * Returns the number of values associated with the given <code>rowKey</code>
 * between the given <code>start</code> and <code>end</code> values.
 */
public int getCount(R rowKey, C start, C end) {
  // fetch the relevant pair of trees
  final TreePair<C> treePair = getTreePair(rowKey);
  // ensure we found something
  if (treePair == null)
    throw new UnknownKeyException("unrecognized rowKey: " + rowKey);
  // return the number of values between start and end
  return treePair.getCount(start, end);
}
origin: jfree/jfreechart

/**
 * Removes a value from the collection.
 *
 * @param key  the key ({@code null} not permitted).
 *
 * @see #removeValue(int)
 *
 * @throws UnknownKeyException if the key is not recognised.
 */
public void removeValue(Comparable key) {
  // defer argument checking
  int index = getIndex(key);
  if (index < 0) {
    throw new UnknownKeyException("The key (" + key.toString()
        + ") is not recognised.");
  }
  removeValue(index);
}
origin: jfree/jfreechart

/**
 * Returns the data value for one category in a series.
 * <P>
 * This method is part of the CategoryDataset interface.  Not particularly
 * meaningful for this class...returns the end value.
 *
 * @param series    The required series (zero based index).
 * @param category  The required category.
 *
 * @return The data value for one category in a series (null possible).
 *
 * @see #getEndValue(Comparable, Comparable)
 */
@Override
public Number getValue(Comparable series, Comparable category) {
  int seriesIndex = getSeriesIndex(series);
  if (seriesIndex < 0) {
    throw new UnknownKeyException("Unknown 'series' key.");
  }
  int itemIndex = getColumnIndex(category);
  if (itemIndex < 0) {
    throw new UnknownKeyException("Unknown 'category' key.");
  }
  return getValue(seriesIndex, itemIndex);
}
origin: jfree/jfreechart

/**
 * Returns the value for a pair of keys.
 *
 * @param rowKey  the row key ({@code null} not permitted).
 * @param columnKey  the column key ({@code null} not permitted).
 *
 * @return The value (possibly {@code null}).
 *
 * @throws UnknownKeyException if either key is not defined in the dataset.
 */
@Override
public Number getValue(Comparable rowKey, Comparable columnKey) {
  int r = getRowIndex(rowKey);
  int c = getColumnIndex(columnKey);
  if (c == -1) {
    throw new UnknownKeyException("Unknown columnKey: " + columnKey);
  }
  else if (r == -1) {
    throw new UnknownKeyException("Unknown rowKey: " + rowKey);
  }
  else {
    return this.underlying.getValue(r, c + this.firstCategoryIndex);
  }
}
org.jfree.dataUnknownKeyException

Javadoc

An exception that indicates an unknown key value.

Most used methods

  • <init>
    Creates a new exception.

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • BoxLayout (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now