Package jsonvalues

Class JsBigInt

    • Method Detail

      • of

        public static JsBigInt of​(BigInteger n)
        Static factory method to create a JsBigInt from BigInteger objects.
        Parameters:
        n - the big integer
        Returns:
        a new JsBigInt
      • id

        public int id()
        Specified by:
        id in interface JsValue
      • isBigInt

        public boolean isBigInt()
        Description copied from interface: JsValue
        Returns true if this JsValue is a JsBigInt
        Specified by:
        isBigInt in interface JsValue
        Returns:
        true if this JsValue is a JsBigInt
      • hashCode

        public int hashCode()
        Returns the hashcode of this json big integer.
        Overrides:
        hashCode in class Object
        Returns:
        the hashcode of this JsBigInt
      • equals

        public boolean equals​(Object that)
        Indicates whether some other object is "equal to" this json big integer. Numbers of different types are equals if they have the same value.
        Overrides:
        equals in class Object
        Parameters:
        that - the reference object with which to compare.
        Returns:
        true if that is a JsNumber with the same value as this
      • map

        public JsBigInt map​(UnaryOperator<BigInteger> fn)
        Maps this json bigint into another one.
        Parameters:
        fn - the mapping function
        Returns:
        a new JsBigInt
      • test

        public boolean test​(Predicate<BigInteger> predicate)
        Tests the value of this json bigint on a predicate.
        Parameters:
        predicate - the predicate
        Returns:
        true if this big integer satisfies the predicate