public class TroveWrapper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TroveWrapper.CannotFindTroveNoEntryValue |
| Constructor and Description |
|---|
TroveWrapper() |
| Modifier and Type | Method and Description |
|---|---|
static <TValue> List<TValue> |
getDecoratedList(Object troveList)
Retrieve a Java wrapper for the corresponding Trove list.
|
static <TKey,TValue> |
getDecoratedMap(Object troveMap)
Retrieve a Java wrapper for the corresponding Trove map.
|
static <TValue> Set<TValue> |
getDecoratedSet(Object troveSet)
Retrieve a Java wrapper for the corresponding Trove set.
|
static boolean |
isTroveClass(Class<?> clazz)
Determine if the given class is found within gnu.trove.
|
static void |
transformNoEntryValue(Object troveMap,
com.google.common.base.Function<Integer,Integer> transform)
Transform the no entry value in the given map.
|
static ReadOnlyFieldAccessor |
wrapListField(FieldAccessor accessor)
Retrieve a read-only field accessor that automatically wraps the underlying Trove instance.
|
static ReadOnlyFieldAccessor |
wrapMapField(FieldAccessor accessor)
Retrieve a read-only field accessor that automatically wraps the underlying Trove instance.
|
static ReadOnlyFieldAccessor |
wrapMapField(FieldAccessor accessor,
com.google.common.base.Function<Integer,Integer> noEntryTransform)
Retrieve a read-only field accessor that automatically wraps the underlying Trove instance.
|
static ReadOnlyFieldAccessor |
wrapSetField(FieldAccessor accessor)
Retrieve a read-only field accessor that automatically wraps the underlying Trove instance.
|
public static ReadOnlyFieldAccessor wrapMapField(FieldAccessor accessor)
accessor - - the accessor.public static ReadOnlyFieldAccessor wrapMapField(FieldAccessor accessor, com.google.common.base.Function<Integer,Integer> noEntryTransform)
accessor - - the accessor.noEntryTransform - - transform the no entry value, or NULL to ignore.public static ReadOnlyFieldAccessor wrapSetField(FieldAccessor accessor)
accessor - - the accessor.public static ReadOnlyFieldAccessor wrapListField(FieldAccessor accessor)
accessor - - the accessor.public static <TKey,TValue> Map<TKey,TValue> getDecoratedMap(@Nonnull Object troveMap)
TKey - Key typeTValue - Value typetroveMap - - the trove map to wrap.IllegalStateException - If GNU Trove cannot be found in the class map.IllegalArgumentException - If troveMap is NULL.FieldAccessException - Error in wrapper method or lack of reflection permissions.public static <TValue> Set<TValue> getDecoratedSet(@Nonnull Object troveSet)
TValue - TypetroveSet - - the trove set to wrap.IllegalStateException - If GNU Trove cannot be found in the class map.IllegalArgumentException - If troveSet is NULL.FieldAccessException - Error in wrapper method or lack of reflection permissions.public static <TValue> List<TValue> getDecoratedList(@Nonnull Object troveList)
TValue - TypetroveList - - the trove list to wrap.IllegalStateException - If GNU Trove cannot be found in the class map.IllegalArgumentException - If troveList is NULL.FieldAccessException - Error in wrapper method or lack of reflection permissions.public static boolean isTroveClass(Class<?> clazz)
clazz - - the clazz.Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.