private void addMembers(List<String> newMembers){
  if (newMembers.isEmpty()) {
    return;
  }
  int startIndex=-1;
  int endIndex=-1;
  for (  String name : newMembers) {
    Member member=new Member(name);
    member.setChangeListener(healthListener);
    memberMap.put(name,member);
    memberList.add(member);
    int index=memberList.indexOf(member);
    if (startIndex == -1) {
      startIndex=index;
      endIndex=index;
    }
 else {
      startIndex=Math.min(startIndex,index);
      endIndex=Math.max(endIndex,index);
    }
  }
  fireIntervalAdded(this,startIndex,endIndex);
}

private void addMembers ( List < String > newMembers ) { if ( newMembers . isEmpty ( ) ) { return ; } int startIndex = - 1 ; int endIndex = - 1 ; for ( String name : newMembers ) { Member member = new Member ( name ) ; member . setChangeListener ( healthListener ) ; memberMap . put ( name , member ) ; memberList . add ( member ) ; int index = memberList . indexOf ( member ) ; if ( startIndex == - 1 ) { startIndex = index ; endIndex = index ; } else { startIndex = Math . min ( startIndex , index ) ; endIndex = Math . max ( endIndex , index ) ; } } fireIntervalAdded ( this , startIndex , endIndex ) ; }
add a group of new members .
