Commit fb4d9f33 authored by gmantele's avatar gmantele
Browse files

[ADQL] Keep the same order of columns as they are added inside the DBTable =>...

[ADQL] Keep the same order of columns as they are added inside the DBTable => use a LinkedHashMap rather than a HashMap
parent 20184a8b
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -21,14 +21,15 @@ package adql.db;
 */

import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * Default implementation of {@link DBTable}.
 * 
 * @author Grégory Mantelet (CDS;ARI)
 * @version 1.3 (09/2014)
 * @version 1.3 (11/2014)
 */
public class DefaultDBTable implements DBTable {

@@ -40,7 +41,7 @@ public class DefaultDBTable implements DBTable {
	protected String adqlSchemaName = null;
	protected String adqlName = null;

	protected HashMap<String,DBColumn> columns = new HashMap<String,DBColumn>();
	protected Map<String,DBColumn> columns = new LinkedHashMap<String,DBColumn>();

	/**
	 * <p>Builds a default {@link DBTable} with the given DB name.</p>