|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.molwind.model.BaseRelationship
public class BaseRelationship
BaseRelationship specifies a basic relationship type.
Constructor Summary | |
---|---|
BaseRelationship(WorldEntity newRight)
Creates a new relationship object where the left argument is assigned at a later stage. |
|
BaseRelationship(WorldEntity newLeft,
WorldEntity newRight)
Creates a new relationship object. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object object)
Compares this relationship to another. |
WorldEntity |
getLeft()
Gets the left entity. |
WorldEntity |
getRight()
Gets the right entity. |
int |
hashCode()
Returns a hash code value for this relationship. |
boolean |
isTransitive()
Returns whether this relationship supports transitivity. |
static BaseRelationship |
left(WorldEntity entity)
Returns a new relationship object with the given entity assigned as the left argument. |
boolean |
matches(Relationship relation)
Match the given relationship. |
static BaseRelationship |
right(WorldEntity entity)
Returns a new relationship object with the given entity assigned as the right argument. |
void |
setLeft(WorldEntity newLeft)
Set the Left value. |
void |
setRight(WorldEntity newRight)
Set the Right value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseRelationship(WorldEntity newLeft, WorldEntity newRight)
newLeft
- left argument world entitynewRight
- right argument world entitypublic BaseRelationship(WorldEntity newRight)
newRight
- right argument world entityMethod Detail |
---|
public void setLeft(WorldEntity newLeft)
newLeft
- the new Left valuepublic WorldEntity getLeft()
getLeft
in interface Relationship
public void setRight(WorldEntity newRight)
newRight
- the new Right valuepublic WorldEntity getRight()
getRight
in interface Relationship
public boolean isTransitive()
isTransitive
in interface Relationship
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the reference object with which to compare
public int hashCode()
equals(Object)
.
hashCode
in class java.lang.Object
public boolean matches(Relationship relation)
matches
in interface PartialMatch
relation
- the relationship template to match
public static BaseRelationship right(WorldEntity entity)
entity
- the world entity
public static BaseRelationship left(WorldEntity entity)
entity
- the world entity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |