Package org.springframework.hateoas
Class QueryParameter
java.lang.Object
org.springframework.hateoas.QueryParameter
Representation of a web request's query parameter (https://example.com?name=foo) => {"name", "foo", true}.
- Author:
- Greg Turnquist, Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getName()
getValue()
int
hashCode()
boolean
static QueryParameter
of
(MethodParameter parameter) Creates a newQueryParameter
from the givenMethodParameter
.static QueryParameter
Creates a new optionalQueryParameter
with the given name;static QueryParameter
Creates a new requiredQueryParameter
with the given name;toString()
Create a newQueryParameter
by copying all attributes and applying the new value.
-
Method Details
-
of
Creates a newQueryParameter
from the givenMethodParameter
.- Parameters:
parameter
- must not be null.- Returns:
- will never be null.
-
required
Creates a new requiredQueryParameter
with the given name;- Parameters:
name
- must not be null or empty.- Returns:
-
optional
Creates a new optionalQueryParameter
with the given name;- Parameters:
name
- must not be null or empty.- Returns:
-
withValue
Create a newQueryParameter
by copying all attributes and applying the new value.- Parameters:
value
-- Returns:
-
getName
-
getValue
-
isRequired
public boolean isRequired() -
equals
-
hashCode
public int hashCode() -
toString
-