|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.commons.util.defaults.ConstantListDefault<V>
public class ConstantListDefault<V>
The class provides a default implementation which returns a constant value.
| Constructor Summary | |
|---|---|
ConstantListDefault(V def)
Constructs a new constant default object which will use the specified default value. |
|
| Method Summary | |
|---|---|
V |
first(IList<V> list)
Returns the value to use when there is no first element in the list. |
V |
get(IMap<java.lang.Integer,V> map,
java.lang.Integer key)
Returns the value to use when the specified key is not valid in the for the mapping. |
V |
last(IList<V> list)
Returns the value to use when there is no last element in the list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstantListDefault(V def)
def - the default value| Method Detail |
|---|
public V first(IList<V> list)
IListDefault
first in interface IListDefault<V>list - the list which requested the default value for the first
element
IListDefault.first(IList)
public V get(IMap<java.lang.Integer,V> map,
java.lang.Integer key)
IMapDefault
get in interface IMapDefault<java.lang.Integer,V>map - the map which requested the default value for the given keykey - the key that is not valid for the mapping
org.millscript.commons.util.IMapDefault#get(IMap, K)public V last(IList<V> list)
IListDefault
last in interface IListDefault<V>list - the list which requested the default value for the last
element
IListDefault.last(IList)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||