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 MapGeneratorbuild()Passes all of the configured information about anElementinto a newMapGeneratorMapGenerator.Builderconstant(String key, String value)Stores any constants specific to a givenElement.MapGenerator.Builderdestination(String mapKey)Stores the Destination Vertex of anEdgeMapGenerator.Builderdirection(String mapKey)Stores the Direction flag, indicating whether or not theEdgeis directed.MapGenerator.Buildergroup(String mapKey)Stores the group of anElement.MapGenerator.Builderidentifier(IdentifierType identifierType, String mapKey)Allows anIdentifierTypeof anElementto be stored, such as anEdge'sIdentifierType.MATCHED_VERTEX.MapGenerator.Builderproperty(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.Buildersource(String mapKey)Stores the Source Vertex of anEdge.MapGenerator.Buildervertex(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 theEdgeis directed.- Parameters:
mapKey- true or false for if theEdgeis directed or not- Returns:
- a new
MapGenerator.Builder
-
identifier
public MapGenerator.Builder identifier(IdentifierType identifierType, String mapKey)
Allows anIdentifierTypeof anElementto be stored, such as anEdge'sIdentifierType.MATCHED_VERTEX.- Parameters:
identifierType- theIdentifierTypeof theElementmapKey- 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 anElementinto a newMapGenerator- Returns:
- a new
MapGenerator, containing all fields and constants
-
-