[Schmitzm-commits] r944 - trunk/src/schmitzm/lang

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jul 23 16:32:02 CEST 2010


Author: alfonx
Date: 2010-07-23 16:31:54 +0200 (Fri, 23 Jul 2010)
New Revision: 944

Modified:
   trunk/src/schmitzm/lang/LimitedHashMap.java
Log:
Added a convenience constructor that uses OLDEST_GET to LimitedHashMap

Modified: trunk/src/schmitzm/lang/LimitedHashMap.java
===================================================================
--- trunk/src/schmitzm/lang/LimitedHashMap.java	2010-07-23 14:15:06 UTC (rev 943)
+++ trunk/src/schmitzm/lang/LimitedHashMap.java	2010-07-23 14:31:54 UTC (rev 944)
@@ -74,11 +74,20 @@
   // Listener-Verwaltung nicht doppelt implementieren zu muessen
   private AbstractObjectTraceable objectTraceableProxy = new AbstractObjectTraceable() {
   };
+  
 
   /**
+   * Creates an empty map using the {@link TRUNC_METHOD#OLDEST_GET} method to remove objects when map load is exceeded
+   * @param maxLoad max. number of elements the map can hold
+   */
+  public LimitedHashMap(int maxLoad) {
+    this(maxLoad, TRUNC_METHOD.OLDEST_GET);
+  }
+
+  /**
    * Creates an empty map.
    * @param maxLoad max. number of elements the map can hold
-   * @param truncMethod method applied if the maximum map load is exeeced 
+   * @param truncMethod method applied if the maximum map load is exceeded 
    */
   public LimitedHashMap(int maxLoad, TRUNC_METHOD truncMethod) {
     super(maxLoad);



More information about the Schmitzm-commits mailing list