java.lang.Object
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev220730.update.lsp.args.ArgumentsBuilder

@Generated("mdsal-binding-generator") public class ArgumentsBuilder extends Object
Class that builds Arguments 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:

   
     Arguments createArguments(int fooXyzzy, int barBaz) {
         return new ArgumentsBuilder()
             .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build())
             .setBar(new BarBuilder().setBaz(barBaz).build())
             .build();
     }
   
 

This pattern is supported by the immutable nature of Arguments, 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.
    ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.BandwidthObject arg)
    Construct a new builder initialized from specified BandwidthObject.
    ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ClasstypeObject arg)
    Construct a new builder initialized from specified ClasstypeObject.
    ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ExcludeRouteObject arg)
    Construct a new builder initialized from specified ExcludeRouteObject.
    ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ExplicitRouteObject arg)
    Construct a new builder initialized from specified ExplicitRouteObject.
    ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.IncludeRouteObject arg)
    Construct a new builder initialized from specified IncludeRouteObject.
    ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.LspaObject arg)
    Construct a new builder initialized from specified LspaObject.
    ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.LspAttributes arg)
    Construct a new builder initialized from specified LspAttributes.
    ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.OfObject arg)
    Construct a new builder initialized from specified OfObject.
    ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.PathDefinition arg)
    Construct a new builder initialized from specified PathDefinition.
    ArgumentsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.ReoptimizationBandwidthObject arg)
    Construct a new builder initialized from specified ReoptimizationBandwidthObject.
    ArgumentsBuilder(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 new builder initialized from specified LspMetadata.
    Construct a builder initialized with state from specified Arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<Arguments> augmentation)
    Add an augmentation to this builder's product.
    <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<Arguments>>
    E$$
    augmentation(Class<E$$> augmentationType)
    Return the specified augmentation, if it is present in this builder.
    @NonNull Arguments
    A new Arguments instance.
    static @NonNull Arguments
    Get empty instance of Arguments.
    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().
    Return current value associated with the property corresponding to LspMetadata.getMetadata().
    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().
    removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Arguments>> 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.
    Set the property corresponding to LspMetadata.getMetadata() 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.

    Methods inherited from class java.lang.Object

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

    • ArgumentsBuilder

      public ArgumentsBuilder()
      Construct an empty builder.
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(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
    • ArgumentsBuilder

      public ArgumentsBuilder(LspMetadata arg)
      Construct a new builder initialized from specified LspMetadata.
      Parameters:
      arg - LspMetadata from which the builder should be initialized
    • ArgumentsBuilder

      public ArgumentsBuilder(Arguments base)
      Construct a builder initialized with state from specified Arguments.
      Parameters:
      base - Arguments 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
      • LspMetadata
      • ExplicitRouteObject
      Parameters:
      arg - grouping object
      Throws:
      IllegalArgumentException - if given argument is none of valid types or has property with incompatible value
    • empty

      public static @NonNull Arguments empty()
      Get empty instance of Arguments.
      Returns:
      An empty Arguments
    • 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
    • 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
    • getMetadata

      public Metadata getMetadata()
      Return current value associated with the property corresponding to LspMetadata.getMetadata().
      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<Arguments>> 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
    • setBandwidth

      public ArgumentsBuilder 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 ArgumentsBuilder 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 ArgumentsBuilder 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 ArgumentsBuilder 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
    • setLspa

      public ArgumentsBuilder 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
    • setMetadata

      public ArgumentsBuilder setMetadata(Metadata value)
      Set the property corresponding to LspMetadata.getMetadata() to the specified value.
      Parameters:
      value - desired value
      Returns:
      this builder
    • setMetrics

      public ArgumentsBuilder 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 ArgumentsBuilder 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 ArgumentsBuilder 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 ArgumentsBuilder 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 ArgumentsBuilder 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 ArgumentsBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<Arguments> 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 ArgumentsBuilder removeAugmentation(Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<Arguments>> 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 Arguments build()
      A new Arguments instance.
      Returns:
      A new Arguments instance.