public boolean validate(Set<String> values){
  if (values.isEmpty()) {
    return true;
  }
  Set<String> idSet=new HashSet<>();
  Set<String> urlSet=new HashSet<>();
  boolean serverLookup=getServerDetails();
  for (  String value : values) {
    StringTokenizer tok=new StringTokenizer(value,"|");
    if (tok.countTokens() != 2) {
      return false;
    }
    String url=tok.nextToken();
    String id=tok.nextToken();
    int byteLength=id.getBytes().length;
    if (byteLength != 2 || idSet.contains(id)) {
      return false;
    }
 else {
      idSet.add(id);
    }
    if (urlSet.contains(url)) {
      return false;
    }
 else {
      urlSet.add(url);
    }
    if (serverLookup) {
      if (serverAddrSet.contains(url)) {
        return false;
      }
      if (serverIdSet.contains(id)) {
        return false;
      }
    }
 else {
      if (debug.messageEnabled()) {
        debug.message("Unable to get server list information. " + "Server validation cannot be performed");
      }
    }
  }
  return true;
}

public boolean validate ( Set < String > values ) { if ( values . isEmpty ( ) ) { return true ; } Set < String > idSet = new HashSet < > ( ) ; Set < String > urlSet = new HashSet < > ( ) ; boolean serverLookup = getServerDetails ( ) ; for ( String value : values ) { StringTokenizer tok = new StringTokenizer ( value , "|" ) ; if ( tok . countTokens ( ) != 2 ) { return false ; } String url = tok . nextToken ( ) ; String id = tok . nextToken ( ) ; int byteLength = id . getBytes ( ) . length ; if ( byteLength != 2 || idSet . contains ( id ) ) { return false ; } else { idSet . add ( id ) ; } if ( urlSet . contains ( url ) ) { return false ; } else { urlSet . add ( url ) ; } if ( serverLookup ) { if ( serverAddrSet . contains ( url ) ) { return false ; } if ( serverIdSet . contains ( id ) ) { return false ; } } else { if ( debug . messageEnabled ( ) ) { debug . message ( "Unable to get server list information. " + "Server validation cannot be performed" ) ; } } } return true ; }
validates the values for the attribute iplanet - am - platform - server - list .
