/** * <p> * The emotions detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, and * ANGRY. * </p> * * @param emotions * The emotions detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, * and ANGRY. * @return Returns a reference to this object so that method calls can be chained together. */ public FaceDetail withEmotions(java.util.Collection<Emotion> emotions) { setEmotions(emotions); return this; }
/** * <p> * The emotions detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, and * ANGRY. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setEmotions(java.util.Collection)} or {@link #withEmotions(java.util.Collection)} if you want to override * the existing values. * </p> * * @param emotions * The emotions detected on the face, and the confidence level in the determination. For example, HAPPY, SAD, * and ANGRY. * @return Returns a reference to this object so that method calls can be chained together. */ public FaceDetail withEmotions(Emotion... emotions) { if (this.emotions == null) { setEmotions(new java.util.ArrayList<Emotion>(emotions.length)); } for (Emotion ele : emotions) { this.emotions.add(ele); } return this; }
/** * <p> * The emotions detected on the face, and the confidence level in the * determination. For example, HAPPY, SAD, and ANGRY. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param emotions <p> * The emotions detected on the face, and the confidence level in * the determination. For example, HAPPY, SAD, and ANGRY. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withEmotions(java.util.Collection<Emotion> emotions) { setEmotions(emotions); return this; }
faceDetail.setEmotions(new ListUnmarshaller<Emotion>(EmotionJsonUnmarshaller.getInstance()).unmarshall(context));
.unmarshall(context)); } else if (name.equals("Emotions")) { faceDetail.setEmotions(new ListUnmarshaller<Emotion>(EmotionJsonUnmarshaller .getInstance()