Class QuadTreeConfigurationL

    • Method Detail

      • area

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

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

        public final QuadTreeConfigurationL withArea​(com.io7m.jregions.core.unparameterized.areas.AreaL 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 QuadTreeConfigurationL withMinimumQuadrantWidth​(long value)
        Copy the current immutable object by setting a value for the minimumQuadrantWidth attribute. A value equality check is 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 QuadTreeConfigurationL withMinimumQuadrantHeight​(long value)
        Copy the current immutable object by setting a value for the minimumQuadrantHeight attribute. A value equality check is 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 QuadTreeConfigurationL 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 QuadTreeConfigurationL 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 QuadTreeConfigurationL with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • of

        public static QuadTreeConfigurationL of​(com.io7m.jregions.core.unparameterized.areas.AreaL area,
                                                long minimumQuadrantWidth,
                                                long minimumQuadrantHeight,
                                                boolean trimOnRemove)
        Construct a new immutable QuadTreeConfigurationL 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 QuadTreeConfigurationL instance
      • copyOf

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