@Test public void testDebugPrintNullLabel() { final ByteArrayOutputStream out = new ByteArrayOutputStream(); final PrintStream outPrint = new PrintStream(out); final String INDENT = " "; final Map<Integer, String> map = new TreeMap<Integer, String>(); map.put(2, "B"); map.put(3, "C"); map.put(4, null); outPrint.println("{"); outPrint.println(INDENT + "2 = B " + String.class.getName()); outPrint.println(INDENT + "3 = C " + String.class.getName()); outPrint.println(INDENT + "4 = null"); outPrint.println("} " + TreeMap.class.getName()); final String EXPECTED_OUT = out.toString(); out.reset(); MapUtils.debugPrint(outPrint, null, map); assertEquals(EXPECTED_OUT, out.toString()); }
public static void debugPrint(final PrintStream out, final Object label, final Map<?, ?> map) { verbosePrintInternal(out, label, map, new ArrayDeque<Map<?, ?>>(), true); }
MapUtils { public static void debugPrint(final PrintStream out, final Object label, final Map<?, ?> map) { verbosePrintInternal(out, label, map, new ArrayDeque<Map<?, ?>>(), true); } }
MapUtils { public static void debugPrint(final PrintStream out, final Object label, final Map<?, ?> map) { verbosePrintInternal(out, label, map, new ArrayDeque<Map<?, ?>>(), true); } private  MapUtils(); }
MapUtils { public static void debugPrint(final PrintStream out, final Object label, final Map<?, ?> map) { verbosePrintInternal(out, label, map, new ArrayDeque<Map<?, ?>>(), true); } private  MapUtils(); static V getObject(final Map<? super K, V> map, final K key); static String getString(final Map<? super K, ?> map, final K key); static Boolean getBoolean(final Map<? super K, ?> map, final K key); static Number getNumber(final Map<? super K, ?> map, final K key); static Byte getByte(final Map<? super K, ?> map, final K key); static Short getShort(final Map<? super K, ?> map, final K key); static Integer getInteger(final Map<? super K, ?> map, final K key); static Long getLong(final Map<? super K, ?> map, final K key); static Float getFloat(final Map<? super K, ?> map, final K key); static Double getDouble(final Map<? super K, ?> map, final K key); static Map<?, ?> getMap(final Map<? super K, ?> map, final K key); static V getObject(final Map<K, V> map, final K key, final V defaultValue); static String getString(final Map<? super K, ?> map, final K key, final String defaultValue); static Boolean getBoolean(final Map<? super K, ?> map, final K key, final Boolean defaultValue); static Number getNumber(final Map<? super K, ?> map, final K key, final Number defaultValue); static Byte getByte(final Map<? super K, ?> map, final K key, final Byte defaultValue); static Short getShort(final Map<? super K, ?> map, final K key, final Short defaultValue); static Integer getInteger(final Map<? super K, ?> map, final K key, final Integer defaultValue); static Long getLong(final Map<? super K, ?> map, final K key, final Long defaultValue); static Float getFloat(final Map<? super K, ?> map, final K key, final Float defaultValue); static Double getDouble(final Map<? super K, ?> map, final K key, final Double defaultValue); static Map<?, ?> getMap(final Map<? super K, ?> map, final K key, final Map<?, ?> defaultValue); static boolean getBooleanValue(final Map<? super K, ?> map, final K key); static byte getByteValue(final Map<? super K, ?> map, final K key); static short getShortValue(final Map<? super K, ?> map, final K key); static int getIntValue(final Map<? super K, ?> map, final K key); static long getLongValue(final Map<? super K, ?> map, final K key); static float getFloatValue(final Map<? super K, ?> map, final K key); static double getDoubleValue(final Map<? super K, ?> map, final K key); static boolean getBooleanValue(final Map<? super K, ?> map, final K key, final boolean defaultValue); static byte getByteValue(final Map<? super K, ?> map, final K key, final byte defaultValue); static short getShortValue(final Map<? super K, ?> map, final K key, final short defaultValue); static int getIntValue(final Map<? super K, ?> map, final K key, final int defaultValue); static long getLongValue(final Map<? super K, ?> map, final K key, final long defaultValue); static float getFloatValue(final Map<? super K, ?> map, final K key, final float defaultValue); static double getDoubleValue(final Map<? super K, ?> map, final K key, final double defaultValue); static Properties toProperties(final Map<K, V> map); static Map<String, Object> toMap(final ResourceBundle resourceBundle); static void verbosePrint(final PrintStream out, final Object label, final Map<?, ?> map); static void debugPrint(final PrintStream out, final Object label, final Map<?, ?> map); static Map<V, K> invertMap(final Map<K, V> map); static void safeAddToMap(final Map<? super K, Object> map, final K key, final Object value); @SuppressWarnings("unchecked") // As per Javadoc throws CCE for invalid array contents static Map<K, V> putAll(final Map<K, V> map, final Object[] array); static Map<K,V> emptyIfNull(final Map<K,V> map); static boolean isEmpty(final Map<?,?> map); static boolean isNotEmpty(final Map<?,?> map); static Map<K, V> synchronizedMap(final Map<K, V> map); static Map<K, V> unmodifiableMap(final Map<? extends K, ? extends V> map); static IterableMap<K, V> predicatedMap(final Map<K, V> map, final Predicate<? super K> keyPred,
                                                         final Predicate<? super V> valuePred); static IterableMap<K, V> transformedMap(final Map<K, V> map,
            final Transformer<? super K, ? extends K> keyTransformer,
            final Transformer<? super V, ? extends V> valueTransformer); static IterableMap<K, V> fixedSizeMap(final Map<K, V> map); static IterableMap<K, V> lazyMap(final Map<K, V> map, final Factory<? extends V> factory); static IterableMap<K, V> lazyMap(final Map<K, V> map,
            final Transformer<? super K, ? extends V> transformerFactory); static OrderedMap<K, V> orderedMap(final Map<K, V> map); @Deprecated static MultiValueMap<K, V> multiValueMap(final Map<K, ? super Collection<V>> map); @Deprecated static MultiValueMap<K, V> multiValueMap(final Map<K, C> map,
            final Class<C> collectionClass); @Deprecated static MultiValueMap<K, V> multiValueMap(final Map<K, C> map,
            final Factory<C> collectionFactory); static SortedMap<K, V> synchronizedSortedMap(final SortedMap<K, V> map); static SortedMap<K, V> unmodifiableSortedMap(final SortedMap<K, ? extends V> map); static SortedMap<K, V> predicatedSortedMap(final SortedMap<K, V> map,
            final Predicate<? super K> keyPred, final Predicate<? super V> valuePred); static SortedMap<K, V> transformedSortedMap(final SortedMap<K, V> map,
            final Transformer<? super K, ? extends K> keyTransformer,
            final Transformer<? super V, ? extends V> valueTransformer); static SortedMap<K, V> fixedSizeSortedMap(final SortedMap<K, V> map); static SortedMap<K, V> lazySortedMap(final SortedMap<K, V> map, final Factory<? extends V> factory); static SortedMap<K, V> lazySortedMap(final SortedMap<K, V> map,
            final Transformer<? super K, ? extends V> transformerFactory); static void populateMap(final Map<K, V> map, final Iterable<? extends V> elements,
                                          final Transformer<V, K> keyTransformer); static void populateMap(final Map<K, V> map, final Iterable<? extends E> elements,
                                             final Transformer<E, K> keyTransformer,
                                             final Transformer<E, V> valueTransformer); static void populateMap(final MultiMap<K, V> map, final Iterable<? extends V> elements,
                                          final Transformer<V, K> keyTransformer); static void populateMap(final MultiMap<K, V> map, final Iterable<? extends E> elements,
                                             final Transformer<E, K> keyTransformer,
                                             final Transformer<E, V> valueTransformer); static IterableMap<K, V> iterableMap(final Map<K, V> map); static IterableSortedMap<K, V> iterableSortedMap(final SortedMap<K, V> sortedMap); }
