public DetectPHIResult withEntities(Entity... entities) {
        if (this.entities == null) {
            setEntities(new java.util.ArrayList<Entity>(entities.length));
        }
        for (Entity ele : entities) {
            this.entities.add(ele);
        }
        return this;
    }
<p>
The collection of PHI entities extracted from the input text and their associated information. For each entity,
the response provides the entity text, the entity category, where the entity text begins and ends, and the level
of confidence that Amazon Comprehend Medical has in its detection.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setEntities(java.util.Collection)} or {@link #withEntities(java.util.Collection)} if you want to override
the existing values.
</p>

@param entities
       The collection of PHI entities extracted from the input text and their associated information. For each
       entity, the response provides the entity text, the entity category, where the entity text begins and ends,
       and the level of confidence that Amazon Comprehend Medical has in its detection.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-comprehendmedical/src/main/java/com/amazonaws/services/comprehendmedical/model/DetectPHIResult.java