Enum Proposal.State

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Proposal.State>
    Enclosing class:
    Proposal

    public static enum Proposal.State
    extends java.lang.Enum<Proposal.State>
    Current state of the proposal.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ABORTED
      Proposal was aborted and did not reach consensus.
      EXECUTED
      Proposal was executed through a round.
      NEW
      Proposal has not yet been given to a KetchLeader.
      QUEUED
      Proposal was validated and has entered the queue, but a round containing this proposal has not started yet.
      RUNNING
      Round containing the proposal has begun and is in progress.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean done  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private State​(boolean done)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isDone()  
      static Proposal.State valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Proposal.State[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • QUEUED

        public static final Proposal.State QUEUED
        Proposal was validated and has entered the queue, but a round containing this proposal has not started yet.
      • RUNNING

        public static final Proposal.State RUNNING
        Round containing the proposal has begun and is in progress.
      • ABORTED

        public static final Proposal.State ABORTED
        Proposal was aborted and did not reach consensus.
    • Field Detail

      • done

        private final boolean done
    • Constructor Detail

      • State

        private State​(boolean done)
    • Method Detail

      • values

        public static Proposal.State[] 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 (Proposal.State c : Proposal.State.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Proposal.State valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isDone

        public boolean isDone()
        Returns:
        true if this is a terminal state.