Class EncapsulationConstraint
- java.lang.Object
-
- org.onosproject.net.intent.constraint.BooleanConstraint
-
- org.onosproject.net.intent.constraint.EncapsulationConstraint
-
- All Implemented Interfaces:
Constraint
public class EncapsulationConstraint extends BooleanConstraint
Encapsulation to manage core transportation.
-
-
Constructor Summary
Constructors Constructor Description EncapsulationConstraint(EncapsulationType encapType)Creates a new encapsulation constraint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EncapsulationTypeencapType()Returns the encapsulation type required by this constraint.booleanequals(java.lang.Object obj)inthashCode()booleanisValid(Link link, ResourceContext context)Returns true if the specified link satisfies the constraint.java.lang.StringtoString()-
Methods inherited from class org.onosproject.net.intent.constraint.BooleanConstraint
cost, validate
-
-
-
-
Constructor Detail
-
EncapsulationConstraint
public EncapsulationConstraint(EncapsulationType encapType)
Creates a new encapsulation constraint.- Parameters:
encapType- the encapsulation typeEncapsulationType
-
-
Method Detail
-
isValid
public boolean isValid(Link link, ResourceContext context)
Description copied from class:BooleanConstraintReturns true if the specified link satisfies the constraint.- Specified by:
isValidin classBooleanConstraint- Parameters:
link- link to be validatedcontext- resource context for checking available resources- Returns:
- true if link is viable
-
encapType
public EncapsulationType encapType()
Returns the encapsulation type required by this constraint.- Returns:
- encapType
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-