Back to project page RateMyApp.
The source code is released under:
MIT License
If you think the Android project RateMyApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.mariosangiorgio.ratemyapp; //from w w w. j av a 2 s . co m public class OptionalValue<T> { private final T value; public OptionalValue(){ this.value = null; } public OptionalValue(T value){ if(value == null){ throw new IllegalArgumentException("Expected a non-null value"); } this.value = value; } public T value(){ return value; } public boolean hasValue(){ return value != null; } }