Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.LinkedHashMap;

public class Main {
    @SuppressWarnings("unchecked")
    static public LinkedHashMap invertOrdering(LinkedHashMap passedMap) {
        LinkedHashMap result = new LinkedHashMap();
        Object[] keys = passedMap.keySet().toArray();
        for (int i = keys.length - 1; i >= 0; i--)
            result.put(keys[i], passedMap.get(keys[i]));
        return result;
    }
}