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 TypeMethodDescriptionbooleangetName()getValue()inthashCode()booleanstatic QueryParameterof(MethodParameter parameter) Creates a newQueryParameterfrom the givenMethodParameter.static QueryParameterCreates a new optionalQueryParameterwith the given name;static QueryParameterCreates a new requiredQueryParameterwith the given name;toString()Create a newQueryParameterby copying all attributes and applying the new value.
-
Method Details
-
of
Creates a newQueryParameterfrom the givenMethodParameter.- Parameters:
parameter- must not be null.- Returns:
- will never be null.
-
required
Creates a new requiredQueryParameterwith the given name;- Parameters:
name- must not be null or empty.- Returns:
-
optional
Creates a new optionalQueryParameterwith the given name;- Parameters:
name- must not be null or empty.- Returns:
-
withValue
Create a newQueryParameterby copying all attributes and applying the new value.- Parameters:
value-- Returns:
-
getName
-
getValue
-
isRequired
public boolean isRequired() -
equals
-
hashCode
public int hashCode() -
toString
-