Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.Serializable;

import java.util.HashMap;
import java.util.Map;

public class Main {
    /**
     * Returns serializable map containing one-column order list, that can be serialized/deserialized by GWT serializer
     * NOTE: result of {@link Collections#singletonMap(Object, Object)} is not in white list for GWT serializer and
     * can't be serialized/deserialized
     * 
     * @param column
     *            column name
     * @param ascending
     *            true if order is ascending
     * @return one-column order list
     */
    public static <K extends Serializable, V extends Serializable> Map<K, V> getOrderList(K column, V ascending) {
        HashMap<K, V> map = new HashMap<K, V>();
        map.put(column, ascending);
        return map;
    }
}