Enum MemoryProfile
- java.lang.Object
-
- java.lang.Enum<MemoryProfile>
-
- laas.openrobots.ontology.modules.memory.MemoryProfile
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MemoryProfile>
public enum MemoryProfile extends java.lang.Enum<MemoryProfile>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULT
Default memory profile is equivalent to the long term memory profile.EPISODIC
This represents episodic memory (memory of personal experience).LONGTERM
This represents long term memory.SHORTTERM
This represents short term memory (or working memory).
-
Field Summary
Fields Modifier and Type Field Description static int
TimeBase
The time base states "how long a second lasts in milliseconds".
The default value is obviously 1000, but you can alter this value to accelerate (or slow down) the behaviour of the memory storage.
For instance, if you settimeBase = 500
, the actual duration a short term statement is divided by 2 (ie 5 seconds instead of the default 10 seconds)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
duration()
Returns the lifespan associated to the memory profile, in milliseconds, scaled with the TimeBase.static MemoryProfile
fromString(java.lang.String literalMemProfile)
Returns a MemoryProfile constant from its string representation, orDEFAULT
if the string is not recognized.static MemoryProfile
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MemoryProfile[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SHORTTERM
public static final MemoryProfile SHORTTERM
This represents short term memory (or working memory). A statement added in short term memory is held for 10 seconds.
-
EPISODIC
public static final MemoryProfile EPISODIC
This represents episodic memory (memory of personal experience). A statement added in episodic memory is held for 5 minutes.
-
LONGTERM
public static final MemoryProfile LONGTERM
This represents long term memory. A statement added in long term memory is never forgotten.
-
DEFAULT
public static final MemoryProfile DEFAULT
Default memory profile is equivalent to the long term memory profile.- See Also:
LONGTERM
-
-
Field Detail
-
TimeBase
public static int TimeBase
The time base states "how long a second lasts in milliseconds".
The default value is obviously 1000, but you can alter this value to accelerate (or slow down) the behaviour of the memory storage.
For instance, if you settimeBase = 500
, the actual duration a short term statement is divided by 2 (ie 5 seconds instead of the default 10 seconds)
-
-
Method Detail
-
values
public static MemoryProfile[] 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 (MemoryProfile c : MemoryProfile.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MemoryProfile 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 namejava.lang.NullPointerException
- if the argument is null
-
duration
public int duration()
Returns the lifespan associated to the memory profile, in milliseconds, scaled with the TimeBase.- Returns:
- the lifespan associated to the memory profile, in milliseconds
- See Also:
TimeBase
-
fromString
public static MemoryProfile fromString(java.lang.String literalMemProfile)
Returns a MemoryProfile constant from its string representation, orDEFAULT
if the string is not recognized.- Parameters:
literalMemProfile
- the string representation of a MemoryProfile- Returns:
- The corresponding MemoryProfile constant.
-
-