Interface IJSONValueType<RT>

Type Parameters:
RT - type that you want to be returned after conversion

public interface IJSONValueType<RT>
This interface represents any convertible json value
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This method should return true if the given object is instanceof RT, false otherwise
    convert(Object toConvert, RT def)
    This method should convert the given object to a definite java value
  • Method Details

    • checkForInstance

      boolean checkForInstance(Object toCheck)
      This method should return true if the given object is instanceof RT, false otherwise
      Parameters:
      toCheck - object to check for instance
      Returns:
      whether the given object is instance of RT (or something else) or not
    • convert

      RT convert(Object toConvert, RT def)
      This method should convert the given object to a definite java value
      Parameters:
      toConvert - object to be converted
      def - default object that should be returned if the conversion fails
      Returns:
      converted object with RT type