@Test public void testAlreadyReadableMap() { final HashedMap<String, Integer> hashedMap = new HashedMap<String, Integer>(); assertSame(hashedMap, SplitMapUtils.readableMap(hashedMap)); }
@SuppressWarnings("unchecked") public static <K, V> IterableMap<K, V> readableMap(final Get<K, V> get) { if (get == null) { throw new NullPointerException("Get must not be null"); } if (get instanceof Map) { return get instanceof IterableMap ? ((IterableMap<K, V>) get) : MapUtils.iterableMap((Map<K, V>) get); } return new WrappedGet<K, V>(get); }
SplitMapUtils { @SuppressWarnings("unchecked") public static <K, V> IterableMap<K, V> readableMap(final Get<K, V> get) { if (get == null) { throw new NullPointerException("Get must not be null"); } if (get instanceof Map) { return get instanceof IterableMap ? ((IterableMap<K, V>) get) : MapUtils.iterableMap((Map<K, V>) get); } return new WrappedGet<K, V>(get); } }
SplitMapUtils { @SuppressWarnings("unchecked") public static <K, V> IterableMap<K, V> readableMap(final Get<K, V> get) { if (get == null) { throw new NullPointerException("Get must not be null"); } if (get instanceof Map) { return get instanceof IterableMap ? ((IterableMap<K, V>) get) : MapUtils.iterableMap((Map<K, V>) get); } return new WrappedGet<K, V>(get); } private  SplitMapUtils(); }
SplitMapUtils { @SuppressWarnings("unchecked") public static <K, V> IterableMap<K, V> readableMap(final Get<K, V> get) { if (get == null) { throw new NullPointerException("Get must not be null"); } if (get instanceof Map) { return get instanceof IterableMap ? ((IterableMap<K, V>) get) : MapUtils.iterableMap((Map<K, V>) get); } return new WrappedGet<K, V>(get); } private  SplitMapUtils(); @SuppressWarnings("unchecked") static IterableMap<K, V> readableMap(final Get<K, V> get); @SuppressWarnings("unchecked") static Map<K, V> writableMap(final Put<K, V> put); }
SplitMapUtils { @SuppressWarnings("unchecked") public static <K, V> IterableMap<K, V> readableMap(final Get<K, V> get) { if (get == null) { throw new NullPointerException("Get must not be null"); } if (get instanceof Map) { return get instanceof IterableMap ? ((IterableMap<K, V>) get) : MapUtils.iterableMap((Map<K, V>) get); } return new WrappedGet<K, V>(get); } private  SplitMapUtils(); @SuppressWarnings("unchecked") static IterableMap<K, V> readableMap(final Get<K, V> get); @SuppressWarnings("unchecked") static Map<K, V> writableMap(final Put<K, V> put);  }