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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Dec 16 12:21:47 CET 2011


Author: mojays
Date: 2011-12-16 12:21:46 +0100 (Fri, 16 Dec 2011)
New Revision: 1808

Added:
   trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceSortedMap.java
Log:
new FileSourceSortedMap (not yes used)

Added: trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceSortedMap.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceSortedMap.java	2011-12-16 11:21:13 UTC (rev 1807)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/io/FileSourceSortedMap.java	2011-12-16 11:21:46 UTC (rev 1808)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * 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.TreeMap;
+
+/**
+ * A {@link TreeMap} which is based on a source file.
+ * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a>
+ */
+public class FileSourceSortedMap<K,V> extends TreeMap<K,V> implements FileSource {
+
+  /** Holds the source file. */
+  protected File source = null;
+  
+  /**
+   * Creates a new list without source.
+   */
+  public FileSourceSortedMap() {
+    this(null);
+  }
+
+  /**
+   * Creates a new list.
+   */
+  public FileSourceSortedMap(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