Package eu.su.mas.dedale.env
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
-
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.01GOLD
GOld is visible at a distance of 0 and possess an occurrence percentage of 0.1LOCK
The lock is associated to the treasure characteristicsPATH
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-destinationSTENCH
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 radiusWELL
A Well is visible at a distance of 1 and possess an occurrence percentage of 0.05WIND
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.
-
Enum Constant Details
-
WELL
A Well is visible at a distance of 1 and possess an occurrence percentage of 0.05 -
GOLD
GOld is visible at a distance of 0 and possess an occurrence percentage of 0.1 -
DIAMOND
Diamond is visible at a distance of 0 and possess an occurrence percentage of 0.01 -
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
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
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
The lock is associated to the treasure characteristics -
COMMUNICATION
-
-
Method Details
-
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
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 namejava.lang.NullPointerException
- if the argument is null
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.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)
-