MapUtils { public static void debugPrint(final PrintStream out, final Object label, final Map<?, ?> map) { verbosePrintInternal(out, label, map, new ArrayDeque<Map<?, ?>>(), true); } private  MapUtils(); static V getObject(final Map<? super K, V> map, final K key); static String getString(final Map<? super K, ?> map, final K key); static Boolean getBoolean(final Map<? super K, ?> map, final K key); static Number getNumber(final Map<? super K, ?> map, final K key); static Byte getByte(final Map<? super K, ?> map, final K key); static Short getShort(final Map<? super K, ?> map, final K key); static Integer getInteger(final Map<? super K, ?> map, final K key); static Long getLong(final Map<? super K, ?> map, final K key); static Float getFloat(final Map<? super K, ?> map, final K key); static Double getDouble(final Map<? super K, ?> map, final K key); static Map<?, ?> getMap(final Map<? super K, ?> map, final K key); static V getObject(final Map<K, V> map, final K key, final V defaultValue); static String getString(final Map<? super K, ?> map, final K key, final String defaultValue); static Boolean getBoolean(final Map<? super K, ?> map, final K key, final Boolean defaultValue); static Number getNumber(final Map<? super K, ?> map, final K key, final Number defaultValue); static Byte getByte(final Map<? super K, ?> map, final K key, final Byte defaultValue); static Short getShort(final Map<? super K, ?> map, final K key, final Short defaultValue); static Integer getInteger(final Map<? super K, ?> map, final K key, final Integer defaultValue); static Long getLong(final Map<? super K, ?> map, final K key, final Long defaultValue); static Float getFloat(final Map<? super K, ?> map, final K key, final Float defaultValue); static Double getDouble(final Map<? super K, ?> map, final K key, final Double defaultValue); static Map<?, ?> getMap(final Map<? super K, ?> map, final K key, final Map<?, ?> defaultValue); static boolean getBooleanValue(final Map<? super K, ?> map, final K key); static byte getByteValue(final Map<? super K, ?> map, final K key); static short getShortValue(final Map<? super K, ?> map, final K key); static int getIntValue(final Map<? super K, ?> map, final K key); static long getLongValue(final Map<? super K, ?> map, final K key); static float getFloatValue(final Map<? super K, ?> map, final K key); static double getDoubleValue(final Map<? super K, ?> map, final K key); static boolean getBooleanValue(final Map<? super K, ?> map, final K key, final boolean defaultValue); static byte getByteValue(final Map<? super K, ?> map, final K key, final byte defaultValue); static short getShortValue(final Map<? super K, ?> map, final K key, final short defaultValue); static int getIntValue(final Map<? super K, ?> map, final K key, final int defaultValue); static long getLongValue(final Map<? super K, ?> map, final K key, final long defaultValue); static float getFloatValue(final Map<? super K, ?> map, final K key, final float defaultValue); static double getDoubleValue(final Map<? super K, ?> map, final K key, final double defaultValue); static Properties toProperties(final Map<K, V> map); static Map<String, Object> toMap(final ResourceBundle resourceBundle); static void verbosePrint(final PrintStream out, final Object label, final Map<?, ?> map); static void debugPrint(final PrintStream out, final Object label, final Map<?, ?> map); static Map<V, K> invertMap(final Map<K, V> map); static void safeAddToMap(final Map<? super K, Object> map, final K key, final Object value); @SuppressWarnings("unchecked") // As per Javadoc throws CCE for invalid array contents static Map<K, V> putAll(final Map<K, V> map, final Object[] array); static Map<K,V> emptyIfNull(final Map<K,V> map); static boolean isEmpty(final Map<?,?> map); static boolean isNotEmpty(final Map<?,?> map); static Map<K, V> synchronizedMap(final Map<K, V> map); static Map<K, V> unmodifiableMap(final Map<? extends K, ? extends V> map); static IterableMap<K, V> predicatedMap(final Map<K, V> map, final Predicate<? super K> keyPred,
                                                         final Predicate<? super V> valuePred); static IterableMap<K, V> transformedMap(final Map<K, V> map,
            final Transformer<? super K, ? extends K> keyTransformer,
            final Transformer<? super V, ? extends V> valueTransformer); static IterableMap<K, V> fixedSizeMap(final Map<K, V> map); static IterableMap<K, V> lazyMap(final Map<K, V> map, final Factory<? extends V> factory); static IterableMap<K, V> lazyMap(final Map<K, V> map,
            final Transformer<? super K, ? extends V> transformerFactory); static OrderedMap<K, V> orderedMap(final Map<K, V> map); @Deprecated static MultiValueMap<K, V> multiValueMap(final Map<K, ? super Collection<V>> map); @Deprecated static MultiValueMap<K, V> multiValueMap(final Map<K, C> map,
            final Class<C> collectionClass); @Deprecated static MultiValueMap<K, V> multiValueMap(final Map<K, C> map,
            final Factory<C> collectionFactory); static SortedMap<K, V> synchronizedSortedMap(final SortedMap<K, V> map); static SortedMap<K, V> unmodifiableSortedMap(final SortedMap<K, ? extends V> map); static SortedMap<K, V> predicatedSortedMap(final SortedMap<K, V> map,
            final Predicate<? super K> keyPred, final Predicate<? super V> valuePred); static SortedMap<K, V> transformedSortedMap(final SortedMap<K, V> map,
            final Transformer<? super K, ? extends K> keyTransformer,
            final Transformer<? super V, ? extends V> valueTransformer); static SortedMap<K, V> fixedSizeSortedMap(final SortedMap<K, V> map); static SortedMap<K, V> lazySortedMap(final SortedMap<K, V> map, final Factory<? extends V> factory); static SortedMap<K, V> lazySortedMap(final SortedMap<K, V> map,
            final Transformer<? super K, ? extends V> transformerFactory); static void populateMap(final Map<K, V> map, final Iterable<? extends V> elements,
                                          final Transformer<V, K> keyTransformer); static void populateMap(final Map<K, V> map, final Iterable<? extends E> elements,
                                             final Transformer<E, K> keyTransformer,
                                             final Transformer<E, V> valueTransformer); static void populateMap(final MultiMap<K, V> map, final Iterable<? extends V> elements,
                                          final Transformer<V, K> keyTransformer); static void populateMap(final MultiMap<K, V> map, final Iterable<? extends E> elements,
                                             final Transformer<E, K> keyTransformer,
                                             final Transformer<E, V> valueTransformer); static IterableMap<K, V> iterableMap(final Map<K, V> map); static IterableSortedMap<K, V> iterableSortedMap(final SortedMap<K, V> sortedMap); @SuppressWarnings("rawtypes")
    static final SortedMap EMPTY_SORTED_MAP; }