Converts o from a Map back to the Java Class associated with this Struct.
Recursively unmarshals all the members of the map.

@param map Map to unmarshal
@throws RpcException If o does not comply with the IDL definition for this Struct
354094
public Object unmarshal(Object map) throws RpcException {
        return unmarshal(getTypeClass(), map, this.s, this.isOptional);
    }
1063067
public JsonWriter value(Map<String, ?> map) throws IOException {
      if (map == null) {
         nullValue();
      } else {
         boolean inObject = inObject();
         if (!inObject) beginObject();
         for (Map.Entry<String, ?> entry : map.entrySet()) {
            property(entry.getKey(), entry.getValue());
         }
         if (!inObject) endObject();
      }
      popIf(JsonTokenType.NAME);
      return this;
   }
602976
@Override
    public void setTypeMap(Map<String,Class<?>> map) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
1286741
private String convertToJson(Map<String, ?> map) throws MovieDbException {
        try {
            return MAPPER.writeValueAsString(map);
        } catch (JsonProcessingException ex) {
            throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "JSON conversion failed", "", ex);
        }
    }
138339
public static Map<String, AttributeValue> fromSimpleMap(
        Map<String, Object> map) {
        if (map == null)
            return null;
        // row with multiple attributes
        Map<String, AttributeValue> result = new LinkedHashMap<String, AttributeValue>();
        for (Map.Entry<String, Object> entry : map.entrySet())
            result.put(entry.getKey(), toAttributeValue(entry.getValue()));
        return result;
    }
72894
public static <T> T unmarshal(InputStream is, ObjectMapper mapper) {
   return unmarshal(is, mapper, Collections.<String, String>emptyMap());
  }
758382
public static String getClassName(Map<String, Object> map) {
        String className = null;

        if (map.containsKey(MAP_CLASS_NAME) == true) {
            className = (String) map.get(MAP_CLASS_NAME);
        }

        return className;
    }
875124
public static <K, V> MutableList<Pair<K, V>> toListOfPairs(Map<K, V> map)
    {
        final MutableList<Pair<K, V>> pairs = FastList.newList(map.size());
        MapIterate.forEachKeyValue(map, new Procedure2<K, V>()
        {
            public void value(K key, V value)
            {
                pairs.add(Tuples.pair(key, value));
            }
        });
        return pairs;
    }
443844
protected void processMap(final URI map) {
        assert !map.isAbsolute();
        this.map = map;
        currentFile = job.tempDirURI.resolve(map);
        // parse
        logger.info("Processing " + currentFile);
        final Document doc;
        try {
            logger.debug("Reading " + currentFile);
            doc = builder.parse(new InputSource(currentFile.toString()));
        } catch (final SAXException | IOException e) {
            logger.error("Failed to parse " + currentFile, e);
            return;
        }

        logger.debug("Split branches and generate copy-to");
        splitBranches(doc.getDocumentElement(), Branch.EMPTY);
        logger.debug("Filter map");
        filterBranches(doc.getDocumentElement());
        logger.debug("Rewrite duplicate topic references");
        rewriteDuplicates(doc.getDocumentElement());
        logger.debug("Filter topics and generate copies");
        generateCopies(doc.getDocumentElement(), Collections.emptyList());
        logger.debug("Filter existing topics");
        filterTopics(doc.getDocumentElement(), Collections.emptyList());

        logger.debug("Writing " + currentFile);
        Result result = null;
        try {
            Transformer serializer = TransformerFactory.newInstance().newTransformer();
            result = new StreamResult(currentFile.toString());
            serializer.transform(new DOMSource(doc), result);
        } catch (final TransformerConfigurationException | TransformerFactoryConfigurationError e) {
            throw new RuntimeException(e);
        } catch (final TransformerException e) {
            logger.error("Failed to serialize " + map.toString() + ": " + e.getMessage(), e);
        } finally {
            try {
                close(result);
            } catch (final IOException e) {
                logger.error("Failed to close result stream for " + map.toString() + ": " + e.getMessage(), e);
            }
        }
    }
