Interface PointwiseOperation.Tertiary<T>

All Superinterfaces:
PointwiseOperation<T>
Enclosing interface:
PointwiseOperation<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PointwiseOperation.Tertiary<T> extends PointwiseOperation<T>
A pointwise operation that can be applied to four images.
  • Method Details

    • apply

      T apply(int firstColor, int secondColor, int thirdColor, int fourthColor, boolean isFirstInBounds, boolean isSecondInBounds, boolean isThirdInBounds, boolean isFourthInBounds)
    • expectedImages

      default int expectedImages()
      Specified by:
      expectedImages in interface PointwiseOperation<T>
      Returns:
      how many images this operation expects to be applied to. Should return -1 if the operation can be applied to any number of images
    • apply

      default T apply(int[] colors, boolean[] inBounds)
      Description copied from interface: PointwiseOperation
      Applies this operation to the given colors and in-bounds flags.
      Specified by:
      apply in interface PointwiseOperation<T>
      Parameters:
      colors - the colors of the images to apply this operation to at the given point
      inBounds - whether each image is in-bounds at the given point. At least one image will always be in-bounds
      Returns:
      the data generated at this point