public class GraphEncoder extends Object
Constructor and Description |
---|
GraphEncoder() |
Modifier and Type | Method and Description |
---|---|
static Graph |
decode(String encodedGraph,
boolean noMonth)
convert a String-encoded graph into a usable Graph object, using
default GraphConfiguration
|
static Graph |
decode(String encodedGraph,
GraphConfiguration config)
convert a String-encoded graph into a usable Graph object, using
the provided GraphConfiguration.
|
static String |
encode(Graph g)
Convert a complete Graph into an opaque String that can later be
re-assembled into a Graph object.
|
static String |
encode(int width,
int height,
RegionData[] data)
Convert a Graph fields into an opaque String that can later be
re-assembled into a Graph object.
|
static String |
encodeHex(int[] values) |
public static Graph decode(String encodedGraph, boolean noMonth) throws GraphEncodingException
encodedGraph
- String encoded graph, as returned by getEncoded()noMonth
- if true, disable the month highlight colorGraphEncodingException
- if there were problems with the encoded
datapublic static Graph decode(String encodedGraph, GraphConfiguration config) throws GraphEncodingException
encodedGraph
- String encoded graph, as returned by getEncoded()config
- the GraphConfiguration to useGraphEncodingException
- if there were problems with the encoded
datapublic static String encode(Graph g)
g
- Graph to encodepublic static String encode(int width, int height, RegionData[] data)
width
- of the Graphheight
- of the Graphdata
- array of RegionData for the graphpublic static String encodeHex(int[] values)
Copyright © 2005–2015 IIPC. All rights reserved.