Class ListObject

java.lang.Object
no.hasmac.jsonld.lang.ListObject

public final class ListObject extends Object
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isListObject(jakarta.json.JsonValue value)
    A list object is a map that has a @list key.
    static jakarta.json.JsonObject
    toListObject(jakarta.json.JsonValue value)
    Convert expanded value to a list object by first setting it to an array containing only expanded value if it is not already an array, and then by setting it to a map containing the key-value pair @list-expanded value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ListObject

      private ListObject()
  • Method Details

    • isListObject

      public static boolean isListObject(jakarta.json.JsonValue value)
      A list object is a map that has a @list key. It may also have an @index key, but no other entries. See the Lists and Sets section of JSON-LD 1.1 for a normative description.
      Parameters:
      value - to check
      Returns:
      true if the provided value is valid list object
      See Also:
    • toListObject

      public static jakarta.json.JsonObject toListObject(jakarta.json.JsonValue value)
      Convert expanded value to a list object by first setting it to an array containing only expanded value if it is not already an array, and then by setting it to a map containing the key-value pair @list-expanded value.
      Parameters:
      value - to convert
      Returns:
      list object containing the provided value