private List<MemberState> assignMembers(int index,List<MemberState> sortedMembers){
  List<MemberState> members=new ArrayList<>(sortedMembers.size());
  for (int i=0; i < sortedMembers.size(); i++) {
    if ((i + 1) % index == 0) {
      members.add(sortedMembers.get(i));
    }
  }
  return members;
}

private List < MemberState > assignMembers ( int index , List < MemberState > sortedMembers ) { List < MemberState > members = new ArrayList < > ( sortedMembers . size ( ) ) ; for ( int i = 0 ; i < sortedMembers . size ( ) ; i ++ ) { if ( ( i + 1 ) % index == 0 ) { members . add ( sortedMembers . get ( i ) ) ; } } return members ; }
assigns members using consistent hashing .
