src/main/java/com/mxgraph/io/mxObjectCodec.java
protected void encodeElements(mxCodec enc, Object obj, Node node)
	{
		if (obj.getClass().isArray())
		{
			Object[] tmp = (Object[]) obj;

			for (int i = 0; i < tmp.length; i++)
			{
				encodeValue(enc, obj, null, tmp[i], node);
			}
		}
		else if (obj instanceof Map)
		{
			Iterator<Map.Entry> it = ((Map) obj).entrySet().iterator();

			while (it.hasNext())
			{
				Map.Entry e = it.next();
				encodeValue(enc, obj, String.valueOf(e.getKey()), e.getValue(),
						node);
			}
		}
		else if (obj instanceof Collection)
		{
			Iterator<?> it = ((Collection<?>) obj).iterator();

			while (it.hasNext())
			{
				Object value = it.next();
				encodeValue(enc, obj, null, value, node);
			}
		}
	}
/**
	 * Encodes the child objects of arrays, maps and collections.
	 * 
	 * @param enc Codec that controls the encoding process.
	 * @param obj Object whose child objects should be encoded.
	 * @param node XML node that contains the encoded object.
	 */
Encodes the child objects of arrays, maps and collections.

@param enc Codec that controls the encoding process.
@param obj Object whose child objects should be encoded.
@param node XML node that contains the encoded object.
Encodes the child objects of arrays maps and collections . @param enc Codec that controls the encoding process . @param obj Object whose child objects should be encoded . @param node XML node that contains the encoded object .
protected void encodeElements(mxCodec enc, Object obj, Node node)
	{
		if (obj.getClass().isArray())
		{
			Object[] tmp = (Object[]) obj;
			for (int i = 0; i < tmp.length; i++)
			{
				encodeValue(enc, obj, null, tmp[i], node);
			}
		}
		else if (obj instanceof Map)
		{
			Iterator<Map.Entry> it = ((Map) obj).entrySet().iterator();
			while (it.hasNext())
			{
				Map.Entry e = it.next();
				encodeValue(enc, obj, String.valueOf(e.getKey()), e.getValue(),
						node);
			}
		}
		else if (obj instanceof Collection)
		{
			Iterator<?> it = ((Collection<?>) obj).iterator();
			while (it.hasNext())
			{
				Object value = it.next();
				encodeValue(enc, obj, null, value, node);
			}
		}
	}
protected void encodeElements ( mxCodec enc , Object obj , Node node ) { if ( obj . getClass ( ) . isArray ( ) ) { Object [ ] tmp = ( Object [ ] ) obj ; for ( int i = 0 ; i < tmp . length ; i ++ ) { encodeValue ( enc , obj , null , tmp [ i ] , node ) ; } } else if ( obj instanceof Map ) { Iterator < Map . Entry > it = ( ( Map ) obj ) . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Map . Entry e = it . next ( ) ; encodeValue ( enc , obj , String . valueOf ( e . getKey ( ) ) , e . getValue ( ) , node ) ; } } else if ( obj instanceof Collection ) { Iterator < ? > it = ( ( Collection < ? > ) obj ) . iterator ( ) ; while ( it . hasNext ( ) ) { Object value = it . next ( ) ; encodeValue ( enc , obj , null , value , node ) ; } } }
Encodes the child objects of arrays, maps and collections.
Encodes the child objects of arrays maps and collections .