Package org.ujorm.tools.web.ao
Interface HttpParameter
- All Superinterfaces:
CharSequence
- All Known Implementing Classes:
DefaultHttpParam
An interface for bulding HTML parameters by an Enumerator.
Usage
{
String value = Param.text(ServletRequest, "my default value");
}
enum Param implements HttpParam {
REGEXP,
TEXT;- Author:
- Pavel Ponec
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull StringbuildParameterName(@Nullable String name) Build a default non-null parameter name.default @NotNull StringReturns a non-null default text value.default charcharAt(int index) default intlength()static HttpParameterCreate a default implementationstatic HttpParameterCreate a default implementationdefault @NotNull Stringof(@NotNull HttpContext context) Default value is an empty Stringdefault booleanof(@NotNull HttpContext context, @org.jetbrains.annotations.Nullable boolean defaultValue) Returns a parameter of the request or the default valuedefault doubleof(@NotNull HttpContext context, @org.jetbrains.annotations.Nullable double defaultValue) Returns a parameter of the request or the default valuedefault floatof(@NotNull HttpContext context, @org.jetbrains.annotations.Nullable float defaultValue) Returns a parameter of the request or the default valuedefault charof(@NotNull HttpContext context, @org.jetbrains.annotations.Nullable char defaultValue) Returns a parameter of the request or the default valuedefault intof(@NotNull HttpContext context, @org.jetbrains.annotations.Nullable int defaultValue) Returns a parameter of the request or the default valuedefault longof(@NotNull HttpContext context, @org.jetbrains.annotations.Nullable long defaultValue) Returns a parameter of the request or the default valuedefault shortof(@NotNull HttpContext context, @org.jetbrains.annotations.Nullable short defaultValue) Returns a parameter of the request or the default valuedefault <V extends Enum<V>>
Vof(@NotNull HttpContext context, @NotNull Class<V> clazz) Returns a parameter of the request or the default valuedefault @NotNull Stringof(@NotNull HttpContext context, @NotNull String defaultValue) Returns the last parameter value of the request or a default valuedefault <V extends Enum<V>>
Vof(@NotNull HttpContext context, V defaultValue) Returns a parameter of the request or the Enum classdefault <V> Vof(@NotNull HttpContext context, V defaultValue, @NotNull Function<String, V> decoder) Returns a parameter of the request or the default valuedefault @NotNull StringDefault value is an empty Stringdefault @NotNull StringReturns the last parameter value of the request or a default value.default @NotNull StringGet a raw name of the HTTP parameter.default CharSequencesubSequence(int start, int end) @NotNull StringtoString()Returns a parameter nameMethods inherited from interface java.lang.CharSequence
codePoints, chars, isEmpty
-
Field Details
-
EMPTY_VALUE
An empty text value- See Also:
-
-
Method Details
-
toString
Returns a parameter name- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
length
default int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
default char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
defaultValue
Returns a non-null default text value. The standard value is an empty String, override it for a change. -
buildParameterName
Build a default non-null parameter name. -
originalName
Get a raw name of the HTTP parameter. The method can be called from thebuildParameterName(java.lang.String)method. NOTE: The method was renamed from obsoletename()due a Kotlin compatibility. -
of
@NotNull default @NotNull String of(@NotNull @NotNull URequest request, @NotNull @NotNull String defaultValue) Returns the last parameter value of the request or a default value. The MAIN method -
of
@NotNull default @NotNull String of(@NotNull @NotNull HttpContext context, @NotNull @NotNull String defaultValue) Returns the last parameter value of the request or a default value -
of
Default value is an empty String -
of
Default value is an empty String -
of
default boolean of(@NotNull @NotNull HttpContext context, @Nullable @org.jetbrains.annotations.Nullable boolean defaultValue) Returns a parameter of the request or the default value -
of
default char of(@NotNull @NotNull HttpContext context, @Nullable @org.jetbrains.annotations.Nullable char defaultValue) Returns a parameter of the request or the default value -
of
default short of(@NotNull @NotNull HttpContext context, @Nullable @org.jetbrains.annotations.Nullable short defaultValue) Returns a parameter of the request or the default value -
of
default int of(@NotNull @NotNull HttpContext context, @Nullable @org.jetbrains.annotations.Nullable int defaultValue) Returns a parameter of the request or the default value -
of
default long of(@NotNull @NotNull HttpContext context, @Nullable @org.jetbrains.annotations.Nullable long defaultValue) Returns a parameter of the request or the default value -
of
default float of(@NotNull @NotNull HttpContext context, @Nullable @org.jetbrains.annotations.Nullable float defaultValue) Returns a parameter of the request or the default value -
of
default double of(@NotNull @NotNull HttpContext context, @Nullable @org.jetbrains.annotations.Nullable double defaultValue) Returns a parameter of the request or the default value -
of
@NotNull default <V extends Enum<V>> V of(@NotNull @NotNull HttpContext context, @NotNull V defaultValue) Returns a parameter of the request or the Enum class -
of
@Nullable default <V extends Enum<V>> V of(@NotNull @NotNull HttpContext context, @NotNull @NotNull Class<V> clazz) Returns a parameter of the request or the default value -
of
default <V> V of(@NotNull @NotNull HttpContext context, @NotNull V defaultValue, @NotNull @NotNull Function<String, V> decoder) Returns a parameter of the request or the default value -
of
Create a default implementation -
of
Create a default implementation
-