Class ResolvedBound

Object
org.anchoranalysis.bean.AnchorBean<ResolvedBound>
org.anchoranalysis.mpp.bean.bound.ResolvedBound
All Implemented Interfaces:
Serializable

public class ResolvedBound
extends AnchorBean<ResolvedBound>
implements Serializable
A bound resolved into pixel units.

This class represents a bound with minimum and maximum values, typically used after resolving a bound into pixel units.

See Also:
Serialized Form
  • Constructor Details

    • ResolvedBound

      public ResolvedBound​(ResolvedBound src)
      Creates a new instance by copying another ResolvedBound.
      Parameters:
      src - the source ResolvedBound to copy from
    • ResolvedBound

      public ResolvedBound()
    • ResolvedBound

      public ResolvedBound​(double min, double max)
  • Method Details

    • contains

      public boolean contains​(double val)
      Checks if a value is contained within the bound.
      Parameters:
      val - the value to check
      Returns:
      true if the value is within the bound, false otherwise
    • getDscr

      public String getDscr()
      Gets a description of the bound.
      Returns:
      a string description of the bound
    • scale

      public void scale​(double multFactor)
      Scales the bound by a multiplication factor.
      Parameters:
      multFactor - the factor to multiply the bound values by
    • randOpen

      public double randOpen​(RandomNumberGenerator randomNumberGenerator)
      Generates a random value between the bounds (open interval).
      Parameters:
      randomNumberGenerator - the random number generator to use
      Returns:
      a random value between min and max
    • toString

      public String toString()
      Overrides:
      toString in class AnchorBean<ResolvedBound>
    • getMin

      public double getMin()
    • setMin

      public void setMin​(double min)
    • getMax

      public double getMax()
    • setMax

      public void setMax​(double max)