Class Ops


  • public final class Ops
    extends Object
    Generic Ops utilities
    Author:
    Gabriel Selzer
    • Method Detail

      • isRich

        public static boolean isRich​(Object op)
        Convenience function for determining whether op is a RichOp.
        Parameters:
        op - the Op
        Returns:
        true iff op is a RichOp
      • rich

        public static <T> RichOp<T> rich​(T op)
        Convenience function for getting the RichOp of op
        Type Parameters:
        T - the type of op
        Parameters:
        op - the Op
        Returns:
        the RichOp wrapping op
        Throws:
        IllegalArgumentException - when a RichOp cannot be obtained for op
      • signature

        public static String signature​(Object op)
        Convenience function for getting the signature of op
        Parameters:
        op - the Op
        Returns:
        the signature of op, which can be used to completely restore op
        Throws:
        IllegalArgumentException - if op is not an Op