/**
   * 读取并返回数据库中的表
   * @return Map
   * @throws Exception
   */
  public Map loadSourceTables() throws Exception {    Map<String, List> result = new HashMap<String, List> ();    DatabaseMetaData metaData = getConnection().getMetaData();    ResultSet resultSet = metaData.getTables(
        null, null, null, new String[] {"TABLE"});    while (resultSet.next()) {
      String name = resultSet.getString("TABLE_NAME");
      if ("dtproperties".equalsIgnoreCase(name) == false) {
        result.put(name, new ArrayList());
      }
    }    resultSet.close();    for (Iterator iter = result.entrySet().iterator(); iter.hasNext(); ) {
      Map.Entry entry = (Map.Entry) iter.next();
      getColumns( (String) entry.getKey(), (List) entry.getValue());
    }    return result;  }  /**
   * 读取并返回列名
   * @param table String
   * @param list List
   * @throws Exception
   */
  private void getColumns(String table, List list) throws Exception {    DatabaseMetaData metaData = getConnection().getMetaData();
    ResultSet resultSet = metaData.getColumns(null, null, table, null);
    while (resultSet.next()) {
      String name = resultSet.getString("COLUMN_NAME");
      list.add(name);
    }  }Collections => Collection是所有List跟Set的始祖,List必須以特定次序來持有物件,Set無法擁有重複元素
========================
ArrayList => 用Array實做的List,允許快速隨機存取,相較於LinkedList 不適合拿來進行元素安插和移除動作
LinkedList => 提供最佳循序存取,適合安插和移除元素,隨機存取動作比起ArrayList緩慢
========================
HashSet => 是一種collection,但是只存放唯一值,是把搜尋時間看的很重要的set,用hash方式實作的set,故access time complexity = O(1)TreeSet => 同上,但是存入的元素都會經過排列,所以速度比HashSet 慢一點LinkedHashSet => 
Performance is likely to be just slightly below that of HashSet, due to the added expense of maintaining the linked list, with one exception: Iteration over a LinkedHashSet requires time proportional to the size of the set, regardless of its capacity. Iteration over a HashSet is likely to be more expensive, requiring time proportional to its capacity. BitSet => 能夠高效率的儲存大量 [ 1 / 0 ] (開/關) 資料
========================
HashMap => 用來取代HashTable,儲存 (key/value) pairs
TreeMap => 儲存 (key/value) pairs,會自動根據Key值排序LinkedHashMap => 
Performance is likely to be just slightly below that of HashMap, due to the added expense of maintaining the linked list, with one exception: Iteration over the collection-views of a LinkedHashMap requires time proportional to the size of the map, regardless of its capacity. Iteration over a HashMap is likely to be more expensive, requiring time proportional to its capacity. IdentityHashMap =>
This has better locality for large tables than does using separate arrays.) For many JRE implementations and operation mixes, this class will yield better performance than HashMap (which uses chaining rather than linear-probingWeakHashMap => 這個map中,由於每個Value僅存在一個實體,因而節省了儲存空間,一但程式需要某個Value,便在map中搜尋既有的物件,並使用找到的那個物件(而非重新再造一個),由於這是一種節省儲存空間的技巧,所以能夠方便的讓GC自動清理Key和Value,一但Key不在被使用,便會觸發清理動作
--------------------------------------------------------------------------------
容器简介
1. 容器的分类
1.1. Collection:一组各自独立的元素,即其内的每个位置仅持有一个元素。
1) List:以元素安插的次序来放置元素,不会重新排列。
2) Set:不接爱重复元素,它会使用自己内部的一个排列机制
1.2. Map:一群成对的key-value对象,即所持有的是key-value pairs。
Map中不能有重复的key,它拥有自己的内部排列机制。
2. 容器中的元素类型都为Object。从容器取得元素时,必须把它转换成原来的类型。 
看了下面的这个就更容易明白了
写一段代码,遍历一个List中的元素
List、Map、Set三个接口,存取元素时,各有什么特点?
import java.util.*;public class Test
{
 public static void main(String [] arge)
 {
  
  List list = new ArrayList();
  list.add(0, "a");
  list.add(1, "b");
  list.add(2, "c");
  list.add(3, "d");
  
  while(Iterator it = list.iterator();it.hasNext())
  {
   Object element = it.next();
   System.out.println (element);
  }
 }
}
List、Map、Set
List 通过下标来存取 和值来存取
Map 键值对应来存取 
set 存取元素是无序的