code: public void setEntities(java.util.Collection<Entity> entities) {
          if (entities == null) {
              this.entities = null;
              return;
          }
  
          this.entities = new java.util.ArrayList<Entity>(entities);
      }
docs: <p>
  The collection of medical 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 Comprehend Medical has in the detection and analysis. Attributes and traits of the
  entity are also returned.
  </p>
  
  @param entities
  The collection of medical 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 Comprehend Medical has in the detection and analysis. Attributes
  and traits of the entity are also returned.