jaskell.script.Parameter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaskell-java8 Show documentation
Show all versions of jaskell-java8 Show documentation
This is a utils library for java 8 project.
It include parsec combinators and sql generators library.
package jaskell.script;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
public class Parameter implements Directive {
private Optional _value = null;
private Object _key;
private int _order;
private Class _cls;
private String _placeHolder;
protected Parameter(){}
public Parameter(String placeHolder, Object key, Class cls){
this._placeHolder = placeHolder;
_key = key;
_cls = cls;
}
public T value(){
return _value.orElse(null);
}
public void value(T v){
_value = Optional.ofNullable(v);
}
public boolean confirmed(){
return _value != null;
}
public String placeHolder(){
return _placeHolder;
}
public Class valueClass(){
return _cls;
}
public Object key(){
return _key;
}
public int order(){
return _order;
}
public void order(int o){
this._order = o;
}
@Override
public String script() {
return _placeHolder;
}
@Override
public List> parameters() {
List> re = new ArrayList<>();
re.add(this);
return re;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy