Enum Class Transpose

java.lang.Object
java.lang.Enum<Transpose>
is.galia.operation.Transpose
All Implemented Interfaces:
Operation, Serializable, Comparable<Transpose>, Constable

public enum Transpose extends Enum<Transpose> implements Operation
Encapsulates a transposition (flipping/mirroring) operation on an image.
  • Enum Constant Details

    • HORIZONTAL

      public static final Transpose HORIZONTAL
      Indicates mirroring.
    • VERTICAL

      public static final Transpose VERTICAL
      Indicates flipping.
  • Method Details

    • values

      public static Transpose[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Transpose valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • freeze

      public void freeze()
      Does nothing.
      Specified by:
      freeze in interface Operation
    • hasEffect

      public boolean hasEffect()
      Description copied from interface: Operation
      Simpler but less-accurate counterpart of Operation.hasEffect(Size, OperationList).
      Specified by:
      hasEffect in interface Operation
      Returns:
      Whether applying the operation on its own would result in a changed image.
    • hasEffect

      public boolean hasEffect(Size fullSize, OperationList opList)
      Description copied from interface: Operation
      Context-aware counterpart to Operation.hasEffect(). For example, a scale operation specifying a scale to 300×200, when the given operation list contains a crop of 300×200, would return false.
      Specified by:
      hasEffect in interface Operation
      Parameters:
      fullSize - Full size of the source image.
      opList - Operation list of which the operation may or may not be a member.
      Returns:
      Whether applying the operation in the context of the given full size and operation list would result in a changed image.
    • toMap

      public Map<String,Object> toMap(Size fullSize, ScaleConstraint scaleConstraint)
      Specified by:
      toMap in interface Operation
      Parameters:
      fullSize - Full size of the source image on which the operation is being applied.
      scaleConstraint - Scale constraint applied to the given full size.
      Returns:
      Map with an axis key corresponding to the lowercase enum name.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Transpose>
      Returns:
      String representation of the instance, guaranteed to represent the instance, but not guaranteed to have any particular format.