Class OctTreeConfigurationI.Builder

  • Enclosing class:
    OctTreeConfigurationI

    public static final class OctTreeConfigurationI.Builder
    extends java.lang.Object
    Builds instances of type OctTreeConfigurationI. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        public final OctTreeConfigurationI.Builder from​(OctTreeConfigurationIType instance)
        Fill a builder with attribute values from the provided OctTreeConfigurationIType instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • setVolume

        public final OctTreeConfigurationI.Builder setVolume​(com.io7m.jregions.core.unparameterized.volumes.VolumeI volume)
        Initializes the value for the volume attribute.
        Parameters:
        volume - The value for volume
        Returns:
        this builder for use in a chained invocation
      • setMinimumOctantWidth

        public final OctTreeConfigurationI.Builder setMinimumOctantWidth​(int minimumOctantWidth)
        Initializes the value for the minimumOctantWidth attribute.

        If not set, this attribute will have a default value as returned by the initializer of minimumOctantWidth.

        Parameters:
        minimumOctantWidth - The value for minimumOctantWidth
        Returns:
        this builder for use in a chained invocation
      • setMinimumOctantHeight

        public final OctTreeConfigurationI.Builder setMinimumOctantHeight​(int minimumOctantHeight)
        Initializes the value for the minimumOctantHeight attribute.

        If not set, this attribute will have a default value as returned by the initializer of minimumOctantHeight.

        Parameters:
        minimumOctantHeight - The value for minimumOctantHeight
        Returns:
        this builder for use in a chained invocation
      • setMinimumOctantDepth

        public final OctTreeConfigurationI.Builder setMinimumOctantDepth​(int minimumOctantDepth)
        Initializes the value for the minimumOctantDepth attribute.

        If not set, this attribute will have a default value as returned by the initializer of minimumOctantDepth.

        Parameters:
        minimumOctantDepth - The value for minimumOctantDepth
        Returns:
        this builder for use in a chained invocation
      • setTrimOnRemove

        public final OctTreeConfigurationI.Builder setTrimOnRemove​(boolean trimOnRemove)
        Initializes the value for the trimOnRemove attribute.

        If not set, this attribute will have a default value as returned by the initializer of trimOnRemove.

        Parameters:
        trimOnRemove - The value for trimOnRemove
        Returns:
        this builder for use in a chained invocation
      • build

        public OctTreeConfigurationI build()
        Builds a new OctTreeConfigurationI.
        Returns:
        An immutable instance of OctTreeConfigurationI
        Throws:
        java.lang.IllegalStateException - if any required attributes are missing