/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.comprehend.model; import java.io.Serializable; /** *
* Information about one of the entities found by targeted sentiment analysis. *
** For more information about targeted sentiment, see Targeted sentiment. *
*/ public class TargetedSentimentEntity implements Serializable { /** ** One or more index into the Mentions array that provides the best name for * the entity group. *
*/ private java.util.List* An array of mentions of the entity in the document. The array represents * a co-reference group. See Co-reference group for an example. *
*/ private java.util.List* One or more index into the Mentions array that provides the best name for * the entity group. *
* * @return* One or more index into the Mentions array that provides the best * name for the entity group. *
*/ public java.util.List* One or more index into the Mentions array that provides the best name for * the entity group. *
* * @param descriptiveMentionIndex* One or more index into the Mentions array that provides the * best name for the entity group. *
*/ public void setDescriptiveMentionIndex(java.util.Collection* One or more index into the Mentions array that provides the best name for * the entity group. *
** Returns a reference to this object so that method calls can be chained * together. * * @param descriptiveMentionIndex
* One or more index into the Mentions array that provides the * best name for the entity group. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TargetedSentimentEntity withDescriptiveMentionIndex(Integer... descriptiveMentionIndex) { if (getDescriptiveMentionIndex() == null) { this.descriptiveMentionIndex = new java.util.ArrayList* One or more index into the Mentions array that provides the best name for * the entity group. *
** Returns a reference to this object so that method calls can be chained * together. * * @param descriptiveMentionIndex
* One or more index into the Mentions array that provides the * best name for the entity group. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TargetedSentimentEntity withDescriptiveMentionIndex( java.util.Collection* An array of mentions of the entity in the document. The array represents * a co-reference group. See Co-reference group for an example. *
* * @return* An array of mentions of the entity in the document. The array * represents a co-reference group. See Co-reference group for an example. *
*/ public java.util.List* An array of mentions of the entity in the document. The array represents * a co-reference group. See Co-reference group for an example. *
* * @param mentions* An array of mentions of the entity in the document. The array * represents a co-reference group. See Co-reference group for an example. *
*/ public void setMentions(java.util.Collection* An array of mentions of the entity in the document. The array represents * a co-reference group. See Co-reference group for an example. *
** Returns a reference to this object so that method calls can be chained * together. * * @param mentions
* An array of mentions of the entity in the document. The array * represents a co-reference group. See Co-reference group for an example. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TargetedSentimentEntity withMentions(TargetedSentimentMention... mentions) { if (getMentions() == null) { this.mentions = new java.util.ArrayList* An array of mentions of the entity in the document. The array represents * a co-reference group. See Co-reference group for an example. *
** Returns a reference to this object so that method calls can be chained * together. * * @param mentions
* An array of mentions of the entity in the document. The array * represents a co-reference group. See Co-reference group for an example. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TargetedSentimentEntity withMentions( java.util.Collection