Class Query<T extends ACell>

Type Parameters:
T - Result type of Op
All Implemented Interfaces:
IValidated, IWriteable

public class Query<T extends ACell> extends AMultiOp<T>
Op for executing a sequence of child operations in order "Design is to take things apart in such a way that they can be put back together" - Rich Hickey
  • Constructor Details

  • Method Details

    • create

      public static <T extends ACell> Query<T> create(AOp<?>... ops)
    • recreate

      protected Query<T> recreate(ASequence<AOp<ACell>> newOps)
      Description copied from class: AMultiOp
      Recreates this object with an updated list of child Ops.
      Specified by:
      recreate in class AMultiOp<T extends ACell>
      Returns:
    • create

      public static <T extends ACell> Query<T> create(ASequence<AOp<ACell>> ops)
    • execute

      public <I extends ACell> Context<T> execute(Context<I> context)
      Description copied from class: AOp
      Executes this op with the given context. Must preserve depth unless an exceptional is returned.
      Specified by:
      execute in class AOp<T extends ACell>
      Type Parameters:
      I - Type of Context
      Parameters:
      context - Initial Context
      Returns:
      The updated Context after executing this operation
    • print

      public boolean print(BlobBuilder bb, long limit)
      Description copied from class: AObject
      Prints this Object to a readable String Representation. SECURITY: Must halt and return false in O(1) time if limit of printing is exceeded otherwise DoS attacks may be possible.
      Specified by:
      print in class AObject
      Parameters:
      bb - BlobBuilder to append to
      limit - Limit of printing in string bytes
      Returns:
      True if fully printed within limit, false otherwise
    • opCode

      public byte opCode()
      Description copied from class: AOp
      Returns the opcode for this op
      Specified by:
      opCode in class AOp<T extends ACell>
      Returns:
      Opcode as a byte
    • read

      public static <T extends ACell> Query<T> read(ByteBuffer b) throws BadFormatException
      Throws:
      BadFormatException