Subversion Repositories eFlore/Applications.cel

Rev

Rev 140 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
65 david 1
package org.tela_botanica.client.modeles;
2
 
3
 
4
import java.util.LinkedHashMap;
5
 
6
/**
7
 * table de hachage composée d'entite geographique, renvoyé par les objets de type DAO
8
 * La clé est le nom de l'entite + le nom de l'entite parente
9
 *
10
 * @author david delon
11
 *
12
 */
13
public class ListeEntiteGeographiqueObservation extends LinkedHashMap<String, EntiteGeographiqueObservation> {
14
 
15
	private static final long serialVersionUID = 2717710270773281540L;
16
 
17
	/**
18
	 * Constructeur sans paramètres
19
	 */
20
	public ListeEntiteGeographiqueObservation()
21
	{
22
		super();
23
	}
24
 
25
	/**
26
	 * Constructeur avec paramètre
27
	 * @param taille la taille de la table de hachage
28
	 */
29
	public ListeEntiteGeographiqueObservation(int taille)
30
	{
31
		super(taille);
32
	}
33
 
34
	/**
35
	 * Constructeur avec paramètre
36
	 * @param ic un tableau d'ImageCarnet
37
	 */
38
	public ListeEntiteGeographiqueObservation(EntiteGeographiqueObservation[] ent)
39
	{
40
		super() ;
41
		for (int i = 0; i < ent.length; i++)
42
		{
43
			if(ent[i] != null && ent[i] instanceof EntiteGeographiqueObservation)
44
			{
258 aurelien 45
				this.put(ent[i].hashCode()+"",ent[i]);
65 david 46
			}
47
		}
48
	}
140 aurelien 49
 
50
	public void put(EntiteGeographiqueObservation value) {
258 aurelien 51
		this.put(value.hashCode()+"",value);
140 aurelien 52
	}
65 david 53
 
54
}