Class ImmutableWattsStrogatzConfiguration

java.lang.Object
io.github.ai4ci.config.setup.ImmutableWattsStrogatzConfiguration
All Implemented Interfaces:
Abstraction.Named, Abstraction.Replica, SetupConfiguration, WattsStrogatzConfiguration, Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableWattsStrogatzConfiguration extends Object implements WattsStrogatzConfiguration
Immutable implementation of WattsStrogatzConfiguration.

Use the builder to create immutable instances: ImmutableWattsStrogatzConfiguration.builder().

See Also:
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface Abstraction.Named
      Returns:
      The value of the name attribute
    • getReplicate

      public Integer getReplicate()
      Specified by:
      getReplicate in interface Abstraction.Replica
      Returns:
      The value of the replicate attribute
    • getNetworkSize

      public Integer getNetworkSize()
      Specified by:
      getNetworkSize in interface SetupConfiguration
      Returns:
      The value of the networkSize attribute
    • getInitialImports

      public Integer getInitialImports()
      Specified by:
      getInitialImports in interface SetupConfiguration
      Returns:
      The value of the initialImports attribute
    • getNetworkRandomness

      public Double getNetworkRandomness()
      A measure of the randomness of the small world social network. This is a range from 0 to 1 where 0 is ordered and 1 is totally random.
      Specified by:
      getNetworkRandomness in interface WattsStrogatzConfiguration
    • getNetworkConnectedness

      public Integer getNetworkConnectedness()
      Specified by:
      getNetworkConnectedness in interface WattsStrogatzConfiguration
      Returns:
      The value of the networkConnectedness attribute
    • withName

      public final ImmutableWattsStrogatzConfiguration withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Specified by:
      withName in interface SetupConfiguration
      Parameters:
      value - A new value for name
      Returns:
      A modified copy of the this object
    • withReplicate

      public final ImmutableWattsStrogatzConfiguration withReplicate(Integer value)
      Copy the current immutable object by setting a value for the replicate attribute. An equals check used to prevent copying of the same value by returning this.
      Specified by:
      withReplicate in interface SetupConfiguration
      Parameters:
      value - A new value for replicate
      Returns:
      A modified copy of the this object
    • withNetworkSize

      public final ImmutableWattsStrogatzConfiguration withNetworkSize(Integer value)
      Copy the current immutable object by setting a value for the networkSize attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for networkSize
      Returns:
      A modified copy of the this object
    • withInitialImports

      public final ImmutableWattsStrogatzConfiguration withInitialImports(Integer value)
      Copy the current immutable object by setting a value for the initialImports attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for initialImports
      Returns:
      A modified copy of the this object
    • withNetworkRandomness

      public final ImmutableWattsStrogatzConfiguration withNetworkRandomness(Double value)
      Copy the current immutable object by setting a value for the networkRandomness attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for networkRandomness
      Returns:
      A modified copy of the this object
    • withNetworkConnectedness

      public final ImmutableWattsStrogatzConfiguration withNetworkConnectedness(Integer value)
      Copy the current immutable object by setting a value for the networkConnectedness attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for networkConnectedness
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableWattsStrogatzConfiguration that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: name, replicate, networkSize, initialImports, networkRandomness, networkConnectedness.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value WattsStrogatzConfiguration with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a WattsStrogatzConfiguration value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable WattsStrogatzConfiguration instance
    • toBuilder

      Creates a builder for ImmutableWattsStrogatzConfiguration.prefilled with attibute values of this instance to easily create modified copies.
      Returns:
      A new ImmutableWattsStrogatzConfiguration builder with attributes of this instance
    • builder

      Creates a builder for ImmutableWattsStrogatzConfiguration.
       ImmutableWattsStrogatzConfiguration.builder()
          .setName(String) // required name
          .setReplicate(Integer) // optional replicate
          .setNetworkSize(Integer) // required networkSize
          .setInitialImports(Integer) // required initialImports
          .setNetworkRandomness(Double) // required networkRandomness
          .setNetworkConnectedness(Integer) // required networkConnectedness
          .build();
       
      Returns:
      A new ImmutableWattsStrogatzConfiguration builder