Class Operation

java.lang.Object
org.im4java.core.Operation
Direct Known Subclasses:
DCRAWOps, ETOps, GMOps, IMOps, JPTOps, UFRawOps

public class Operation extends Object
This class models the command-line of an image-command. Objects of this class hold the arguments in a list and keep track of special "dynamic" operations.
  • Field Details

  • Constructor Details

    • Operation

      public Operation()
      Constructor.
  • Method Details

    • toString

      public String toString()
      Convert to String. Note that the arguments are not quoted!
      Overrides:
      toString in class Object
    • cloneObject

      public Operation cloneObject()
      Clone the (java) object. Note that ImageMagick has a -clone operator, therefore this class has a method clone() (inherited from Core) which does not clone the java-object, but wraps the IM-clone operator!
    • addRawArgs

      public Operation addRawArgs(String... pArgs)
      Add raw text to the list of arguments.
    • addRawArgs

      public Operation addRawArgs(List<String> pArgs)
      Add raw text to the list of arguments.
    • getCmdArgs

      public LinkedList<String> getCmdArgs()
      Return the raw arguments.
    • addImage

      public Operation addImage(String... pImages)
      Add image(s) to the operation.
    • addImage

      public Operation addImage()
      Add an image-placeholder to an Operation.
    • addImage

      public Operation addImage(int n)
      Add multiple image-placeholders to an Operation.
    • addOperation

      public Operation addOperation(Operation pOperation)
      Add an Operation.
    • addDynamicOperation

      public Operation addDynamicOperation(DynamicOperation pOperation)
      Add a DynamicOperation to this Operation. We just save the DynamicOperation in the internal list and add a placeholder for the operation.
      Parameters:
      pOperation -
      Returns:
    • getDynamicOperations

      public LinkedList<DynamicOperation> getDynamicOperations()
      Return the list of DynmicOperations.
      Returns: