public static synchronized String generateId(){
  if (id == Long.MAX_VALUE) {
    id=0;
  }
 else {
    id++;
  }
  return Long.toHexString(id);
}

public static synchronized String generateId ( ) { if ( id == Long . MAX_VALUE ) { id = 0 ; } else { id ++ ; } return Long . toHexString ( id ) ; }
generate a new identifier currently used to uniquely identify components .
