Package com.storedobject.chart
Class SankeyData
java.lang.Object
- All Implemented Interfaces:
AbstractDataProvider<SankeyData.Node>
,ComponentPart
,ComponentProperty
,SankeyDataProvider
,Serializable
,Cloneable
,Iterable<SankeyData.Node>
,Collection<SankeyData.Node>
,List<SankeyData.Node>
,RandomAccess
,SequencedCollection<SankeyData.Node>
A concrete implementation of
SankeyDataProvider
as an ArrayList
of SankeyData.Node
s. It detects
duplicate SankeyData.Node
s and circular references in SankeyData.Edge
s.- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class that defines an edge between 2 Sankey nodes.static class
Sankey data node class.Nested classes/interfaces inherited from interface com.storedobject.chart.AbstractDataProvider
AbstractDataProvider.NumberComparator
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEdge
(SankeyData.Edge edge) Add anSankeyData.Edge
.getEdges()
Get the edges.getNodes()
Get the nodes.void
validate()
This method is invoked bySOChart
to check if the component or part is valid or not.Methods inherited from class com.storedobject.chart.AbstractData
asList, getDataType, getName, getSerial, setName, setSerial, stream
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.storedobject.chart.AbstractDataProvider
create, create, encode, encodeJSON, getComparator, getId, getMax, getMin
Methods inherited from interface java.util.Collection
parallelStream, toArray
Methods inherited from interface com.storedobject.chart.ComponentPart
className, getRenderingIndex, getSerial, setName, setRenderingIndex, setSerial
Methods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
SankeyData
-
-
Method Details
-
addEdge
Add anSankeyData.Edge
.- Parameters:
edge
-SankeyData.Edge
to be added. If theSankeyData.Edge
containsSankeyData.Node
s that are not part of this, it will be automatically added.
-
getNodes
Description copied from interface:SankeyDataProvider
Get the nodes. The stream should not contain duplicate node names.- Specified by:
getNodes
in interfaceSankeyDataProvider
- Returns:
- Nodes as a stream.
-
getEdges
Description copied from interface:SankeyDataProvider
Get the edges. The stream should not contain edges with circular references.- Specified by:
getEdges
in interfaceSankeyDataProvider
- Returns:
- Edges as a stream.
-
validate
Description copied from interface:ComponentPart
This method is invoked bySOChart
to check if the component or part is valid or not.- Specified by:
validate
in interfaceAbstractDataProvider<SankeyData.Node>
- Specified by:
validate
in interfaceComponentPart
- Throws:
ChartException
- Raises exception if the component or part is not valid.
-