Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Iterator;

import java.util.Map;

public class Main {
    /**
     * Returns the string that represents the content of a given style map.
     * @param styleMap Map with the styles values
     * @return string that represents the style.
     */
    public static String getStyleString(Map<String, Object> styleMap, String asig) {
        String style = "";
        Iterator<Object> it = styleMap.values().iterator();
        Iterator<String> kit = styleMap.keySet().iterator();

        while (kit.hasNext()) {
            String key = kit.next();
            Object value = it.next();
            style = style + key + asig + value + ";";
        }
        return style;
    }
}