Class Op_Num

    • Field Detail

      • Logger

        private static final Logger Logger

        Class logger instance.

      • TAG

        private static final String TAG

        Class logger tag.

    • Constructor Detail

      • Op_Num

        Op_Num​(@NotNull
               @NotNull Calculator Owner)
        Create operation and attach to owning calculator.
        Parameters:
        Owner - Calculator which will call this Opcode
    • Method Detail

      • Add_Digit

        static void Add_Digit​(@NotNull
                              @NotNull Calculator Owner,
                              short Digit)
                       throws Error

        Add a Digit

        Parameters:
        Owner - owning calculator
        Digit - to add
        Throws:
        Error - something went wrong.
        Error
      • Clear

        public void Clear​(boolean AC)
        Reset state - for state full operations.
        Parameters:
        AC - All Clear reset
        See Also:
        IClear.Clear(boolean)
      • Display

        public short @NotNull [] Display​(short Opcode)
        Display operation in Prog mode.
        Parameters:
        Opcode - Virtual CPU Operation to be executed
        Returns:
        String to be displayed
        See Also:
        IProgrammable_Operation.Display(short)
      • Execute

        public void Execute​(short Opcode)
                     throws Error
        Execute token representing a 0
        Parameters:
        Opcode - Virtual CPU Operation to be executed
        Throws:
        Error - "Error" is an abstract exception class representing all possible errors the calculator can produce.
        Error
        See Also:
        IOperation.Execute(short)