Class QuadTreeConfigurationD

    • Method Detail

      • area

        public com.io7m.jregions.core.unparameterized.areas.AreaD area()
        Specified by:
        area in interface QuadTreeConfigurationDType
        Returns:
        The maximum bounding area of the tree
      • trimOnRemove

        public boolean trimOnRemove()
        Specified by:
        trimOnRemove in interface QuadTreeConfigurationDType
        Returns:
        true iff the implementation should attempt to trim empty leaf nodes when an item is removed
      • withArea

        public final QuadTreeConfigurationD withArea​(com.io7m.jregions.core.unparameterized.areas.AreaD value)
        Copy the current immutable object by setting a value for the area attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for area
        Returns:
        A modified copy of the this object
      • withMinimumQuadrantWidth

        public final QuadTreeConfigurationD withMinimumQuadrantWidth​(double value)
        Copy the current immutable object by setting a value for the minimumQuadrantWidth attribute. A value strict bits equality used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for minimumQuadrantWidth
        Returns:
        A modified copy of the this object
      • withMinimumQuadrantHeight

        public final QuadTreeConfigurationD withMinimumQuadrantHeight​(double value)
        Copy the current immutable object by setting a value for the minimumQuadrantHeight attribute. A value strict bits equality used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for minimumQuadrantHeight
        Returns:
        A modified copy of the this object
      • withTrimOnRemove

        public final QuadTreeConfigurationD withTrimOnRemove​(boolean value)
        Copy the current immutable object by setting a value for the trimOnRemove attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for trimOnRemove
        Returns:
        A modified copy of the this object
      • equals

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

        public int hashCode()
        Computes a hash code from attributes: area, minimumQuadrantWidth, minimumQuadrantHeight, trimOnRemove.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

        public static QuadTreeConfigurationD of​(com.io7m.jregions.core.unparameterized.areas.AreaD area,
                                                double minimumQuadrantWidth,
                                                double minimumQuadrantHeight,
                                                boolean trimOnRemove)
        Construct a new immutable QuadTreeConfigurationD instance.
        Parameters:
        area - The value for the area attribute
        minimumQuadrantWidth - The value for the minimumQuadrantWidth attribute
        minimumQuadrantHeight - The value for the minimumQuadrantHeight attribute
        trimOnRemove - The value for the trimOnRemove attribute
        Returns:
        An immutable QuadTreeConfigurationD instance
      • copyOf

        public static QuadTreeConfigurationD copyOf​(QuadTreeConfigurationDType instance)
        Creates an immutable copy of a QuadTreeConfigurationDType 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 QuadTreeConfigurationD instance