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

cat.nyaa.nyaacore.configuration.Setter Maven / Gradle / Ivy

There is a newer version: 3.12.2
Show newest version
package cat.nyaa.nyaacore.configuration;

import java.util.Optional;

import static cat.nyaa.nyaacore.configuration.Getter.getAccessor;

public interface Setter {

    static  Setter from(T p, Class> cls) {
        return getAccessor(p, cls);
    }

    /**
     * @param value String representation of the object
     * @return The object to be set to field, or empty if field are already set by this setter
     * @throws IllegalArgumentException {@code value} is not a valid representation of the object
     */
    Optional set(Object value) throws IllegalArgumentException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy