public static class PlacementConstraint.CardinalityConstraint extends PlacementConstraint.AbstractConstraint
PlacementConstraint.SingleConstraint
, where the
target is a set of allocation tags.Constructor and Description |
---|
CardinalityConstraint(String scope,
int minCardinality,
int maxCardinality,
Set<String> allocationTags) |
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(PlacementConstraint.Visitor<T> visitor)
Visitor pattern.
|
boolean |
equals(Object o) |
Set<String> |
getAllocationTags()
Get the allocation tags of the constraint.
|
int |
getMaxCardinality()
Get the maximum cardinality of the constraint.
|
int |
getMinCardinality()
Get the minimum cardinality of the constraint.
|
String |
getScope()
Get the scope of the constraint.
|
int |
hashCode() |
String |
toString() |
build
public String getScope()
public int getMinCardinality()
public int getMaxCardinality()
public Set<String> getAllocationTags()
public <T> T accept(PlacementConstraint.Visitor<T> visitor)
PlacementConstraint.Visitable
T
- defines the type that the visitor will use and the return type
of the accept.visitor
- visitor to be usedpublic String toString()
toString
in class PlacementConstraint.AbstractConstraint
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.