Modifier and Type | Class and Description |
---|---|
static class |
TAction.Type
The action type.
|
Constructor and Description |
---|
TAction(java.lang.String identity)
Makes a blank action.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtraStrings(java.lang.String extraString)
Adds an extra string.
|
void |
addName(java.lang.String name)
Adds an action name.
|
int |
compareTo(TAction action) |
boolean |
containsExtraString(java.lang.String extraString)
Checks if this action contains this extra string, case-insensitively.
|
boolean |
containsName(java.lang.String name)
Checks if this action contains this name, case-insensitively.
|
static TAction |
create(java.io.InputStream in)
Creates this object from an input stream, expecting its byte representation.
|
boolean |
equals(TAction action)
Compares actions.
|
boolean |
equals(java.lang.Object object) |
void |
fromBytes(byte[] data)
Reads this object's representation from a byte array.
|
java.lang.Iterable<java.lang.String> |
getExtraStrings()
Gets this action's extra strings.
|
java.lang.String |
getIdentity()
Gets the identity (primary identifier name).
|
java.lang.Iterable<java.lang.String> |
getNames()
Gets the names of this action.
|
TAction.Type |
getType()
Gets the action type.
|
int |
hashCode() |
boolean |
isReversed()
Checks if this reverses the context of a strict ditransitive action.
|
boolean |
isStrict()
Checks if this action is strict.
|
void |
readBytes(java.io.InputStream in)
Imports this object from bytes.
|
void |
setReversed(boolean reversed)
Sets if this reverses the context of a strict ditransitive action.
|
void |
setStrict(boolean strict)
Sets if this action is strict.
|
void |
setType(TAction.Type type)
Sets the action type.
|
byte[] |
toBytes()
Gets this object's representation as bytes.
|
java.lang.String |
toString() |
void |
writeBytes(java.io.OutputStream out)
Exports this object to bytes.
|
public TAction(java.lang.String identity)
identity
- this action's identity.java.lang.IllegalArgumentException
- if identity is blank.public java.lang.String getIdentity()
public TAction.Type getType()
public void setType(TAction.Type type)
type
- the action type.java.lang.IllegalArgumentException
- if type is null.public boolean isStrict()
public void setStrict(boolean strict)
strict
- true if strict, false if not.public boolean isReversed()
public void setReversed(boolean reversed)
reversed
- true if so, false if not.public void addName(java.lang.String name)
name
- the name to add.public boolean containsName(java.lang.String name)
name
- the name to check for.public java.lang.Iterable<java.lang.String> getNames()
public void addExtraStrings(java.lang.String extraString)
extraString
- the string to add.public boolean containsExtraString(java.lang.String extraString)
extraString
- the string to check for.public java.lang.Iterable<java.lang.String> getExtraStrings()
public int compareTo(TAction action)
compareTo
in interface java.lang.Comparable<TAction>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public boolean equals(TAction action)
action
- the other action.public java.lang.String toString()
toString
in class java.lang.Object
public static TAction create(java.io.InputStream in) throws java.io.IOException
in
- the input stream to read from.java.io.IOException
- if a read error occurs.public void writeBytes(java.io.OutputStream out) throws java.io.IOException
Saveable
writeBytes
in interface Saveable
out
- the output stream to write to.java.io.IOException
- if a write problem occurs.public void readBytes(java.io.InputStream in) throws java.io.IOException
Saveable
public byte[] toBytes() throws java.io.IOException
Saveable
public void fromBytes(byte[] data) throws java.io.IOException
Saveable