Package astra.lang

Class Console


  • public class Console
    extends Module
    This API provides support for I/O via the Java console. It does this via java.lang.System.in and java.lang.System.out respectively.
    Author:
    Rem Collier
    • Constructor Detail

      • Console

        public Console()
    • Method Detail

      • println

        public boolean println​(String string)
        Action to print a string followed by a new line.
        Parameters:
        string - the string to be output
        Returns:
        true if the action is successful, false otherwise
      • println

        public boolean println​(Funct funct)
        Action to print a string followed by a new line.
        Parameters:
        funct - the string to be output
        Returns:
        true if the action is successful, false otherwise
      • println

        public boolean println​(Formula formula)
        Action to print a formula followed by a new line.
        Parameters:
        formula - the formula to be output
        Returns:
        true if the action is successful, false otherwise
      • println

        public boolean println​(Integer integer)
        Action to print a int followed by a new line.
        Parameters:
        integer - the int to be output
        Returns:
        true if the action is successful, false otherwise
      • println

        public boolean println​(Long value)
        Action to print a long followed by a new line.
        Parameters:
        value - the long to be output
        Returns:
        true if the action is successful, false otherwise
      • println

        public boolean println​(Float value)
        Action to print a float followed by a new line.
        Parameters:
        value - the float to be output
        Returns:
        true if the action is successful, false otherwise
      • println

        public boolean println​(Double value)
        Action to print a double followed by a new line.
        Parameters:
        value - the double to be output
        Returns:
        true if the action is successful, false otherwise
      • println

        public boolean println​(Character value)
        Action to print a char followed by a new line.
        Parameters:
        value - the char to be output
        Returns:
        true if the action is successful, false otherwise
      • println

        public boolean println​(Boolean bool)
        Action to print a boolean followed by a new line.
        Parameters:
        bool - the boolean to be output
        Returns:
        true if the action is successful, false otherwise
      • println

        public boolean println​(ListTerm list)
        Action to print an ASTRA list followed by a new line.
        Parameters:
        list - the ASTRA list to be output
        Returns:
        true if the action is successful, false otherwise
      • println

        public boolean println​(Object obj)
        Action to print an object followed by a new line.
        Parameters:
        obj - the object to be output
        Returns:
        true if the action is successful, false otherwise
      • print

        public boolean print​(Long value)
        Action to print a long (no new line).
        Parameters:
        value - the long to be output
        Returns:
        true if the action is successful, false otherwise
      • print

        public boolean print​(Float value)
        Action to print a float (no new line).
        Parameters:
        value - the float to be output
        Returns:
        true if the action is successful, false otherwise
      • print

        public boolean print​(Double value)
        Action to print a double (no new line).
        Parameters:
        value - the double to be output
        Returns:
        true if the action is successful, false otherwise
      • print

        public boolean print​(Integer value)
        Action to print a integer (no new line).
        Parameters:
        value - the integer to be output
        Returns:
        true if the action is successful, false otherwise
      • print

        public boolean print​(String value)
        Action to print a string (no new line).
        Parameters:
        value - the string to be output
        Returns:
        true if the action is successful, false otherwise
      • print

        public boolean print​(Boolean value)
        Action to print a boolean (no new line).
        Parameters:
        value - the boolean to be output
        Returns:
        true if the action is successful, false otherwise
      • print

        public boolean print​(Character value)
        Action to print a char (no new line).
        Parameters:
        value - the char to be output
        Returns:
        true if the action is successful, false otherwise
      • print

        public boolean print​(Formula formula)
        Action to print a formula (no new line).
        Parameters:
        formula - the formula to be output
        Returns:
        true if the action is successful, false otherwise
      • print

        public boolean print​(Object obj)
        Action to print an object (no new line).
        Parameters:
        obj - the object to be output
        Returns:
        true if the action is successful, false otherwise
      • printClassName

        public boolean printClassName​(Object obj)
        Action to print the canonical class name of an object.
        Parameters:
        obj - the object.
        Returns:
        true if the action is successful, false otherwise
      • readInt

        public boolean readInt​(ActionParam<Integer> value)
        Action to read an integer value from the console.
        Parameters:
        value - a container for holding the value.
        Returns:
        true if the action is successful, false otherwise
      • readLong

        public boolean readLong​(ActionParam<Long> value)
        Action to read an long value from the console.
        Parameters:
        value - a container for holding the value.
        Returns:
        true if the action is successful, false otherwise
      • readFloat

        public boolean readFloat​(ActionParam<Float> value)
        Action to read an float value from the console.
        Parameters:
        value - a container for holding the value.
        Returns:
        true if the action is successful, false otherwise
      • readDouble

        public boolean readDouble​(ActionParam<Double> value)
        Action to read an double value from the console.
        Parameters:
        value - a container for holding the value.
        Returns:
        true if the action is successful, false otherwise
      • readString

        public boolean readString​(ActionParam<String> value)
        Action to read a string value from the console.
        Parameters:
        value - a container for holding the value.
        Returns:
        true if the action is successful, false otherwise