Class MapGenerator.Builder
- java.lang.Object
-
- uk.gov.gchq.gaffer.data.generator.MapGenerator.Builder
-
- Enclosing class:
- MapGenerator
public static class MapGenerator.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MapGenerator
build()
Passes all of the configured information about anElement
into a newMapGenerator
MapGenerator.Builder
constant(String key, String value)
Stores any constants specific to a givenElement
.MapGenerator.Builder
destination(String mapKey)
Stores the Destination Vertex of anEdge
MapGenerator.Builder
direction(String mapKey)
Stores the Direction flag, indicating whether or not theEdge
is directed.MapGenerator.Builder
group(String mapKey)
Stores the group of anElement
.MapGenerator.Builder
identifier(IdentifierType identifierType, String mapKey)
Allows anIdentifierType
of anElement
to be stored, such as anEdge
'sIdentifierType.MATCHED_VERTEX
.MapGenerator.Builder
property(String propertyName, String mapKey)
Stores any additional properties of anElement
.
For example: property("count", "3").
This would add the "count" property with a value of "3".MapGenerator.Builder
source(String mapKey)
Stores the Source Vertex of anEdge
.MapGenerator.Builder
vertex(String mapKey)
Stores the Vertex of anEntity
.
-
-
-
Method Detail
-
group
public MapGenerator.Builder group(String mapKey)
Stores the group of anElement
.- Parameters:
mapKey
- the group of theElement
- Returns:
- a new
MapGenerator.Builder
-
property
public MapGenerator.Builder property(String propertyName, String mapKey)
Stores any additional properties of anElement
.
For example: property("count", "3").
This would add the "count" property with a value of "3".- Parameters:
propertyName
- the name of the propertymapKey
- the value of the property- Returns:
- a new
MapGenerator.Builder
-
vertex
public MapGenerator.Builder vertex(String mapKey)
Stores the Vertex of anEntity
.- Parameters:
mapKey
- the vertex contained within theEntity
- Returns:
- a new
MapGenerator.Builder
-
source
public MapGenerator.Builder source(String mapKey)
Stores the Source Vertex of anEdge
.- Parameters:
mapKey
- the source vertex- Returns:
- a new
MapGenerator.Builder
-
destination
public MapGenerator.Builder destination(String mapKey)
Stores the Destination Vertex of anEdge
- Parameters:
mapKey
- the destination vertex- Returns:
- a new
MapGenerator.Builder
-
direction
public MapGenerator.Builder direction(String mapKey)
Stores the Direction flag, indicating whether or not theEdge
is directed.- Parameters:
mapKey
- true or false for if theEdge
is directed or not- Returns:
- a new
MapGenerator.Builder
-
identifier
public MapGenerator.Builder identifier(IdentifierType identifierType, String mapKey)
Allows anIdentifierType
of anElement
to be stored, such as anEdge
'sIdentifierType.MATCHED_VERTEX
.- Parameters:
identifierType
- theIdentifierType
of theElement
mapKey
- the value for the corresponding field- Returns:
- a new
MapGenerator.Builder
-
constant
public MapGenerator.Builder constant(String key, String value)
Stores any constants specific to a givenElement
.- Parameters:
key
- the name of the constantvalue
- the value of the constant- Returns:
- a new
MapGenerator.Builder
-
build
public MapGenerator build()
Passes all of the configured information about anElement
into a newMapGenerator
- Returns:
- a new
MapGenerator
, containing all fields and constants
-
-