Package nl.tno.imb.mc

Enum ModelState

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ModelState>

    public enum ModelState
    extends java.lang.Enum<ModelState>
    The possible states of a model.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BUSY
      Busy.
      CALCULATING
      Calculating.
      IDLE
      Model is available for use.
      LOCK
      Claim model for use in this session.
      READY
      Ready.
      REMOVED
      Model is no longer available.
      UNLOCK
      Free model to be used in other session.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.util.Map<java.lang.Integer,​ModelState> commandMap
      Map to translate numeric value to enum.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static ModelState byValue​(int value)
      Lookup the ModelState that corresponds to the value.
      int getValue()
      Retrieve the integer value that represents this ModelState for transmission over IMB.
      static ModelState valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ModelState[] 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

      • READY

        public static final ModelState READY
        Ready.
      • CALCULATING

        public static final ModelState CALCULATING
        Calculating.
      • IDLE

        public static final ModelState IDLE
        Model is available for use.
      • LOCK

        public static final ModelState LOCK
        Claim model for use in this session.
      • UNLOCK

        public static final ModelState UNLOCK
        Free model to be used in other session.
      • REMOVED

        public static final ModelState REMOVED
        Model is no longer available.
    • Field Detail

      • commandMap

        protected static java.util.Map<java.lang.Integer,​ModelState> commandMap
        Map to translate numeric value to enum.
    • Method Detail

      • values

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

        public static ModelState 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
      • getValue

        public int getValue()
        Retrieve the integer value that represents this ModelState for transmission over IMB.
        Returns:
        int; the value that represents this ModelState in transmission over IMB
      • byValue

        protected static ModelState byValue​(int value)
        Lookup the ModelState that corresponds to the value.
        Parameters:
        value - int; the value to look up
        Returns:
        ModelState; the ModelState that corresponds to the value, or null if no ModelState with the specified value is defined