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

io.github.nichetoolkit.rest.RestField Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package io.github.nichetoolkit.rest;

import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * 

RestField

* @author Cyan ([email protected]) * @version v1.0.0 */ public interface RestField extends RestValue { String getField(); static T parserField(Class clazz, String field) { if (field != null && clazz.isEnum()) { Map valueEnumMap =Stream.of(clazz.getEnumConstants()).collect(Collectors.toMap(RestField::getField, Function.identity())); return valueEnumMap.get(field); } else { return null; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy