Class ViewRow

java.lang.Object
com.couchbase.client.java.view.ViewRow

public class ViewRow
extends Object
  • Method Details

    • id

      public Optional<String> id()
      Returns the ID if present.
      Returns:
      the ID if present.
    • keyAs

      public <T> Optional<T> keyAs​(Class<T> target)
      Decodes the key into the given target type if present.
      Type Parameters:
      T - the generic type to decode into.
      Parameters:
      target - the target type.
      Returns:
      the decoded key, if present.
    • keyAs

      public <T> Optional<T> keyAs​(TypeRef<T> target)
      Decodes the key into the given target type if present.
      Type Parameters:
      T - the generic type to decode into.
      Parameters:
      target - the target type.
      Returns:
      the decoded key, if present.
    • valueAs

      public <T> Optional<T> valueAs​(Class<T> target)
      Decodes the value into the given target type if present.
      Type Parameters:
      T - the generic type to decode into.
      Parameters:
      target - the target type.
      Returns:
      the decoded value, if present.
    • valueAs

      public <T> Optional<T> valueAs​(TypeRef<T> target)
      Decodes the value into the given target type if present.
      Type Parameters:
      T - the generic type to decode into.
      Parameters:
      target - the target type.
      Returns:
      the decoded value, if present.
    • toString

      public String toString()
      Overrides:
      toString in class Object