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:
@@ -39,7 +39,12 @@ public @interface ReplacedBy
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* A human-readable String containing a reference to the replacement Class, method, or field.
|
* 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 ();
|
String value ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reason the replacement is suggested, in case it's not obvious.
|
||||||
|
*/
|
||||||
|
String reason() default "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ package com.samskivert.util;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import com.samskivert.annotation.ReplacedBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An int map is a map that uses integers as keys and provides accessors
|
* An int map is a map that uses integers as keys and provides accessors
|
||||||
* that eliminate the need to create and manipulate superfluous
|
* 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
|
* and therefore provides all of the standard accessors (for which
|
||||||
* <code>Integer</code> objects should be supplied as keys).
|
* <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>
|
public interface IntMap<V> extends Map<Integer,V>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user