Skip to content

Commit dd28e98

Browse files
committed
Added Value#isPresent
1 parent 2475644 commit dd28e98

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

jooby/src/main/java/io/jooby/Value.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,15 @@ default boolean isMissing() {
324324
return this instanceof MissingValue;
325325
}
326326

327+
/**
328+
* True for present values.
329+
*
330+
* @return True for present values.
331+
*/
332+
default boolean isPresent() {
333+
return !isMissing();
334+
}
335+
327336
/**
328337
* True if this value is an array/sequence (not single or hash).
329338
*

0 commit comments

Comments
 (0)