SourceType
- The type of the source object of the relation.TargetType
- The type of the target object of the relation.public class AbstractRelation<SourceType,TargetType> extends AbstractCloneableSerializable
Modifier and Type | Field and Description |
---|---|
protected SourceType |
source
The source object of the relation.
|
protected TargetType |
target
The target object of the relation.
|
Constructor and Description |
---|
AbstractRelation()
Creates a new
AbstractRelation with null source and target. |
AbstractRelation(SourceType source,
TargetType target)
Creates a new
AbstractRelation with the given source and target. |
Modifier and Type | Method and Description |
---|---|
SourceType |
getSource()
Gets the source object of the relation.
|
TargetType |
getTarget()
Sets the target object of the relation.
|
protected void |
setSource(SourceType source)
Sets the source object of the relation.
|
protected void |
setTarget(TargetType target)
Sets the target object of the relation.
|
clone
protected SourceType source
protected TargetType target
public AbstractRelation()
AbstractRelation
with null source and target.public AbstractRelation(SourceType source, TargetType target)
AbstractRelation
with the given source and target.source
- The source object of the relation.target
- The target object of the relation.public SourceType getSource()
protected void setSource(SourceType source)
source
- The source object of the relation.public TargetType getTarget()
protected void setTarget(TargetType target)
target
- The target object of the relation.