public interface EdgeDraft extends ElementDraft
Processors
decide if this edge will finally be
appended to the graph or not.ContainerLoader
ElementDraft.Factory
Modifier and Type | Method and Description |
---|---|
EdgeDirection |
getDirection()
Returns this edge's direction setting.
|
NodeDraft |
getSource()
Get edge's source.
|
NodeDraft |
getTarget()
Get edge's target.
|
Object |
getType()
Gets this edge's type.
|
double |
getWeight()
Returns this edge's weight.
|
boolean |
isSelfLoop()
Returns true if this edge is a self-loop.
|
void |
setDirection(EdgeDirection direction)
Sets this edge's direction setting.
|
void |
setSource(NodeDraft nodeSource)
Sets this edge's source.
|
void |
setTarget(NodeDraft nodeTarget)
Sets this edge's target.
|
void |
setType(Object type)
Sets this edge's type.
|
void |
setWeight(double weight)
Sets this edge's weight.
|
addInterval, addInterval, addIntervals, addTimestamp, addTimestamp, addTimestamps, getColor, getColumns, getGraphInterval, getGraphTimestamp, getId, getLabel, getLabelColor, getLabelSize, getTimeSet, getValue, isLabelVisible, parseAndSetValue, parseAndSetValue, parseAndSetValue, parseAndSetValue, parseAndSetValue, setColor, setColor, setColor, setColor, setColor, setLabel, setLabelColor, setLabelColor, setLabelColor, setLabelColor, setLabelColor, setLabelSize, setLabelVisible, setValue, setValue, setValue, setValue, setValue
void setWeight(double weight)
Default is 1.0.
weight
- edge's weightdouble getWeight()
void setType(Object type)
Edges can have different types but by default all edges have a default, null type. In other words, setting a type is optional.
type
- edge typeObject getType()
Edges can have different types but by default all edges have a default, null type. In other words, setting a type is optional.
void setDirection(EdgeDirection direction)
direction
- edge's directionEdgeDirection getDirection()
void setSource(NodeDraft nodeSource)
nodeSource
- node sourcevoid setTarget(NodeDraft nodeTarget)
Self-loops should simply set both source and target with the same node.
nodeTarget
- node targetNodeDraft getSource()
NodeDraft getTarget()
boolean isSelfLoop()
It returns false if the source or target is null.
Copyright © 2007–2015 Gephi Consortium. All rights reserved.