com.programix.collections
Class MapTools
java.lang.Object
com.programix.collections.MapTools
public class MapTools
- extends Object
Commonly needed utilities for working with the Collections API Map.
|
Nested Class Summary |
static class |
MapTools.MapException
Used to indicate that something went wrong in one of the
MapTools functions. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
get
public static <K,V> V get(Map<K,V> map,
K key)
throws MapTools.MapException
- Throws:
MapTools.MapException
get
public static <K,V> V get(Map<K,V> map,
K key,
Class<V> valueType)
throws MapTools.MapException
- Throws:
MapTools.MapException
getString
public static <K> String getString(Map<K,String> map,
K key)
throws MapTools.MapException
- Used to lookup required String values in a Map.
- Throws:
MapTools.MapException - if the key is not in the map or if
the value found can't be cast into a String or either either
parameter is null.
generateFrom
public static Properties generateFrom(InputStream rawIn)
throws MapTools.MapException
- Throws:
MapTools.MapException
generateFrom
public static Properties generateFrom(File propertiesFile)
throws MapTools.MapException
- Throws:
MapTools.MapException
generateFrom
public static Properties generateFrom(URL propertiesURL)
throws MapTools.MapException
- Throws:
MapTools.MapException
Copyright © 2001-2009
Programix Incorporated.
All rights reserved.
ProgramixGenericLib is free
and is
OSI Certified
Open Source Software under the BSD
license.