Class RawValue

    • Method Detail

      • asStrictType

        public <T> @Nullable T asStrictType​(Class<T> type)
        Returns an object of the exact type passed in.
        Parameters:
        type - the class object for the desired type
        Returns:
        an object of type T or null
        Throws:
        IllegalArgumentException - if the raw value cannot be converted into the given type
      • asType

        public @Nullable Object asType​(Class<?> type)
        Returns the object normally returned by the datastore if given type is passed in.

        All integer values are returned as Long. All floating point values are returned as Double.

        Parameters:
        type - the class object for the desired type
        Returns:
        an object of type T or null
        Throws:
        IllegalArgumentException - if the raw value cannot be converted into the given type
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(@Nullable Object obj)
        Overrides:
        equals in class Object