Package org.graphstream.stream
Class Timeline
java.lang.Object
org.graphstream.stream.Timeline
- All Implemented Interfaces:
Iterable<Graph>,Replayable,Source
public class Timeline extends Object implements Source, Replayable, Iterable<Graph>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.graphstream.stream.Replayable
Replayable.Controller -
Field Summary
Fields Modifier and Type Field Description static StringTIME_PREFIX -
Constructor Summary
Constructors Constructor Description Timeline() -
Method Summary
Modifier and Type Method Description voidaddAttributeSink(AttributeSink sink)Add a sink for attribute events only.voidaddElementSink(ElementSink sink)Add a sink for elements events only.voidaddSink(Sink sink)Add a sink for all graph events (attributes and graph elements) coming from this source.voidbegin(Graph source)voidbegin(Source source)voidclearAttributeSinks()Remove all listener attribute sinks.voidclearElementSinks()Remove all listener element sinks.voidclearSinks()Remove all listener sinks.voidend()Replayable.ControllergetReplayController()Get a controller to replay the graph.booleanhasNext()booleanhasPrevious()Iterator<Graph>iterator()static voidmain(String... strings)voidnext()voidplay()voidplay(double from, double to)voidplay(double from, double to, Sink sink)voidplay(Sink sink)voidplayback()voidplayback(Sink sink)voidprevious()voidremoveAttributeSink(AttributeSink sink)Remove an attribute sink.voidremoveElementSink(ElementSink sink)Remove an element sink.voidremoveSink(Sink sink)Remove a sink.voidreset()voidseek(int i)voidseekEnd()voidseekStart()
-
Field Details
-
TIME_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Timeline
public Timeline()
-
-
Method Details
-
reset
public void reset() -
play
public void play(double from, double to) -
play
-
play
public void play() -
play
-
playback
public void playback() -
playback
-
seek
public void seek(int i) -
seekStart
public void seekStart() -
seekEnd
public void seekEnd() -
hasNext
public boolean hasNext() -
next
public void next() -
hasPrevious
public boolean hasPrevious() -
previous
public void previous() -
begin
- Parameters:
source-
-
begin
- Parameters:
source-
-
end
public void end() -
iterator
-
getReplayController
Description copied from interface:ReplayableGet a controller to replay the graph.- Specified by:
getReplayControllerin interfaceReplayable- Returns:
- a new replay controller
-
addSink
Description copied from interface:SourceAdd a sink for all graph events (attributes and graph elements) coming from this source. This is similar to registering a sink for attributes an another for elements. -
removeSink
Description copied from interface:SourceRemove a sink.- Specified by:
removeSinkin interfaceSource- Parameters:
sink- The sink to remove, if it does not exist, this is ignored silently.
-
addAttributeSink
Description copied from interface:SourceAdd a sink for attribute events only. Attribute events include attribute addition change and removal.- Specified by:
addAttributeSinkin interfaceSource- Parameters:
sink- The sink to register.
-
removeAttributeSink
Description copied from interface:SourceRemove an attribute sink.- Specified by:
removeAttributeSinkin interfaceSource- Parameters:
sink- The sink to remove, if it does not exist, this is ignored silently.
-
addElementSink
Description copied from interface:SourceAdd a sink for elements events only. Elements events include, addition and removal of nodes and edges, as well as step events.- Specified by:
addElementSinkin interfaceSource- Parameters:
sink- The sink to register.
-
removeElementSink
Description copied from interface:SourceRemove an element sink.- Specified by:
removeElementSinkin interfaceSource- Parameters:
sink- The sink to remove, if it does not exist, this is ignored silently.
-
clearElementSinks
public void clearElementSinks()Description copied from interface:SourceRemove all listener element sinks.- Specified by:
clearElementSinksin interfaceSource
-
clearAttributeSinks
public void clearAttributeSinks()Description copied from interface:SourceRemove all listener attribute sinks.- Specified by:
clearAttributeSinksin interfaceSource
-
clearSinks
public void clearSinks()Description copied from interface:SourceRemove all listener sinks.- Specified by:
clearSinksin interfaceSource
-
main
- Throws:
Exception
-