public class TypeMap extends Object
| Constructor and Description |
|---|
TypeMap(Class<?>... types)
Constructor for TypeMap that takes in an initial set of types.
|
TypeMap(int initialSize)
Constructor for TypeMap.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Class<?>... types)
Adds an array of types to the receiver at once.
|
void |
add(Class<?> type)
Adds a type to the receiver and stores it keyed by both its full and
short names.
|
Map<Class<?>,String> |
asInverseWithShortName()
Creates and returns a map of short type names (without the package
prefixes) keyed by the classes themselves.
|
boolean |
contains(Class<?> type)
Returns whether the type is known to the receiver.
|
boolean |
contains(String typeName)
Returns whether the typeName is known to the receiver.
|
int |
size()
Returns the total number of entries in the receiver.
|
Class<?> |
typeFor(String typeName)
Returns the type for the typeName specified.
|
public TypeMap(int initialSize)
initialSize - intpublic TypeMap(Class<?>... types)
types - Class[]public void add(Class<?> type)
type - ClassIllegalArgumentExceptionpublic boolean contains(Class<?> type)
type - Classpublic boolean contains(String typeName)
typeName - Stringpublic Class<?> typeFor(String typeName)
typeName - Stringpublic void add(Class<?>... types)
types - Class[]public Map<Class<?>,String> asInverseWithShortName()
public int size()
Copyright © 2002-2014 InfoEther. All Rights Reserved.