Cleanup of keyvalue package.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1356967 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cb9dca74d3
commit
37ace6950e
|
@ -23,12 +23,7 @@ import org.apache.commons.collections.KeyValue;
|
|||
* and {@link java.util.Map.Entry Map.Entry} implementations.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision$
|
||||
*
|
||||
* @author James Strachan
|
||||
* @author Michael A. Smith
|
||||
* @author Neil O'Toole
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractKeyValue<K, V> implements KeyValue<K, V> {
|
||||
|
||||
|
|
|
@ -23,12 +23,7 @@ import java.util.Map;
|
|||
* {@link java.util.Map.Entry Map.Entry} implementations.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision$
|
||||
*
|
||||
* @author James Strachan
|
||||
* @author Michael A. Smith
|
||||
* @author Neil O'Toole
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractMapEntry<K, V> extends AbstractKeyValue<K, V> implements Map.Entry<K, V> {
|
||||
|
||||
|
|
|
@ -25,9 +25,7 @@ import org.apache.commons.collections.KeyValue;
|
|||
* added to a {@link java.util.Map.Entry Map.Entry}.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision$
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractMapEntryDecorator<K, V> implements Map.Entry<K, V>, KeyValue<K, V> {
|
||||
|
||||
|
|
|
@ -28,12 +28,7 @@ import org.apache.commons.collections.KeyValue;
|
|||
* itself as a key or value.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision$
|
||||
*
|
||||
* @author James Strachan
|
||||
* @author Michael A. Smith
|
||||
* @author Neil O'Toole
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id$
|
||||
*/
|
||||
public class DefaultKeyValue<K, V> extends AbstractKeyValue<K, V> {
|
||||
|
||||
|
|
|
@ -21,16 +21,11 @@ import java.util.Map;
|
|||
import org.apache.commons.collections.KeyValue;
|
||||
|
||||
/**
|
||||
* A restricted implementation of {@link java.util.Map.Entry} that prevents
|
||||
* the <code>Map.Entry</code> contract from being broken.
|
||||
* A restricted implementation of {@link Map.Entry} that prevents
|
||||
* the {@link Map.Entry} contract from being broken.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision$
|
||||
*
|
||||
* @author James Strachan
|
||||
* @author Michael A. Smith
|
||||
* @author Neil O'Toole
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class DefaultMapEntry<K, V> extends AbstractMapEntry<K, V> {
|
||||
|
||||
|
|
|
@ -40,10 +40,7 @@ import java.util.Arrays;
|
|||
* </pre>
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision$
|
||||
*
|
||||
* @author Howard Lewis Ship
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MultiKey<K> implements Serializable {
|
||||
// This class could implement List, but that would confuse it's purpose
|
||||
|
@ -258,7 +255,7 @@ public class MultiKey<K> implements Serializable {
|
|||
|
||||
/**
|
||||
* Calculate the hash code of the instance using the provided keys.
|
||||
* @param keys
|
||||
* @param keys the keys to calculate the hash code for
|
||||
*/
|
||||
private void calculateHashCode(Object[] keys)
|
||||
{
|
||||
|
|
|
@ -28,9 +28,7 @@ import org.apache.commons.collections.KeyValue;
|
|||
* map, however this will probably mess up any iterators.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision$
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id$
|
||||
*/
|
||||
public class TiedMapEntry<K, V> implements Map.Entry<K, V>, KeyValue<K, V>, Serializable {
|
||||
|
||||
|
|
|
@ -26,9 +26,7 @@ import org.apache.commons.collections.Unmodifiable;
|
|||
* UnsupportedOperationException when <code>setValue</code> is called.
|
||||
*
|
||||
* @since Commons Collections 3.0
|
||||
* @version $Revision$
|
||||
*
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class UnmodifiableMapEntry<K, V> extends AbstractMapEntry<K, V> implements Unmodifiable {
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You 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.
|
||||
*/
|
||||
/**
|
||||
* This package contains implementations of collection and map related key/value classes.
|
||||
* These are usually used in maps, however they can be used as data holders in any collection.
|
||||
* <p>
|
||||
* The following key/value designs are included:
|
||||
* <ul>
|
||||
* <li>Map Entry - various map entry implementations
|
||||
* <li>KeyValue - a key and value pair, without map entry semantics
|
||||
* <li>MultiKey - a holder of multiple keys tied together
|
||||
* </ul>
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
package org.apache.commons.collections.keyvalue;
|
|
@ -1,30 +0,0 @@
|
|||
<!-- $Id$ -->
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You 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.
|
||||
-->
|
||||
<BODY>
|
||||
<p>
|
||||
This package contains implementations of collection and map related key/value classes.
|
||||
These are usually used in maps, however they can be used as data holders in any collection.
|
||||
<p>
|
||||
The following key/value designs are included:
|
||||
<ul>
|
||||
<li>Map Entry - various map entry implementations
|
||||
<li>KeyValue - a key and value pair, without map entry semantics
|
||||
<li>MultiKey - a holder of multiple keys tied together
|
||||
</ul>
|
||||
</pre>
|
||||
</BODY>
|
Loading…
Reference in New Issue