Class ApproverHierarchyBuilder
- All Implemented Interfaces:
Builder<ApproverHierarchy>
Example to create an instance using the builder pattern
ApproverHierarchy approverHierarchy = ApproverHierarchy.builder()
.plusTiers(tiersBuilder -> tiersBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAll of the nested conjunctions must be approved in order for the hierarchy to be considered approved.build()
builds ApproverHierarchy with checking for non-null required valuesbuilds ApproverHierarchy without checking for non-null required valuesgetTiers()
All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.static ApproverHierarchyBuilder
of()
factory method for an instance of ApproverHierarchyBuilderstatic ApproverHierarchyBuilder
of
(ApproverHierarchy template) create builder for ApproverHierarchy instanceplusTiers
(ApproverConjunction... tiers) All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.tiers
(ApproverConjunction... tiers) All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.tiers
(List<ApproverConjunction> tiers) All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.
-
Constructor Details
-
ApproverHierarchyBuilder
public ApproverHierarchyBuilder()
-
-
Method Details
-
tiers
All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
tiers
All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
public ApproverHierarchyBuilder plusTiers(Function<ApproverConjunctionBuilder, ApproverConjunctionBuilder> builder) All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
withTiers
public ApproverHierarchyBuilder withTiers(Function<ApproverConjunctionBuilder, ApproverConjunctionBuilder> builder) All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
addTiers
public ApproverHierarchyBuilder addTiers(Function<ApproverConjunctionBuilder, ApproverConjunction> builder) All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
setTiers
public ApproverHierarchyBuilder setTiers(Function<ApproverConjunctionBuilder, ApproverConjunction> builder) All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
getTiers
All of the nested conjunctions must be approved in order for the hierarchy to be considered approved.
- Returns:
- tiers
-
build
builds ApproverHierarchy with checking for non-null required values- Specified by:
build
in interfaceBuilder<ApproverHierarchy>
- Returns:
- ApproverHierarchy
-
buildUnchecked
builds ApproverHierarchy without checking for non-null required values- Returns:
- ApproverHierarchy
-
of
factory method for an instance of ApproverHierarchyBuilder- Returns:
- builder
-
of
create builder for ApproverHierarchy instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-