Class PaintHelper

java.lang.Object
org.moeaframework.analysis.diagnostics.PaintHelper

public class PaintHelper extends Object
Helper class for maintaining a mapping from series in a plot to their assigned paint. If the series has not yet been assigned a paint, one will be automatically assigned when invoking get(Comparable).
  • Constructor Details

    • PaintHelper

      public PaintHelper()
      Constructs a new paint helper with no assigned paints.
  • Method Details

    • get

      public Paint get(Comparable<?> key)
      Returns the paint used by the specified series key. If the series key has not yet been assigned a paint, one is automatically assigned.
      Parameters:
      key - the series key
      Returns:
      the paint used by the specified series key
    • set

      public void set(Comparable<?> key, Paint paint)
      Assigns a paint for the specified series key. All subsequent invocations of get(Comparable) with this series key will return the specified paint.
      Parameters:
      key - the series key
      paint - the paint to be used for the specified series key
    • clear

      public void clear()
      Clears all paint assignments from this paint helper.