Class LongEstimate


  • public final class LongEstimate
    extends Object
    A long estimate.

    An instance of this class holds a value, that can be precize or not.

    Since:
    9.1
    Author:
    Leonid Bushuev from JetBrains
    • Field Detail

      • value

        @Nonnegative
        public final long value
        The estimate value.
      • rough

        public final boolean rough
        A kind of the value:
        • false means the value is precise;
        • true means the value is approximate (not precise).
    • Method Detail

      • precisely

        public static LongEstimate precisely​(@Nonnegative
                                             long value)
        Instantiates a precise (accurate) estimate.
        Parameters:
        value - exact value.
        Returns:
        the estimate instance.
      • roughly

        public static LongEstimate roughly​(@Nonnegative
                                           long value)
        Instantiates a rough (approximate) estimate.
        Parameters:
        value - approximate value.
        Returns:
        the estimate instance.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object