cat.nyaa.nyaacore.configuration.Setter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rpgitems Show documentation
Show all versions of rpgitems Show documentation
The legacy RPGItems continues. (fork)
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;
}