@SuppressWarnings("unchecked") public IntMap<? extends Savable> readIntSavableMap(String name, IntMap<? extends Savable> defVal) throws IOException { BinaryClassField field = cObj.nameFields.get(name); if (field == null || !fieldData.containsKey(field.alias)) return defVal; Object value = fieldData.get(field.alias); if (value instanceof IntIDMap) { // read Savable array and convert to Map values IntIDMap in = (IntIDMap) value; Savable[] values = resolveIDs(in.values); value = intSavableMapFromKV(in.keys, values); fieldData.put(field.alias, value); } return (IntMap<Savable>) value; }
@SuppressWarnings("unchecked") public IntMap<? extends Savable> readIntSavableMap(String name, IntMap<? extends Savable> defVal) throws IOException { BinaryClassField field = cObj.nameFields.get(name); if (field == null || !fieldData.containsKey(field.alias)) return defVal; Object value = fieldData.get(field.alias); if (value instanceof IntIDMap) { // read Savable array and convert to Map values IntIDMap in = (IntIDMap) value; Savable[] values = resolveIDs(in.values); value = intSavableMapFromKV(in.keys, values); fieldData.put(field.alias, value); } return (IntMap<Savable>) value; }
@SuppressWarnings("unchecked") public IntMap<? extends Savable> readIntSavableMap(String name, IntMap<? extends Savable> defVal) throws IOException { BinaryClassField field = cObj.nameFields.get(name); if (field == null || !fieldData.containsKey(field.alias)) return defVal; Object value = fieldData.get(field.alias); if (value instanceof IntIDMap) { // read Savable array and convert to Map values IntIDMap in = (IntIDMap) value; Savable[] values = resolveIDs(in.values); value = intSavableMapFromKV(in.keys, values); fieldData.put(field.alias, value); } return (IntMap<Savable>) value; }