Enum ElementType

java.lang.Object
java.lang.Enum<ElementType>
eu.su.mas.dedale.env.ElementType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ElementType>, java.lang.constant.Constable

public enum ElementType
extends java.lang.Enum<ElementType>
implements java.io.Serializable
All the types of objects/elements that can be found in the environment, independently of the instantiation Not directly known by the end user, only by the environment manager
Author:
hc
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    COMMUNICATION  
    DIAMOND
    Diamond is visible at a distance of 0 and possess an occurrence percentage of 0.01
    GOLD
    GOld is visible at a distance of 0 and possess an occurrence percentage of 0.1
    LOCK
    The lock is associated to the treasure characteristics
    PATH
    Path is generated by the human controlled agent, is visible on the case it is released, and has an occurence that only depends on the agent position and current potential next-destination
    STENCH
    Stench is generated by the wumpus, is visible on the case it is released, and has an occurence that only depends on the wumpus position and dispersion radius
    WELL
    A Well is visible at a distance of 1 and possess an occurrence percentage of 0.05
    WIND
    The wind is generated by a well, is visible on the case it is released, and has an occurrence that only depends on the well position
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getName()  
    java.lang.Double getOccurrencePercentage()  
    int getRadius()  
    java.lang.Integer getValue()  
    java.lang.String toString()  
    static ElementType valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static ElementType[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf

    Methods inherited from class java.lang.Object

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

    • WELL

      public static final ElementType WELL
      A Well is visible at a distance of 1 and possess an occurrence percentage of 0.05
    • GOLD

      public static final ElementType GOLD
      GOld is visible at a distance of 0 and possess an occurrence percentage of 0.1
    • DIAMOND

      public static final ElementType DIAMOND
      Diamond is visible at a distance of 0 and possess an occurrence percentage of 0.01
    • STENCH

      public static final ElementType STENCH
      Stench is generated by the wumpus, is visible on the case it is released, and has an occurence that only depends on the wumpus position and dispersion radius
    • PATH

      public static final ElementType PATH
      Path is generated by the human controlled agent, is visible on the case it is released, and has an occurence that only depends on the agent position and current potential next-destination
    • WIND

      public static final ElementType WIND
      The wind is generated by a well, is visible on the case it is released, and has an occurrence that only depends on the well position
    • LOCK

      public static final ElementType LOCK
      The lock is associated to the treasure characteristics
    • COMMUNICATION

      public static final ElementType COMMUNICATION
  • Method Details

    • values

      public static ElementType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ElementType 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
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Enum<ElementType>
    • getRadius

      public int getRadius()
      Returns:
      the influence radius of the given component (0,1,2,..)
    • getName

      public java.lang.String getName()
      Returns:
      the name of the component
    • getOccurrencePercentage

      public java.lang.Double getOccurrencePercentage()
      Returns:
      occurrence percentage of the component on the map between [0,1] (null if not used)
    • getValue

      public java.lang.Integer getValue()
      Returns:
      value of the element (null if not used)