|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmodhelxs.abstractsemantics.NamedEntity
modhelxs.abstractsemantics.Pin
public class Pin
An implementation of Pin for the abstract semantics of ModHel'X.
| Field Summary | |
|---|---|
private java.util.Set<Relation> |
incoming_
The relations that have this pin as target. |
private java.util.Set<Relation> |
outgoing_
The relations that have this pin as origin. |
private ObservableEntity |
owner_
The entity this pin belongs to. |
private java.util.List<Pin> |
predecessors_
The list of pins which are the origin of a relation which has this pin as target. |
private java.util.List<Pin> |
successors_
The list of pins which are the target of a relation which has this pin as origin. |
private java.util.List<Token> |
tokens_
The tokens present on this pin. |
| Constructor Summary | |
|---|---|
Pin(java.lang.String name,
java.lang.Object... properties)
Build a new pin named name. |
|
| Method Summary | ||
|---|---|---|
void |
addIncoming(Relation r)
Add an incoming relation to this pin. |
|
void |
addOutgoing(Relation r)
Add an outgoing relation to this pin. |
|
Pin |
addToken(Token token)
Add a token to this pin. |
|
Pin |
clearTokens()
Delete all tokens on this pin. |
|
Relation |
connectTo(Pin dst)
|
|
java.util.Collection<Relation> |
getIncomingRelations()
Get the incoming relations for this pin (relations whose target is this pin). |
|
java.util.Collection<Relation> |
getOutgoingRelations()
Get the outgoing relations for this pin (relations whose origin is this pin). |
|
ObservableEntity |
getOwner()
Get the observable entity which has this pin in its interface. |
|
java.util.Collection<Pin> |
getPredecessorPins()
Get the predecessors of this pin (pins that are directly connected to it). |
|
java.util.Collection<Pin> |
getSuccessorPins()
Get the successors of this pin (pins to which it is directly connected). |
|
Token |
getToken(boolean remove)
Get a token from this pin, and remove it if remove is true. |
|
java.util.Collection<Token> |
getTokens()
Get the tokens that are on this pin. |
|
boolean |
hasToken()
Tell if this pin has at least a token on it. |
|
|
putValue(T value)
Add a token with a given value on this pin. |
|
|
putValue(Value<T> value)
Add a token with a given value on this pin. |
|
|
readValue(java.lang.Class<T> type,
boolean remove)
Get a token value from this pin, and remove the token if remove is true. |
|
void |
setOwner(ObservableEntity o)
Set the owner of this pin. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class modhelxs.abstractsemantics.NamedEntity |
|---|
getName, getProperties, getProperty, hasProperty, removeProperty, setName, setProperties, setProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface modhelxs.ecore.NamedEntity |
|---|
getName, getProperties, setName |
| Field Detail |
|---|
private ObservableEntity owner_
private java.util.List<Token> tokens_
private java.util.Set<Relation> incoming_
private java.util.Set<Relation> outgoing_
private java.util.List<Pin> successors_
private java.util.List<Pin> predecessors_
| Constructor Detail |
|---|
public Pin(java.lang.String name,
java.lang.Object... properties)
name.
| Method Detail |
|---|
public void setOwner(ObservableEntity o)
public ObservableEntity getOwner()
Pin
getOwner in interface Pinpublic Relation connectTo(Pin dst)
public boolean hasToken()
public Token getToken(boolean remove)
remove is true.
public <T> T readValue(java.lang.Class<T> type,
boolean remove)
remove is true.
public java.util.Collection<Token> getTokens()
public Pin addToken(Token token)
public <T> Pin putValue(T value)
public <T> Pin putValue(Value<T> value)
public Pin clearTokens()
public java.util.Collection<Relation> getIncomingRelations()
Pin
getIncomingRelations in interface Pinpublic java.util.Collection<Relation> getOutgoingRelations()
Pin
getOutgoingRelations in interface Pinpublic void addIncoming(Relation r)
public void addOutgoing(Relation r)
public java.util.Collection<Pin> getSuccessorPins()
public java.util.Collection<Pin> getPredecessorPins()
public java.lang.String toString()
toString in class NamedEntity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||