Package jadex.rules.rulesystem.rules
Class Variable
- java.lang.Object
-
- jadex.rules.rulesystem.rules.Variable
-
public class Variable extends java.lang.Object
Class for a typed variable.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
multi
Flag if it is a multi variable.protected java.lang.String
name
The variable name.static Variable
STATE
The predefined state variable.protected boolean
temporary
Flag indicating a temporary variable (not used in rhs).protected OAVObjectType
type
The object type.
-
Constructor Summary
Constructors Constructor Description Variable(java.lang.String name, OAVObjectType type)
Create a new variable.Variable(java.lang.String name, OAVObjectType type, boolean multi, boolean temporary)
Create a new variable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Test for equality.java.lang.String
getName()
Get the name.OAVObjectType
getType()
Get the type.int
hashCode()
Get the hash code.boolean
isMulti()
Test if it is a multi variable.boolean
isTemporary()
Test if variable is temporary.void
setType(OAVObjectType type)
Set the type.java.lang.String
toString()
Get the string representation.
-
-
-
Field Detail
-
STATE
public static final Variable STATE
The predefined state variable.
-
name
protected java.lang.String name
The variable name.
-
type
protected OAVObjectType type
The object type.
-
multi
protected boolean multi
Flag if it is a multi variable.
-
temporary
protected boolean temporary
Flag indicating a temporary variable (not used in rhs).
-
-
Constructor Detail
-
Variable
public Variable(java.lang.String name, OAVObjectType type)
Create a new variable.
-
Variable
public Variable(java.lang.String name, OAVObjectType type, boolean multi, boolean temporary)
Create a new variable.
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name.- Returns:
- The name.
-
getType
public OAVObjectType getType()
Get the type.- Returns:
- The type.
-
setType
public void setType(OAVObjectType type)
Set the type.- Parameters:
type
- The type to set.
-
isMulti
public boolean isMulti()
Test if it is a multi variable. A multi variable can hold 0 - * values- Returns:
- True if multi variable.
-
isTemporary
public boolean isTemporary()
Test if variable is temporary.- Returns:
- True, if temporary.
-
hashCode
public int hashCode()
Get the hash code.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hash code.
-
equals
public boolean equals(java.lang.Object obj)
Test for equality.- Overrides:
equals
in classjava.lang.Object
- Returns:
- True, if equal.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
-