Author: bayard Date: Thu Sep 27 21:35:16 2007 New Revision: 580215 URL: http://svn.apache.org/viewvc?rev=580215&view=rev Log: Reverting back to the original collections import. Unsure if a refactor should be done or not
Added: jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/BoundedMap.java (with props) Modified: jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/map/LRUMap.java Added: jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/BoundedMap.java URL: http://svn.apache.org/viewvc/jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/BoundedMap.java?rev=580215&view=auto ============================================================================== --- jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/BoundedMap.java (added) +++ jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/BoundedMap.java Thu Sep 27 21:35:16 2007 @@ -0,0 +1,48 @@ +/* + * Copyright 2003-2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.taglibs.standard.extra.commons.collections; + +import java.util.Map; + +/** + * Defines a map that is bounded in size. + * <p> + * The size of the map can vary, but it can never exceed a preset + * maximum number of elements. This interface allows the querying of details + * associated with the maximum number of elements. + * + * @since Commons Collections 3.0 + * @version $Revision: 218351 $ $Date: 2004-10-20 17:58:23 -0700 (Wed, 20 Oct 2004) $ + * + * @author Stephen Colebourne + */ +public interface BoundedMap extends Map { + + /** + * Returns true if this map is full and no new elements can be added. + * + * @return <code>true</code> if the map is full + */ + boolean isFull(); + + /** + * Gets the maximum size of the map (the bound). + * + * @return the maximum number of elements the map can hold + */ + int maxSize(); + +} Propchange: jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/BoundedMap.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/map/LRUMap.java URL: http://svn.apache.org/viewvc/jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/map/LRUMap.java?rev=580215&r1=580214&r2=580215&view=diff ============================================================================== --- jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/map/LRUMap.java (original) +++ jakarta/taglibs/proper/standard/trunk/src/org/apache/taglibs/standard/extra/collections/map/LRUMap.java Thu Sep 27 21:35:16 2007 @@ -21,6 +21,8 @@ import java.io.Serializable; import java.util.Map; +import org.apache.taglibs.standard.extra.commons.collections.BoundedMap; + /** * A <code>Map</code> implementation with a fixed maximum size which removes * the least recently used entry if an entry is added when full. @@ -48,7 +50,7 @@ * @author Mario Ivankovits */ public class LRUMap - extends AbstractLinkedMap implements Serializable, Cloneable { + extends AbstractLinkedMap implements BoundedMap, Serializable, Cloneable { /** Serialisation version */ static final long serialVersionUID = -612114643488955218L; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]