Interface ICalculator

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  ICalculator.A_Type
      Alpha register to merge key operations.
      static class  ICalculator.Display_Type
      The numeric Display currently displays the content of an Alpha register.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int A_Formatted
      Alpha register to display messages.Convenience and performance constants — so we don't have to go though the enum for constant access
      static int A_Key
      Alpha register to merge key operations.Convenience and performance constants — so we don't have to go thou the enum for constant access
      static int A_Message
      Alpha register to display messages.Convenience and performance constants — so we don't have to go though the enum for constant access
      static int A_Numeric
      Alpha register to enter and display numeric results.Convenience and performance constants — so we don't have to go though the enum for constant access
      static int A_Text
      Alpha register to enter and display textual results.Convenience and performance constants — so we don't have to go though the enum for constant access
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void displayClear()
      Clear all alpha register.
      void displayException​(@NotNull Throwable Exception)
      display additional information's on the error. this is device and setup dependent.
      void displayFormatted​(short @NotNull [] Text)
      Display value as formatted text
      void displayKey​(short @NotNull [] Text)
      * Display Key merge info.
      void displayL()
      Reset current value Display
      void displayMessage​(short @NotNull [] Text)
      Display texts as dual line message
      @NotNull ICalculator.Display_Type getDisplayMode()
      Current display mode Display_Alpha Displays the content of the Alpha register. Display_L Displays the content of the L0 aka X register. Display_Formatted Displays the content of the L0 aka X register inside an alpha
      boolean isRunning()  
      boolean isWaiting()
      is waiting in interactive mode for user input.
      int Last_Step()
      locate the last step to display the free steps or for debugging.
      void Load()
      Load Calculator State
      void Load​(@NotNull String Filename)
      Load the current status of the system
      default void Load​(File Filename)
      Load the current status of the system
      void reset()
      Reset the calculator
      default void resetAll()
      performs a full reset by deleting ram and the cache file as well a reloading the cache file.
      void run()
      Start virtual CPU
      void Save()
      Save Calculator State to default file
      void Save​(@NotNull String Filename)
      Save Calculator state
      default void Save​(File Filename)
      Save Calculator state
      void Save_Energy​(boolean enable)
      Enable or disable energy savings mode. for example by reducing thread priority.
      void setDisplayMode​(@NotNull ICalculator.Display_Type Display_Mode)
      Current display mode Display_Alpha Displays the content of the Alpha register. Display_L Displays the content of the L0 aka X register. Display_Formatted Displays the content of the L0 aka X register inside an alpha
      void stop()
      Stop virtual CPU and the thread it runs in
      • Methods inherited from interface net.sourceforge.uiq3.IPropertyNotifier

        addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
    • Field Detail

      • A_Formatted

        static final int A_Formatted

        Alpha register to display messages.Convenience and performance constants — so we don't have to go though the enum for constant access

        See Also:
        Constant Field Values
      • A_Key

        static final int A_Key

        Alpha register to merge key operations.Convenience and performance constants — so we don't have to go thou the enum for constant access

        See Also:
        Constant Field Values
      • A_Message

        static final int A_Message

        Alpha register to display messages.Convenience and performance constants — so we don't have to go though the enum for constant access

        See Also:
        Constant Field Values
      • A_Numeric

        static final int A_Numeric

        Alpha register to enter and display numeric results.Convenience and performance constants — so we don't have to go though the enum for constant access

        See Also:
        Constant Field Values
      • A_Text

        static final int A_Text

        Alpha register to enter and display textual results.Convenience and performance constants — so we don't have to go though the enum for constant access

        See Also:
        Constant Field Values
    • Method Detail

      • Last_Step

        int Last_Step()

        locate the last step to display the free steps or for debugging.

        Returns:
        last step
      • Load

        void Load()
        Load Calculator State
      • Load

        void Load​(@NotNull
                  @NotNull String Filename)
        Load the current status of the system
        Parameters:
        Filename - Filename to load data from
      • Load

        default void Load​(@NotNull
                          File Filename)
        Load the current status of the system
        Parameters:
        Filename - Filename to load data from
      • Save

        void Save()
        Save Calculator State to default file
      • Save

        void Save​(@NotNull
                  @NotNull String Filename)
        Save Calculator state
        Parameters:
        Filename - filename to save to
      • Save

        default void Save​(@NotNull
                          File Filename)
        Save Calculator state
        Parameters:
        Filename - filename to save to
      • Save_Energy

        void Save_Energy​(boolean enable)

        Enable or disable energy savings mode. for example by reducing thread priority.

        Parameters:
        enable - start saving energy
      • displayClear

        void displayClear()
        Clear all alpha register. And just calling "Clear" is not enough.
      • displayException

        void displayException​(@NotNull
                              @NotNull Throwable Exception)

        display additional information's on the error. this is device and setup dependent.

        Parameters:
        Exception - Exception to display
      • displayFormatted

        void displayFormatted​(short @NotNull [] Text)
        Display value as formatted text
        Parameters:
        Text - to be displayed
      • displayKey

        void displayKey​(short @NotNull [] Text)
        * Display Key merge info.
        Parameters:
        Text - info to be displayed
      • displayL

        void displayL()
        Reset current value Display
      • displayMessage

        void displayMessage​(short @NotNull [] Text)
        Display texts as dual line message
        Parameters:
        Text - to be displayed
      • getDisplayMode

        @NotNull
        @NotNull ICalculator.Display_Type getDisplayMode()
        Current display mode
        Display_Alpha
        Displays the content of the Alpha register.
        Display_L
        Displays the content of the L0 aka X register.
        Display_Formatted
        Displays the content of the L0 aka X register inside an alpha
        Returns:
        current display mode
      • setDisplayMode

        void setDisplayMode​(@NotNull
                            @NotNull ICalculator.Display_Type Display_Mode)
        Current display mode
        Display_Alpha
        Displays the content of the Alpha register.
        Display_L
        Displays the content of the L0 aka X register.
        Display_Formatted
        Displays the content of the L0 aka X register inside an alpha
        Parameters:
        Display_Mode - new display mode
      • isRunning

        boolean isRunning()
        Returns:
        true when calculator is running.
      • isWaiting

        @TestOnly
        boolean isWaiting()
        is waiting in interactive mode for user input.
        Returns:
        true when in interactive mode.
      • reset

        void reset()
        Reset the calculator
      • resetAll

        default void resetAll()

        performs a full reset by deleting ram and the cache file as well a reloading the cache file.

      • run

        void run()
        Start virtual CPU
        Specified by:
        run in interface Runnable
      • stop

        void stop()

        Stop virtual CPU and the thread it runs in