library/src/main/java/com/kdgregory/aws/utils/iam/PolicyBuilder.java
/**
     *  Writes a field whose value may be an array or a single value.
     */
Writes a field whose value may be an array or a single value.
Writes a field whose value may be an array or a single value .
private static void appendListField(JsonGenerator out, String key, Collection<String> values)
    throws IOException
    {
        out.writeFieldName(key);
        if (values.size() == 1)
        {
            out.writeString(values.iterator().next());
        }
        else
        {
            out.writeStartArray();
            for (String value : values)
            {
                out.writeString(value);
            }
            out.writeEndArray();
        }
    }
private static void appendListField ( JsonGenerator out , String key , Collection < String > values ) throws IOException { out . writeFieldName ( key ) ; if ( values . size ( ) == 1 ) { out . writeString ( values . iterator ( ) . next ( ) ) ; } else { out . writeStartArray ( ) ; for ( String value : values ) { out . writeString ( value ) ; } out . writeEndArray ( ) ; } }
Writes a field whose value may be an array or a single value.
Writes a field whose value may be an array or a single value .