Package com.couchbase.client.java.view
Class ViewRow
- java.lang.Object
-
- com.couchbase.client.java.view.ViewRow
-
public class ViewRow extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>
id()
Returns the ID if present.<T> Optional<T>
keyAs(TypeRef<T> target)
Decodes the key into the given target type if present.<T> Optional<T>
keyAs(Class<T> target)
Decodes the key into the given target type if present.String
toString()
<T> Optional<T>
valueAs(TypeRef<T> target)
Decodes the value into the given target type if present.<T> Optional<T>
valueAs(Class<T> target)
Decodes the value into the given target type if present.
-
-
-
Method Detail
-
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.
-
-