Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.ArrayList;

import java.util.List;
import java.util.Map;

public class Main {
    public static List<Map<String, String>> searchFromAccNumber(List<Map<String, String>> orders, String acc) {
        List<Map<String, String>> result = new ArrayList<Map<String, String>>();
        if (acc != null) {
            for (Map<String, String> o : orders) {
                if (acc.equalsIgnoreCase(o.get("accountNumber"))) {
                    result.add(o);
                }
            }
        }
        return result;
    }
}