[Schmitzm-commits] r1804 - trunk/schmitzm-core/src/main/java/de/schmitzm/io

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Dec 8 13:27:37 CET 2011


Author: mojays
Date: 2011-12-08 13:27:32 +0100 (Thu, 08 Dec 2011)
New Revision: 1804

Added:
   trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceMap.java
Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceList.java
Log:
new FileSourceMap.java

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceList.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceList.java	2011-12-05 21:58:10 UTC (rev 1803)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceList.java	2011-12-08 12:27:32 UTC (rev 1804)
@@ -56,7 +56,6 @@
    */
   @Override
   public Object getSource() {
-    // TODO Auto-generated method stub
     return source;
   }
 

Added: trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceMap.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceMap.java	2011-12-05 21:58:10 UTC (rev 1803)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceMap.java	2011-12-08 12:27:32 UTC (rev 1804)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Martin O. J. Schmitz.
+ * 
+ * This file is part of the LESLIE library.
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License (license.txt)
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ * or try this link: http://www.gnu.org/licenses/lgpl.html
+ * 
+ * Contributors:
+ *     Martin O. J. Schmitz
+ ******************************************************************************/
+
+package de.schmitzm.io;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Vector;
+
+/**
+ * A {@link HashMap} which is bases on a source file.
+ * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a>
+ */
+public class FileSourceMap<K,V> extends HashMap<K,V> implements FileSource {
+
+  /** Holds the source file. */
+  protected File source = null;
+  
+  /**
+   * Creates a new list without source.
+   */
+  public FileSourceMap() {
+    this(null);
+  }
+
+  /**
+   * Creates a new list.
+   */
+  public FileSourceMap(File source) {
+    super();
+    this.source = source;
+  }
+  
+  /**
+   * Returns the source file path.
+   */
+  @Override
+  public Object getSource() {
+    return source;
+  }
+
+  /**
+   * Returns the source file.
+   */
+  @Override
+  public File getSourceFile() {
+    return source;
+  }
+
+}



More information about the Schmitzm-commits mailing list