All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.atdixon.vivean.Vg Maven / Gradle / Ivy

package com.github.atdixon.vivean;

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

public final class Vg {

    private Vg() {}

    // -- String --

    public static Optional oneString(Map map, String key) {
        return V.one(V.get(map, key), String.class);
    }

    public static List manyString(Map map, String key) {
        return V.many(V.get(map, key), String.class);
    }

    // -- Boolean --

    public static Optional oneBoolean(Map map, String key) {
        return V.one(V.get(map, key), boolean.class);
    }

    public static List manyBoolean(Map map, String key) {
        return V.many(V.get(map, key), boolean.class);
    }

    // -- Byte --

    public static Optional oneByte(Map map, String key) {
        return V.one(V.get(map, key), byte.class);
    }

    public static List manyByte(Map map, String key) {
        return V.many(V.get(map, key), byte.class);
    }

    // -- Short --

    public static Optional oneShort(Map map, String key) {
        return V.one(V.get(map, key), short.class);
    }

    public static List manyShort(Map map, String key) {
        return V.many(V.get(map, key), short.class);
    }

    // -- Integer --

    public static Optional oneInt(Map map, String key) {
        return V.one(V.get(map, key), int.class);
    }

    public static List manyInt(Map map, String key) {
        return V.many(V.get(map, key), int.class);
    }

    // -- Long --

    public static Optional oneLong(Map map, String key) {
        return V.one(V.get(map, key), long.class);
    }

    public static List manyLong(Map map, String key) {
        return V.many(V.get(map, key), long.class);
    }

    // -- Float --

    public static Optional oneFloat(Map map, String key) {
        return V.one(V.get(map, key), float.class);
    }

    public static List manyFloat(Map map, String key) {
        return V.many(V.get(map, key), float.class);
    }

    // -- Double --

    public static Optional oneDouble(Map map, String key) {
        return V.one(V.get(map, key), double.class);
    }

    public static List manyDouble(Map map, String key) {
        return V.many(V.get(map, key), double.class);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy