Package com.linecorp.armeria.server
Class PathMapped<T>
- java.lang.Object
-
- com.linecorp.armeria.server.PathMapped<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> PathMapped<T>
empty()
Returns a singleton instance of aPathMapped
that represents a non-existent value.boolean
isPresent()
Returnstrue
if and only ifRouter
found a matching value.PathMapping
mapping()
Returns thePathMapping
which matched the path.PathMappingResult
mappingResult()
Returns thePathMappingResult
.String
toString()
T
value()
Returns the value.
-
-
-
Method Detail
-
empty
public static <T> PathMapped<T> empty()
Returns a singleton instance of aPathMapped
that represents a non-existent value.
-
isPresent
public boolean isPresent()
Returnstrue
if and only ifRouter
found a matching value.
-
mapping
public PathMapping mapping()
Returns thePathMapping
which matched the path.- Throws:
IllegalStateException
- if there's no match
-
mappingResult
public PathMappingResult mappingResult()
Returns thePathMappingResult
.- Throws:
IllegalStateException
- if there's no match
-
value
public T value()
Returns the value.- Throws:
IllegalStateException
- if there's no match
-
-