|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnz.ac.waikato.mcennis.rat.graph.model.ModelShell
nz.ac.waikato.mcennis.rat.graph.link.BasicUserLink
public class BasicUserLink
Class providing a base implementation of the Link Interface
| Field Summary | |
|---|---|
static long |
serialVersionUID
|
| Fields inherited from class nz.ac.waikato.mcennis.rat.graph.model.ModelShell |
|---|
listener |
| Fields inherited from interface nz.ac.waikato.mcennis.rat.graph.link.Link |
|---|
ALL, DESTINATION, RELATION, SOURCE, STRENGTH |
| Constructor Summary | |
|---|---|
BasicUserLink()
Creates a generic link with no source, destination, and a strength of -1.0. |
|
BasicUserLink(Actor source,
double strength,
Actor destination)
Creates a new instance of BasicLink in a self-consistent state |
|
| Method Summary | |
|---|---|
void |
add(Property prop)
Add the given property to this link |
protected int |
compareProperties(Link right)
|
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object obj)
|
Actor |
getDestination()
Returns the actor where the link (edge, arc) terminates. |
java.util.List<Property> |
getProperty()
Return all properties associated with this link. |
Property |
getProperty(java.lang.String id)
Get the property with the given name. |
java.lang.String |
getRelation()
Returns the type (relation) of the link. |
Actor |
getSource()
Returns the actor from which the link (edge, arc) begins. |
double |
getStrength()
return the strength of this link. |
void |
init(Properties properties)
|
BasicUserLink |
prototype()
|
void |
removeProperty(java.lang.String id)
|
void |
set(Actor l,
double strength,
Actor r)
sets all aspects of the link at once |
void |
set(double str)
Sets the strength that this link has. |
void |
setDestination(Actor u)
Sets the destination of this link. |
void |
setRelation(java.lang.String t)
Sets the type (relation) of the link. |
void |
setSource(Actor u)
Sets the source of this link. |
| Methods inherited from class nz.ac.waikato.mcennis.rat.graph.model.ModelShell |
|---|
addListener, fireChange |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nz.ac.waikato.mcennis.rat.graph.model.Model |
|---|
addListener |
| Field Detail |
|---|
public static final long serialVersionUID
| Constructor Detail |
|---|
public BasicUserLink()
public BasicUserLink(Actor source,
double strength,
Actor destination)
source - source actor - may not be nullstrength - link strengthdestination - destination actor - may not be null| Method Detail |
|---|
public double getStrength()
Link
getStrength in interface Linkpublic Actor getSource()
Link
getSource in interface Linkpublic Actor getDestination()
Link
getDestination in interface Link
public void set(Actor l,
double strength,
Actor r)
Link
set in interface Linkl - source actorstrength - strength of this lengthr - destination actorpublic java.lang.String getRelation()
Link
getRelation in interface Linkpublic void setRelation(java.lang.String t)
Link
setRelation in interface Linkt - string describing the typepublic void setSource(Actor u)
Link
setSource in interface Linku - actor sourcepublic void setDestination(Actor u)
Link
setDestination in interface Linku - destination actor.public void set(double str)
Link
set in interface Linkstr - sterngth of this link.public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableprotected int compareProperties(Link right)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic void add(Property prop)
Link
add in interface Linkpublic Property getProperty(java.lang.String id)
Link
getProperty in interface Linkid - id of the property to be returned
public java.util.List<Property> getProperty()
Link
getProperty in interface Linkpublic BasicUserLink prototype()
prototype in interface Linkpublic void init(Properties properties)
init in interface Linkpublic void removeProperty(java.lang.String id)
removeProperty in interface Link
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||