java.lang.Object
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.pcep.client.attributes.path.computation.client.reported.lsp.PathBuilder

@Generated("mdsal-binding-generator") public class PathBuilder extends Object
Class that builds Path instances. Overall design of the class is that of a fluent interface, where method chaining is used.

In general, this class is supposed to be used like this template:

   
     Path createPath(int fooXyzzy, int barBaz) {
         return new PathBuilder()
             .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
             .setBar(new BarBuilder().setBaz(barBaz).build())
             .build();
     }
   
 

This pattern is supported by the immutable nature of Path, as instances can be freely passed around without worrying about synchronization issues.

As a side note: method chaining results in:

  • very efficient Java bytecode, as the method invocation result, in this case the Builder reference, is on the stack, so further method invocations just need to fill method arguments for the next method invocation, which is terminated by build(), which is then returned from the method
  • better understanding by humans, as the scope of mutable state (the builder) is kept to a minimum and is very localized
  • better optimization opportunities, as the object scope is minimized in terms of invocation (rather than method) stack, making escape analysis a lot easier. Given enough compiler (JIT/AOT) prowess, the cost of th builder object can be completely eliminated
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct an empty builder.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.BandwidthObject arg)
    Construct a new builder initialized from specified BandwidthObject.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ClasstypeObject arg)
    Construct a new builder initialized from specified ClasstypeObject.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ExcludeRouteObject arg)
    Construct a new builder initialized from specified ExcludeRouteObject.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ExplicitRouteObject arg)
    Construct a new builder initialized from specified ExplicitRouteObject.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.IncludeRouteObject arg)
    Construct a new builder initialized from specified IncludeRouteObject.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.LspaObject arg)
    Construct a new builder initialized from specified LspaObject.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.LspAttributes arg)
    Construct a new builder initialized from specified LspAttributes.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.OfObject arg)
    Construct a new builder initialized from specified OfObject.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.PathDefinition arg)
    Construct a new builder initialized from specified PathDefinition.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ReoptimizationBandwidthObject arg)
    Construct a new builder initialized from specified ReoptimizationBandwidthObject.
    PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ReportedRouteObject arg)
    Construct a new builder initialized from specified ReportedRouteObject.
    Construct a builder initialized with state from specified Path.
  • Method Summary

    Modifier and Type
    Method
    Description
    addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<Path> augmentation)
    Add an augmentation to this builder's product.
    <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Path>>
    E$$
    augmentation(Class<E$$> augmentationType)
    Return the specified augmentation, if it is present in this builder.
    @NonNull Path
    A new Path instance.
    void
    fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
    Set fields from given grouping argument.
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.bandwidth.object.Bandwidth
    Return current value associated with the property corresponding to BandwidthObject.getBandwidth().
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.classtype.object.ClassType
    Return current value associated with the property corresponding to ClasstypeObject.getClassType().
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.explicit.route.object.Ero
    Return current value associated with the property corresponding to ExplicitRouteObject.getEro().
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.include.route.object.Iro
    Return current value associated with the property corresponding to IncludeRouteObject.getIro().
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.lspa.object.Lspa
    Return current value associated with the property corresponding to LspaObject.getLspa().
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspId
    Return current value associated with the property corresponding to Path.getLspId().
    List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.lsp.attributes.Metrics>
    Return current value associated with the property corresponding to LspAttributes.getMetrics().
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.of.object.Of
    Return current value associated with the property corresponding to OfObject.getOf().
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.reoptimization.bandwidth.object.ReoptimizationBandwidth
    Return current value associated with the property corresponding to ReoptimizationBandwidthObject.getReoptimizationBandwidth().
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.reported.route.object.Rro
    Return current value associated with the property corresponding to ReportedRouteObject.getRro().
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.exclude.route.object.Xro
    Return current value associated with the property corresponding to ExcludeRouteObject.getXro().
    key()
    Return current value associated with the property corresponding to Path.key().
    removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Path>> augmentationType)
    Remove an augmentation from this builder's product.
    setBandwidth(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.bandwidth.object.Bandwidth value)
    Set the property corresponding to BandwidthObject.getBandwidth() to the specified value.
    setClassType(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.classtype.object.ClassType value)
    Set the property corresponding to ClasstypeObject.getClassType() to the specified value.
    setEro(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.explicit.route.object.Ero value)
    Set the property corresponding to ExplicitRouteObject.getEro() to the specified value.
    setIro(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.include.route.object.Iro value)
    Set the property corresponding to IncludeRouteObject.getIro() to the specified value.
    setLspa(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.lspa.object.Lspa value)
    Set the property corresponding to LspaObject.getLspa() to the specified value.
    setLspId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspId value)
    Set the property corresponding to Path.getLspId() to the specified value.
    setMetrics(List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.lsp.attributes.Metrics> values)
    Set the property corresponding to LspAttributes.getMetrics() to the specified value.
    setOf(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.of.object.Of value)
    Set the property corresponding to OfObject.getOf() to the specified value.
    setReoptimizationBandwidth(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.reoptimization.bandwidth.object.ReoptimizationBandwidth value)
    Set the property corresponding to ReoptimizationBandwidthObject.getReoptimizationBandwidth() to the specified value.
    setRro(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.reported.route.object.Rro value)
    Set the property corresponding to ReportedRouteObject.getRro() to the specified value.
    setXro(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.exclude.route.object.Xro value)
    Set the property corresponding to ExcludeRouteObject.getXro() to the specified value.
    Set the key value corresponding to Path.key() to the specified value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PathBuilder

      public PathBuilder()
      Construct an empty builder.
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.PathDefinition arg)
      Construct a new builder initialized from specified PathDefinition.
      Parameters:
      arg - PathDefinition from which the builder should be initialized
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ExplicitRouteObject arg)
      Construct a new builder initialized from specified ExplicitRouteObject.
      Parameters:
      arg - ExplicitRouteObject from which the builder should be initialized
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.LspAttributes arg)
      Construct a new builder initialized from specified LspAttributes.
      Parameters:
      arg - LspAttributes from which the builder should be initialized
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.LspaObject arg)
      Construct a new builder initialized from specified LspaObject.
      Parameters:
      arg - LspaObject from which the builder should be initialized
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.BandwidthObject arg)
      Construct a new builder initialized from specified BandwidthObject.
      Parameters:
      arg - BandwidthObject from which the builder should be initialized
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ReoptimizationBandwidthObject arg)
      Construct a new builder initialized from specified ReoptimizationBandwidthObject.
      Parameters:
      arg - ReoptimizationBandwidthObject from which the builder should be initialized
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.IncludeRouteObject arg)
      Construct a new builder initialized from specified IncludeRouteObject.
      Parameters:
      arg - IncludeRouteObject from which the builder should be initialized
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ReportedRouteObject arg)
      Construct a new builder initialized from specified ReportedRouteObject.
      Parameters:
      arg - ReportedRouteObject from which the builder should be initialized
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ExcludeRouteObject arg)
      Construct a new builder initialized from specified ExcludeRouteObject.
      Parameters:
      arg - ExcludeRouteObject from which the builder should be initialized
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.OfObject arg)
      Construct a new builder initialized from specified OfObject.
      Parameters:
      arg - OfObject from which the builder should be initialized
    • PathBuilder

      public PathBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ClasstypeObject arg)
      Construct a new builder initialized from specified ClasstypeObject.
      Parameters:
      arg - ClasstypeObject from which the builder should be initialized
    • PathBuilder

      public PathBuilder(Path base)
      Construct a builder initialized with state from specified Path.
      Parameters:
      base - Path from which the builder should be initialized
  • Method Details

    • fieldsFrom

      public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
      Set fields from given grouping argument. Valid argument is instance of one of following types:
      • ClasstypeObject
      • ReoptimizationBandwidthObject
      • BandwidthObject
      • OfObject
      • PathDefinition
      • ReportedRouteObject
      • LspAttributes
      • IncludeRouteObject
      • ExcludeRouteObject
      • LspaObject
      • ExplicitRouteObject
      Parameters:
      arg - grouping object
      Throws:
      IllegalArgumentException - if given argument is none of valid types or has property with incompatible value
    • key

      public PathKey key()
      Return current value associated with the property corresponding to Path.key().
      Returns:
      current value
    • getBandwidth

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.bandwidth.object.Bandwidth getBandwidth()
      Return current value associated with the property corresponding to BandwidthObject.getBandwidth().
      Returns:
      current value
    • getClassType

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.classtype.object.ClassType getClassType()
      Return current value associated with the property corresponding to ClasstypeObject.getClassType().
      Returns:
      current value
    • getEro

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.explicit.route.object.Ero getEro()
      Return current value associated with the property corresponding to ExplicitRouteObject.getEro().
      Returns:
      current value
    • getIro

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.include.route.object.Iro getIro()
      Return current value associated with the property corresponding to IncludeRouteObject.getIro().
      Returns:
      current value
    • getLspId

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspId getLspId()
      Return current value associated with the property corresponding to Path.getLspId().
      Returns:
      current value
    • getLspa

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.lspa.object.Lspa getLspa()
      Return current value associated with the property corresponding to LspaObject.getLspa().
      Returns:
      current value
    • getMetrics

      public List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.lsp.attributes.Metrics> getMetrics()
      Return current value associated with the property corresponding to LspAttributes.getMetrics().
      Returns:
      current value
    • getOf

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.of.object.Of getOf()
      Return current value associated with the property corresponding to OfObject.getOf().
      Returns:
      current value
    • getReoptimizationBandwidth

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.reoptimization.bandwidth.object.ReoptimizationBandwidth getReoptimizationBandwidth()
      Return current value associated with the property corresponding to ReoptimizationBandwidthObject.getReoptimizationBandwidth().
      Returns:
      current value
    • getRro

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.reported.route.object.Rro getRro()
      Return current value associated with the property corresponding to ReportedRouteObject.getRro().
      Returns:
      current value
    • getXro

      public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.exclude.route.object.Xro getXro()
      Return current value associated with the property corresponding to ExcludeRouteObject.getXro().
      Returns:
      current value
    • augmentation

      public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Path>> E$$ augmentation(Class<E$$> augmentationType)
      Return the specified augmentation, if it is present in this builder.
      Type Parameters:
      E$$ - augmentation type
      Parameters:
      augmentationType - augmentation type class
      Returns:
      Augmentation object from this builder, or null if not present
      Throws:
      NullPointerException - if augmentType is null
    • withKey

      public PathBuilder withKey(PathKey key)
      Set the key value corresponding to Path.key() to the specified value.
      Parameters:
      key - desired value
      Returns:
      this builder
    • setBandwidth

      public PathBuilder setBandwidth(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.bandwidth.object.Bandwidth value)
      Set the property corresponding to BandwidthObject.getBandwidth() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • setClassType

      public PathBuilder setClassType(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.classtype.object.ClassType value)
      Set the property corresponding to ClasstypeObject.getClassType() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • setEro

      public PathBuilder setEro(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.explicit.route.object.Ero value)
      Set the property corresponding to ExplicitRouteObject.getEro() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • setIro

      public PathBuilder setIro(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.include.route.object.Iro value)
      Set the property corresponding to IncludeRouteObject.getIro() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • setLspId

      public PathBuilder setLspId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspId value)
      Set the property corresponding to Path.getLspId() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • setLspa

      public PathBuilder setLspa(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.lspa.object.Lspa value)
      Set the property corresponding to LspaObject.getLspa() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • setMetrics

      public PathBuilder setMetrics(List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.lsp.attributes.Metrics> values)
      Set the property corresponding to LspAttributes.getMetrics() to the specified value.
      Parameters:
      values - desired value
      Returns:
      this builder
    • setOf

      public PathBuilder setOf(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.of.object.Of value)
      Set the property corresponding to OfObject.getOf() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • setReoptimizationBandwidth

      public PathBuilder setReoptimizationBandwidth(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.reoptimization.bandwidth.object.ReoptimizationBandwidth value)
      Set the property corresponding to ReoptimizationBandwidthObject.getReoptimizationBandwidth() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • setRro

      public PathBuilder setRro(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.reported.route.object.Rro value)
      Set the property corresponding to ReportedRouteObject.getRro() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • setXro

      public PathBuilder setXro(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.exclude.route.object.Xro value)
      Set the property corresponding to ExcludeRouteObject.getXro() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • addAugmentation

      public PathBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<Path> augmentation)
      Add an augmentation to this builder's product.
      Parameters:
      augmentation - augmentation to be added
      Returns:
      this builder
      Throws:
      NullPointerException - if augmentation is null
    • removeAugmentation

      public PathBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Path>> augmentationType)
      Remove an augmentation from this builder's product. If this builder does not track such an augmentation type, this method does nothing.
      Parameters:
      augmentationType - augmentation type to be removed
      Returns:
      this builder
    • build

      public @NonNull Path build()
      A new Path instance.
      Returns:
      A new Path instance.