Enum Collatz.SequenceState

    • Enum Constant Detail

      • STOPPING_TIME

        public static final Collatz.SequenceState STOPPING_TIME
        A Hailstone sequence state that indicates the stopping time, a value less than the initial, has been reached.
      • TOTAL_STOPPING_TIME

        public static final Collatz.SequenceState TOTAL_STOPPING_TIME
        A Hailstone sequence state that indicates the total stopping time, a value of 1, has been reached.
      • CYCLE_INIT

        public static final Collatz.SequenceState CYCLE_INIT
        A Hailstone and TreeGraph sequence state that indicates the first occurence of a value that subsequently forms a cycle.
      • CYCLE_LENGTH

        public static final Collatz.SequenceState CYCLE_LENGTH
        A Hailstone and TreeGraph sequence state that indicates the last occurence of a value that has already formed a cycle.
      • MAX_STOP_OUT_OF_BOUNDS

        public static final Collatz.SequenceState MAX_STOP_OUT_OF_BOUNDS
        A Hailstone and TreeGraph sequence state that indicates the sequence or traversal has executed some imposed 'maximum' amount of times.
      • ZERO_STOP

        public static final Collatz.SequenceState ZERO_STOP
        A Hailstone sequence state that indicates the sequence terminated by reaching "0", a special type of "stopping time".
    • Method Detail

      • values

        public static Collatz.SequenceState[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Collatz.SequenceState c : Collatz.SequenceState.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Collatz.SequenceState valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getLabel

        protected String getLabel()
        Retrieve the sequence state string associated with the enum.
        Returns:
        The stringy form of the enum.