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

        private 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.
        Specified by:
        Clear in interface IClear
        Parameters:
        AC - All Clear reset
        See Also:
        IClear.Clear(boolean)
      • Execute

        public void Execute​(short Opcode)
                     throws Error
        Execute token representing a 0
        Specified by:
        Execute in interface IOperation
        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)