344012
public static <K, V> Map<K, V> unmodifiableCopy(
        Map<? extends K, ? extends V> map)
    {
        return Collections.<K, V>unmodifiableMap(
            new LinkedHashMap<K, V>(map));
    }
1087971
public static void toJSONString(OutputAccessor out, Map<String, ? extends Object> map) {

        writeObjectStart(out);
        boolean first = true;

        for (Map.Entry<String, ? extends Object> entry : map.entrySet()) {

            if (first) {
                first = false;
            } else {
                writeKeyValueSeparator(out);
            }

            writeMapEntry(out, entry.getKey(), entry.getValue());
        }

        writeObjectEnd(out);

    }
720685
public void unmarshalling(Xdr xdr) throws RpcException {
        super.unmarshalling(xdr);
        unmarshallingAttributes(xdr);
        if (stateIsOk()) {
            _access = xdr.getUnsignedInt();
        }
    }
843118
@Override
    public String serialize(Map<String, String> map) {

        try {

            // the format is based on the properties output format
            Properties props = new Properties();
            props.putAll(map);
            Writer writer = new StringWriter();
            props.store(writer, null);

            // we need a list of strings so we can further process the format
            List<String> lines = new ArrayList<String>();
            for (String line : writer.toString().split("\r?\n")) {
                // comments and empty lines are skipped
                if (!line.trim().isEmpty() && !line.trim().startsWith("#")) {
                    lines.add(line.trim());
                }
            }

            // sort by key so create a canonical format
            Collections.sort(lines);

            // build the output string
            StringBuilder builder = new StringBuilder();
            for (String line : lines) {

                if (multiline) {
                    if (builder.length() > 0) {
                        builder.append(lineSeparator);
                    }
                    builder.append(line);
                }
                else {
                    if (builder.length() > 0) {
                        builder.append("&");
                    }
                    builder.append(line.replace("&", "\\u0026"));
                }

            }
            return builder.toString();

        } catch (IOException e) {
            throw new IllegalStateException(e);
        }

    }
212976
static String toStringImpl(Map<?, ?> map) {
    StringBuilder sb = Collections2.newStringBuilderForCollection(map.size()).append('{');
    STANDARD_JOINER.appendTo(sb, map);
    return sb.append('}').toString();
  }
1118209
public static <K, V> Map<K, V> immutableMapWrap(Map<? extends K, ? extends V> map) {
      return new ImmutableMapWrapper<>(map);
   }
14375
@Override
    @SuppressWarnings ("unchecked")
    public void deserialize(byte[] serializedData, boolean wipe) throws IOException {
        if (wipe) {
            map.clear();
        }
        InputStream in = new ByteArrayInputStream(serializedData);
        ObjectInputStream ois = new ClassResolverObjectInputStream(in);
        try {
            // Because it may be a map of maps, we want to UPDATE inner maps, not overwrite
            for (Map.Entry<String, ? extends Serializable> e : ((Map<String, ? extends Serializable>) ois.readObject()).entrySet()) {
                if (e.getValue() instanceof Map && map.get(e.getKey()) instanceof Map) {
                    ((Map) map.get(e.getKey())).putAll((Map) e.getValue());
                } else {
                    put(e.getKey(), e.getValue());
                }
            }
        } catch (ClassNotFoundException ex) {
            throw new IllegalStateException("Unable to decompress SerializableHashMap", ex);
        }
    }
988660
public static Object[][] toObjectArray(Map<?, ?> map) {
		if(map == null) {
			return null;
		}
		final Object[][] result = new Object[map.size()][2];
		if(map.isEmpty()) {
			return result;
		}
		int index = 0;
		for(Entry<?, ?> entry : map.entrySet()) {
			result[index][0] = entry.getKey();
			result[index][1] = entry.getValue();
			index++;
		}
		return result;
	}