|
Velocity Tools
VelocityView
VelocityView Tools
その他のサブプロジェクト
|
|
ParameterParser リファレンスドキュメント
|
| |
View tool for easy parsing of ServletRequest parameters.
ServletRequest のパラメータをパースするビューツールです。
| Class |
| | org.apache.velocity.tools.view.tools.ParameterParser |
| Name |
| | $params (Velocityコンテキスト内での推奨名) |
| Toolbox設定例 |
| | <tool>
<key>params</key>
<scope>request</scope>
<class>org.apache.velocity.tools.view.tools.ParameterParser</class>
</tool> |
| 作者 |
| | Nathan Bubna
|
- Method Overview
-
|
exists() |
Returns true if a parameter for the specified key exists.
|
|
getString() |
Returns the specified servlet request parameter as a String
|
|
getBoolean() |
Returns the specified servlet request parameter as a Boolean object or
a boolean primitive type
|
|
getNumber() |
Returns the specified servlet request parameter as a Number object
|
|
getInt() |
Returns the specified servlet request parameter as an integer
|
|
getDouble() |
Returns the specified servlet request parameter as a double
|
|
getStrings() |
Returns an array of Strings of all the values of the specified servlet
request parameter
|
|
getNumbers() |
Returns an array of Numbers of all the values of the specified servlet
request parameter
|
|
getInts() |
Returns an array of integers of all the values of the specified servlet
request parameter
|
|
getDoubles() |
Returns an array of doubles of all the values of the specified servlet
request parameter
|
- Method Overview
-
|
exists() |
指定されたキーに対応するパラメータが存在する場合 true を返却します。
|
|
getString() |
指定されたサーブレットリクエストのパラメータを String 形式で返却します。
|
|
getBoolean() |
指定されたサーブレットリクエストのパラメータを Boolean オブジェクト、またはプリミティブの boolean 形式で返却します。
|
|
getNumber() |
指定されたサーブレットリクエストのパラメータを Number オブジェクトとして返却します。
|
|
getInt() |
指定されたサーブレットリクエストのパラメータを int として返却します。
|
|
getDouble() |
指定されたサーブレットリクエストのパラメータを double として返却します。
|
|
getStrings() |
指定されたサーブレットリクエストの全てのパラメータを String の配列形式で返却します。
|
|
getNumbers() |
指定されたサーブレットリクエストの全てのパラメータを Number の配列形式で返却します。
|
|
getInts() |
指定されたサーブレットリクエストの全てのパラメータを int の配列形式で返却します。
|
|
getDoubles() |
指定されたサーブレットリクエストの全てのパラメータを double の配列形式で返却します。
|
|
|
exists()
|
| |
Returns true if a parameter for the specified key exists.
boolean exists(String key)
|
- Parameters
-
- key
-
The key of the parameter in question
- Returns
-
true if a parameter for the specified key exists or
false if this parameter is not present or has no value.
指定されたキーに対応するパラメータが存在する場合 true を返却します。
boolean exists(String key)
|
- Parameters
-
- key
-
問い合わせを行うパラメータのキー
- Returns
-
指定されたキーに対応するパラメータが存在する場合
true 、
パラメータが存在しない、または値を持っていない場合 false 。
|
|
getString()
|
| |
Returns the specified servlet request parameter as a String
String getString(String key)
|
String getString(String key, String alternate)
|
- Parameters
-
- key
-
The key of the desired string parameter
- alternate
-
An alternate value
- Returns
-
The value of the parameter matching the specified key or the
specified alternate String if there is no matching parameter.
A value of
null is returned if no alternate value
is defined and the desired parameter is not found.
指定されたサーブレットリクエストのパラメータを String 形式で返却します。
String getString(String key)
|
String getString(String key, String alternate)
|
- Parameters
-
- key
-
要求するパラメータのキー
- alternate
-
代替値
- Returns
-
指定されたキーに一致するパラメータの値。
一致するパラメータが無かった場合、指定された代替値が返却されます。
代替値が指定されておらず、要求されたパラメータが見つからなかった場合には
null が返却されます。
|
|
getBoolean()
|
| |
Returns the specified servlet request parameter as a Boolean object or
a boolean primitive type
Boolean getBoolean(String key)
|
Boolean getBoolean(String key, Boolean alternate)
|
boolean getBoolean(String key, boolean alternate)
|
- Parameters
-
- key
-
The key of the desired string parameter
- alternate
-
An alternate value
- Returns
-
A Boolean object or boolean primitive type that represents the
value of the servlet request parameter matching the specified key
or the specified alternate boolean if there is no matching parameter.
A value of
null is returned if no alternate value
is defined and the desired parameter is not found.
指定されたサーブレットリクエストのパラメータを Boolean オブジェクト、またはプリミティブの boolean 形式で返却します。
Boolean getBoolean(String key)
|
Boolean getBoolean(String key, Boolean alternate)
|
boolean getBoolean(String key, boolean alternate)
|
- Parameters
-
- key
-
要求するパラメータのキー
- alternate
-
代替値
- Returns
-
指定されたキーに一致するパラメータの値を表す Boolean オブジェクト、またはプリミティブの boolean を返却します。
一致するパラメータが無かった場合、指定された代替値が返却されます。
代替値が指定されておらず、要求されたパラメータが見つからなかった場合には
null が返却されます。
|
|
getNumber()
|
| |
Returns the specified servlet request parameter as a Number object
Number getNumber(String key)
|
Number getNumber(String key, Number alternate)
|
- Parameters
-
- key
-
The key of the desired string parameter
- alternate
-
An alternate value
- Returns
-
A
java.lang.Number object that represents the
value of the servlet request parameter matching the specified key
or the specified alternate Number if there is no matching parameter.
A value of null is returned if no alternate value
is defined and the desired parameter is not found.
指定されたサーブレットリクエストのパラメータを Number オブジェクトとして返却します。
Number getNumber(String key)
|
Number getNumber(String key, Number alternate)
|
- Parameters
-
- key
-
要求するパラメータのキー
- alternate
-
代替値
- Returns
-
指定されたキーに一致するパラメータの値を表す
java.lang.Number オブジェクトを返却します。
一致するパラメータが無かった場合、指定された代替値が返却されます。
代替値が指定されておらず、要求されたパラメータが見つからなかった場合には null が返却されます。
|
|
getInt()
|
| |
Returns the specified servlet request parameter as an integer
int getInt(String key, int alternate)
|
- Parameters
-
- key
-
The key of the desired string parameter
- alternate
-
An alternate value
- Returns
-
An integer that represents the
value of the servlet request parameter matching the specified key
or the specified alternate value if there is no matching parameter.
指定されたサーブレットリクエストのパラメータを int として返却します。
int getInt(String key, int alternate)
|
- Parameters
-
- key
-
要求するパラメータのキー
- alternate
-
代替値
- Returns
-
指定されたキーに一致するパラメータの値を表す int を返却します。
一致するパラメータが無かった場合、指定された代替値が返却されます。
|
|
getDouble()
|
| |
Returns the specified servlet request parameter as a double
double getDouble(String key, double alternate)
|
- Parameters
-
- key
-
The key of the desired string parameter
- alternate
-
An alternate value
- Returns
-
An double that represents the
value of the servlet request parameter matching the specified key
or the specified alternate value if there is no matching parameter.
指定されたサーブレットリクエストのパラメータを double として返却します。
double getDouble(String key, double alternate)
|
- Parameters
-
- key
-
要求するパラメータのキー
- alternate
-
代替値
- Returns
-
指定されたキーに一致するパラメータの値を表す double を返却します。
一致するパラメータが無かった場合、指定された代替値が返却されます。
|
|
getStrings()
|
| |
Returns an array of Strings of all the values of the specified servlet
request parameter
String[] getStrings(String key)
|
- Parameters
-
- key
-
The key of the desired string parameter
- Returns
-
A array of Strings that represent all the values of the desired
request parameter or
null if the parameter does not
exist.
指定されたサーブレットリクエストの全てのパラメータを String の配列形式で返却します。
String[] getStrings(String key)
|
- Parameters
-
- key
-
要求するパラメータのキー
- Returns
-
指定されたキーに一致するパラメータの全ての値を表す String の配列。
パラメータが無かった場合、
null が返却されます。
|
|
getNumbers()
|
| |
Returns an array of Numbers of all the values of the specified servlet
request parameter
Number[] getNumbers(String key)
|
- Parameters
-
- key
-
The key of the desired string parameter
- Returns
-
A array of
java.lang.Number that represent all the
values of the desired request parameter or null if
the parameter does not exist.
指定されたサーブレットリクエストの全てのパラメータを Number の配列形式で返却します。
Number[] getNumbers(String key)
|
- Parameters
-
- key
-
要求するパラメータのキー
- Returns
-
指定されたキーに一致するパラメータの全ての値を表す
java.lang.Number の配列。
パラメータが無かった場合、 null が返却されます。
|
|
getInts()
|
| |
Returns an array of integers of all the values of the specified servlet
request parameter
int[] getInts(String key)
|
- Parameters
-
- key
-
The key of the desired string parameter
- Returns
-
A array of integer primitive types that represent all the
values of the desired request parameter or
null if
the parameter does not exist.
指定されたサーブレットリクエストの全てのパラメータを int の配列形式で返却します。
int[] getInts(String key)
|
- Parameters
-
- key
-
要求するパラメータのキー
- Returns
-
指定されたキーに一致するパラメータの全ての値を表す int の配列。
パラメータが無かった場合、
null が返却されます。
|
|
getDoubles()
|
| |
Returns an array of doubles of all the values of the specified servlet
request parameter
double[] getDoubles(String key)
|
- Parameters
-
- key
-
The key of the desired string parameter
- Returns
-
A array of double primitive types that represent all the
values of the desired request parameter or
null if
the parameter does not exist.
指定されたサーブレットリクエストの全てのパラメータを double の配列形式で返却します。
double[] getDoubles(String key)
|
- Parameters
-
- key
-
要求するパラメータのキー
- Returns
-
指定されたキーに一致するパラメータの全ての値を表す double の配列。
パラメータが無かった場合、
null が返却されます。
|
|