|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmodel.DistanceEntity
public class DistanceEntity
Class for storing qualitative distance relations between different entities.
Nested Class Summary | |
---|---|
class |
DistanceEntity.DistanceFact
Class for storing relations added to this entity. |
Field Summary | |
---|---|
private DistanceSystem.DistSystem |
distanceSystem
the distance system of this entity |
private java.util.ArrayList<DistanceEntity.DistanceFact> |
facts
a list of fasts added to this entity |
private java.lang.String |
name
the entity name |
private java.util.HashMap<java.lang.String,java.util.ArrayList<DistanceEntity>> |
relations
a mapping of the distance ranges to the entities at each range |
Constructor Summary | |
---|---|
DistanceEntity(java.lang.String name,
DistanceSystem.DistSystem system)
Constructs a distance entity with the specified distance system. |
Method Summary | |
---|---|
void |
addDistanceRelation(java.lang.String distanceName,
DistanceEntity entity)
Adds a distance relation to this entity. |
java.lang.String |
getDistance(DistanceEntity entity)
Returns the distance relation to the specified entity. |
DistanceSystem.DistSystem |
getDistanceSystem()
Gets the distance system. |
java.util.ArrayList<DistanceEntity.DistanceFact> |
getFacts()
Gets the factboard for this entity. |
java.lang.String |
getName()
Gets the entity name. |
java.util.HashMap<java.lang.String,java.util.ArrayList<DistanceEntity>> |
getRelations()
Gets the mapping of distances to related entities. |
boolean |
relatedTo(DistanceEntity entity)
Returns true if the specified entity is related to this entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String name
private DistanceSystem.DistSystem distanceSystem
private java.util.HashMap<java.lang.String,java.util.ArrayList<DistanceEntity>> relations
private java.util.ArrayList<DistanceEntity.DistanceFact> facts
Constructor Detail |
---|
public DistanceEntity(java.lang.String name, DistanceSystem.DistSystem system)
system
- - the distance systemMethod Detail |
---|
public void addDistanceRelation(java.lang.String distanceName, DistanceEntity entity)
distanceName
- - the distance nameentity
- - the related entitypublic boolean relatedTo(DistanceEntity entity)
public java.lang.String getDistance(DistanceEntity entity)
entity
- - the related entity
public java.util.HashMap<java.lang.String,java.util.ArrayList<DistanceEntity>> getRelations()
public DistanceSystem.DistSystem getDistanceSystem()
public java.lang.String getName()
public java.util.ArrayList<DistanceEntity.DistanceFact> getFacts()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |