Class ColorSchemeUnary

Direct Known Subclasses:
Prepend, Repeat, Shuffle

public abstract class ColorSchemeUnary extends ColorScheme
Like ColorScheme but employs a unary operator on a call to an existing ColorScheme.
Author:
Owen Feehan
  • Constructor Details

    • ColorSchemeUnary

      public ColorSchemeUnary()
    • ColorSchemeUnary

      public ColorSchemeUnary(ColorScheme colors)
      Creates a new ColorSchemeUnary instance.
      Parameters:
      colors - The delegate that creates the color-list before subsequent processing.
  • Method Details

    • createList

      public ColorList createList(int size) throws OperationFailedException
      Description copied from class: ColorScheme
      Creates a sequence of related colors.
      Specified by:
      createList in class ColorScheme
      Parameters:
      size - the size of the list
      Returns:
      a newly created list with colors
      Throws:
      OperationFailedException
    • transform

      protected abstract ColorList transform(ColorList source)
      Transform an existing ColorList.

      Note that the incoming ColorList may be modified, and can no longer be used in its original form after this method call.

      Parameters:
      source - the incoming ColorList (which may be consumed and modified).
      Returns:
      the transformed (outgoing) ColorList.
    • getColors

      public ColorScheme getColors()
      The delegate that creates the color-list before subsequent processing.
    • setColors

      public void setColors(ColorScheme colors)
      The delegate that creates the color-list before subsequent processing.