Class LookupInResult


  • public class LookupInResult
    extends Object
    This result is returned from successful KeyValue subdocument lookup responses.
    Since:
    3.0.0
    • Method Detail

      • cas

        public long cas()
        Returns the CAS value of the document.
      • contentAs

        public <T> T contentAs​(int index,
                               Class<T> target)
        Decodes the content at the given index into an instance of the target class.
        Parameters:
        index - the index of the subdoc value to decode.
        target - the target type to decode into.
        Returns:
        the decoded content into the generic type requested.
      • contentAs

        public <T> T contentAs​(int index,
                               TypeRef<T> target)
        Decodes the content at the given index into an instance of the target type.
        Parameters:
        index - the index of the subdoc value to decode.
        target - the target type to decode into.
        Returns:
        the decoded content into the generic type requested.
      • contentAsObject

        public JsonObject contentAsObject​(int index)
        Decodes the encoded content at the given index into a JsonObject.
        Parameters:
        index - the index at which to decode.
      • contentAsArray

        public JsonArray contentAsArray​(int index)
        Decodes the encoded content at the given index into a JsonArray.
        Parameters:
        index - the index at which to decode.
      • exists

        public boolean exists​(int index)
        Allows to check if a value at the given index exists.
        Parameters:
        index - the index at which to check.
        Returns:
        true if a value is present at the index, false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object