Author: dlanglais Date: 2010-01-28 01:24:21 +0100 (Thu, 28 Jan 2010) New Revision: 28 Modified: trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/Row.java trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/RowImpl.java trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/TableImpl.java Log: Row et RowImpl -> ajout de fonctionnalit?\195?\169, mise en anglais de la javadoc. Test de la classe. Modified: trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/Row.java =================================================================== --- trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/Row.java 2010-01-27 23:45:23 UTC (rev 27) +++ trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/Row.java 2010-01-28 00:24:21 UTC (rev 28) @@ -1,15 +1,36 @@ package org.nuiton.mapstoragemanager.plugins.bighashmap; +import java.util.Map; + /** - * Interface lisant les méthodes nécéssaires sur une ligne. + * Interface to present the methods on a Row * @author Dorian Langlais * */ public interface Row { /** - * Méthode permettant un affichage du contenu de la ligne. - * @return contenu de la ligne sous forme textuel. + * to string a row. + * @return the row in textual format. */ String toString(); + + /** + * Get row structure. + * @return the row structure + */ + Structure getRowStructure(); + + /** + * Get row content. + * @return the row content + */ + Map<String, Object> getRowContent(); + + /** + * Get an element of the row. + * @param columnName the column name. + * @return the content of the "cell". + */ + Object getContent(String columnName); } Modified: trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/RowImpl.java =================================================================== --- trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/RowImpl.java 2010-01-27 23:45:23 UTC (rev 27) +++ trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/RowImpl.java 2010-01-28 00:24:21 UTC (rev 28) @@ -4,28 +4,27 @@ import java.util.Map; /** - * Classe Row. - * Représente une ligne d'une table. - * @author dorian Langlais, amaury Fages, gilles Crieloue, florent Gilet. - * @licence GPL. + * Class RowImpl. + * A row of a table. + * @author Dorian Langlais. */ public class RowImpl implements Row { /** - * Structure de la ligne. + * Structure of the row. */ - private StructureImpl rowStructure; + private Structure rowStructure; /** - * Contenu de la ligne. + * Content of the row. */ private Map < String, Object > rowContent; /** - * Constructeur de Row. - * @param struct structure de la ligne. - * @param content contenu de la ligne. + * Row constructor. + * @param struct the row structure + * @param content the row content */ - public RowImpl(final StructureImpl struct, + public RowImpl(final Structure struct, final Map < String, Object > content) { this.rowStructure = struct; this.rowContent = new HashMap < String, Object > (); @@ -37,9 +36,30 @@ /** * {@inheritDoc} */ + public Structure getRowStructure() { + return rowStructure; + } + + /** + * {@inheritDoc} + */ + public Map<String, Object> getRowContent() { + return rowContent; + } + + /** + * {@inheritDoc} + */ public final String toString() { String ret; ret = rowContent.values().toString(); return ret; } + + /** + * {@inheritDoc} + */ + public Object getContent(String columnName) { + return rowContent.get(columnName); + } } Modified: trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/TableImpl.java =================================================================== --- trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/TableImpl.java 2010-01-27 23:45:23 UTC (rev 27) +++ trunk/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/TableImpl.java 2010-01-28 00:24:21 UTC (rev 28) @@ -15,7 +15,7 @@ * Table. * hashMap ayant pour clé le nom des colonnes et pour valeur une colonne. */ - private Map < String, ColumnImpl < ? > > tableContent; + private Map < String, Column < ? > > tableContent; /** * Structure de la Table. */ @@ -25,7 +25,7 @@ * Constructeur par défaut. */ public TableImpl() { - this.tableContent = new HashMap < String, ColumnImpl < ? > > (); + this.tableContent = new HashMap < String, Column < ? > > (); this.tableStructure = new StructureImpl(); }
participants (1)
-
dlanglais@users.nuiton.org