Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import com.mongodb.ReadPreference;

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

public class Main {
    private static final Map<String, ReadPreference> values = new HashMap<String, ReadPreference>(2);

    public static ReadPreference valueOf(String name) {
        return values.get(name.toLowerCase());
    }
}