Package org.onosproject.net.flow
Class DefaultTrafficSelector
- java.lang.Object
-
- org.onosproject.net.flow.DefaultTrafficSelector
-
- All Implemented Interfaces:
TrafficSelector
public final class DefaultTrafficSelector extends java.lang.Object implements TrafficSelector
Default traffic selector implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultTrafficSelector.Builder
Builder of traffic selector entities.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TrafficSelector.Builder
builder()
Returns a new traffic selector builder.static TrafficSelector.Builder
builder(TrafficSelector selector)
Returns a new traffic selector builder primed to produce entities patterned after the supplied selector.java.util.Set<Criterion>
criteria()
Returns selection criteria as an ordered list.static TrafficSelector
emptySelector()
Returns an empty traffic selector.boolean
equals(java.lang.Object obj)
Criterion
getCriterion(Criterion.Type type)
Returns the selection criterion for a particular type, if it exists in this traffic selector.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
criteria
public java.util.Set<Criterion> criteria()
Description copied from interface:TrafficSelector
Returns selection criteria as an ordered list.- Specified by:
criteria
in interfaceTrafficSelector
- Returns:
- list of criteria
-
getCriterion
public Criterion getCriterion(Criterion.Type type)
Description copied from interface:TrafficSelector
Returns the selection criterion for a particular type, if it exists in this traffic selector.- Specified by:
getCriterion
in interfaceTrafficSelector
- Parameters:
type
- criterion type to look up- Returns:
- the criterion of the specified type if one exists, otherwise null
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
builder
public static TrafficSelector.Builder builder()
Returns a new traffic selector builder.- Returns:
- traffic selector builder
-
emptySelector
public static TrafficSelector emptySelector()
Returns an empty traffic selector.- Returns:
- empty traffic selector
-
builder
public static TrafficSelector.Builder builder(TrafficSelector selector)
Returns a new traffic selector builder primed to produce entities patterned after the supplied selector.- Parameters:
selector
- base selector- Returns:
- traffic selector builder
-
-