Enum PredefinedModeType

  • All Implemented Interfaces:
    Serializable, Comparable<PredefinedModeType>

    public enum PredefinedModeType
    extends Enum<PredefinedModeType>
    While PLANit allows the user to come up with its own modes. It does suggest a number of predefined modes to use. This is especially useful to get started quickly or when one wants to use the PLANit memory model to convert networks of one type to another with PLANit as the intermediary memory model, in which case some kind of mapping between known modes is required. When a custom mode is used, i.e., the mode factory is not used to create one of the defaults, the type of the mode is automatically set to CUSTOM
    Author:
    markr
    • Method Detail

      • values

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

        public static PredefinedModeType 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
      • value

        public final String value()
      • create

        public static PredefinedModeType create​(String predefinedModeTypeValue)
        convert string to enum. When no match can be found, the custom type is returned
        Parameters:
        predefinedModeTypeValue - to convert to enum
        Returns:
        the enum value, CUSTOM when no match could be found
      • getPredefinedModeTypesWithout

        public static EnumSet<PredefinedModeType> getPredefinedModeTypesWithout​(PredefinedModeType... excludedModeTypes)
        Collect all predefined mode types
        Parameters:
        excludedModeTypes - option to exclude predefined custom modes from the result
        Returns:
        predefined mode types minus excluded types
      • getPredefinedModeTypes

        public static EnumSet<PredefinedModeType> getPredefinedModeTypes()
        collect all predefined mode types
        Returns:
        predefined mode types