Class DefaultNextTreatment

  • All Implemented Interfaces:
    NextTreatment

    public final class DefaultNextTreatment
    extends Object
    implements NextTreatment
    Represents a next action specified by traffic treatment and weight.
    • Method Detail

      • treatment

        public TrafficTreatment treatment()
        Returns traffic treatment.
        Returns:
        traffic treatment.
      • of

        public static DefaultNextTreatment of​(TrafficTreatment treatment)
        Returns an instance of DefaultNextTreatment with given traffic treatment.
        Parameters:
        treatment - traffic treatment
        Returns:
        an instance of DefaultNextTreatment
      • of

        public static DefaultNextTreatment of​(TrafficTreatment treatment,
                                              int weight)
        Returns an instance of DefaultNextTreatment with given traffic treatment and weight.
        Parameters:
        treatment - traffic treatment
        weight - the weight of next treatment
        Returns:
        an instance of DefaultNextTreatment
      • weight

        public int weight()
        Description copied from interface: NextTreatment
        weight of this next action.
        Specified by:
        weight in interface NextTreatment
        Returns:
        weight
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object