Code example for TreeMap

Methods: size, values

0
  /** 
   * Returns a copy of the current list of JNDI sources 
   */ 
  public JdbcConnectionDefinition[] getSources() 
  { 
    return connectionDefinitions.values().toArray
        (new JdbcConnectionDefinition[connectionDefinitions.size()]);
  } 
 
  /** 
   * Removes the specified connection-definition from the list of connections. 
   * 
   * @param name the name of the JNDI source to remove from the list 
   */ 
  public void removeSource(final String name)
  { 
    // Make sure the name provided is not null 
    if (StringUtils.isEmpty(name))
    { 
      throw new IllegalArgumentException("The provided name is invalid");
    }