Allow a reason to be specified on ReplacedBy. Annotate IntMap.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2764 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray.j.greenwell
2010-03-31 17:41:41 +00:00
parent ac30065aab
commit d68ba4d9a1
2 changed files with 10 additions and 1 deletions
@@ -39,7 +39,12 @@ public @interface ReplacedBy
{
/**
* A human-readable String containing a reference to the replacement Class, method, or field.
* It is suggested that you follow the "&at;see" javadoc semantics for specifying a reference.
* It is suggested that you follow the "@see" javadoc semantics for specifying a reference.
*/
String value ();
/**
* The reason the replacement is suggested, in case it's not obvious.
*/
String reason() default "";
}
+4
View File
@@ -23,6 +23,8 @@ package com.samskivert.util;
import java.util.Map;
import java.util.Set;
import com.samskivert.annotation.ReplacedBy;
/**
* An int map is a map that uses integers as keys and provides accessors
* that eliminate the need to create and manipulate superfluous
@@ -30,6 +32,8 @@ import java.util.Set;
* and therefore provides all of the standard accessors (for which
* <code>Integer</code> objects should be supplied as keys).
*/
@ReplacedBy(value="java.util.Map", reason="Boxing shouldn't be a major concern. " +
"The performance gain from using an IntMap probably isn't worth trouble.")
public interface IntMap<V> extends Map<Integer,V>
{
/**