public int size(String key){
  List<Serializable> entries=data.get(key);
  if (entries == null) {
    throw new IllegalArgumentException(MessageFormat.format(INVALID_KEY,key));
  }
 else {
    return entries.size();
  }
}

public int size ( String key ) { List < Serializable > entries = data . get ( key ) ; if ( entries == null ) { throw new IllegalArgumentException ( MessageFormat . format ( INVALID_KEY , key ) ) ; } else { return entries . size ( ) ; } }
returns the number of values stored for the specified key .
