public final class Sentiment
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Natural Language API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
Sentiment() |
| Modifier and Type | Method and Description |
|---|---|
Sentiment |
clone() |
Float |
getMagnitude()
A non-negative number in the [0, +inf] range, which represents the absolute magnitude of
sentiment regardless of score (positive or negative).
|
Float |
getScore()
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
|
Sentiment |
set(String fieldName,
Object value) |
Sentiment |
setMagnitude(Float magnitude)
A non-negative number in the [0, +inf] range, which represents the absolute magnitude of
sentiment regardless of score (positive or negative).
|
Sentiment |
setScore(Float score)
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic Float getMagnitude()
null for nonepublic Sentiment setMagnitude(Float magnitude)
magnitude - magnitude or null for nonepublic Float getScore()
null for nonepublic Sentiment setScore(Float score)
score - score or null for nonepublic Sentiment set(String fieldName, Object value)
set in class com.google.api.client.json.GenericJsonpublic Sentiment clone()
clone in class com.google.api.client.json.GenericJsonCopyright © 2011–2025 Google. All rights reserved.