- java.lang.Object
-
- com.pervasive.datarush.graphs.LogicalStatistic.Builder
-
- Enclosing class:
- LogicalStatistic
public static final class LogicalStatistic.Builder extends Object
A builder for statistics. The following fields are required to be populated prior to callingbuild():
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a new builder with no fields populated
-
Method Summary
-
-
-
Method Detail
-
path
public GraphPath path()
Returns the value forLogicalStatistic.path().- Returns:
- the value for
LogicalStatistic.path().
-
path
public LogicalStatistic.Builder path(GraphPath path)
Sets the value forLogicalStatistic.path().- Parameters:
path- the value forLogicalStatistic.path().- Returns:
- a
thisreference to support method chaining.
-
nodeID
public VirtualNodeID nodeID()
Returns the value forLogicalStatistic.nodeID().- Returns:
- the value for
LogicalStatistic.nodeID().
-
assignment
public LogicalStatistic.Builder assignment(NodeAllocationState.AssignmentState assignment)
Sets the value forLogicalStatistic.originalNodeID()andLogicalStatistic.nodeID()based on the specified assignment.- Parameters:
assignment- the assignment to use to determineoriginalNodeIDandnodeID.- Returns:
- a
thisreference to support method chaining.
-
nodeID
public LogicalStatistic.Builder nodeID(VirtualNodeID nodeID)
Sets the value forLogicalStatistic.nodeID().- Parameters:
nodeID- the value forLogicalStatistic.nodeID().- Returns:
- a
thisreference to support method chaining.
-
originalNodeID
public VirtualNodeID originalNodeID()
Returns the value forLogicalStatistic.originalNodeID().- Returns:
- the value for
LogicalStatistic.originalNodeID().
-
originalNodeID
public LogicalStatistic.Builder originalNodeID(VirtualNodeID originalNodeID)
Sets the value forLogicalStatistic.originalNodeID().- Parameters:
originalNodeID- the value forLogicalStatistic.originalNodeID().- Returns:
- a
thisreference to support method chaining.
-
definition
public StatisticDefinition<?> definition()
Returns the value forLogicalStatistic.definition().- Returns:
- the value for
LogicalStatistic.definition().
-
supplier
public StatisticSupplier supplier()
Returns the value forLogicalStatistic.supplier().- Returns:
- the value for
LogicalStatistic.supplier().
-
define
public <T extends StatisticSupplier> LogicalStatistic.Builder define(StatisticDefinition<T> definition, T supplier)
Sets the values forLogicalStatistic.definition()andLogicalStatistic.supplier()based on those specified.- Type Parameters:
T- the type of supplied required by the definition- Parameters:
definition- the definitionsupplier- the supplier; must of of the a type that is compatible with the definition- Returns:
- a
thisreference to support method chaining.
-
define
public LogicalStatistic.Builder define(RuntimeStatistic<?> statistic)
Sets the values forLogicalStatistic.definition()andLogicalStatistic.supplier()based on those specified.- Parameters:
statistic- the statistic- Returns:
- a
thisreference to support method chaining.
-
build
public LogicalStatistic build()
Creates a new LogicalStatistic. The following fields are required to be populated prior to callingbuild():- Returns:
- a newly-created LogicalStatistic
-
-