Class StructuredBoolean
java.lang.Object
net.visma.autopay.http.structured.StructuredItem
net.visma.autopay.http.structured.StructuredBoolean
- All Implemented Interfaces:
StructuredField
Class representing Structured Booleans. Also used as "bare" Boolean in Structured parameters.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns boolean value of this Structured BooleanbooleanCompares the specified object with this Structured Item for equality.inthashCode()Returns hash code for this Structured Item.static StructuredBooleanof(boolean value) Creates Structured Boolean of given value, without parametersstatic StructuredBooleanParses given string for Structured Boolean, according to the specificationstatic StructuredBooleanwithParams(boolean value, Map<String, ?> parameters) Creates Structured Boolean of given value and parametersstatic StructuredBooleanwithParams(boolean value, StructuredParameters parameters) Creates Structured Boolean of given value and parametersMethods inherited from class net.visma.autopay.http.structured.StructuredItem
bigDecimalParam, boolParam, bytesParam, doubleParam, intParam, longParam, parameters, serialize, stringParam, stringValue, toString
-
Method Details
-
of
Creates Structured Boolean of given value, without parameters- Parameters:
value- Item value- Returns:
- Created Structured Boolean
-
withParams
Creates Structured Boolean of given value and parameters- Parameters:
value- Item valueparameters- Parameter map. For details, checkStructuredParameters.of(Map).- Returns:
- Created Structured Boolean
-
withParams
Creates Structured Boolean of given value and parameters- Parameters:
value- Item valueparameters- Structured Parameters- Returns:
- Created Structured Boolean
-
boolValue
public boolean boolValue()Returns boolean value of this Structured Boolean- Returns:
- Boolean value represented by this Structured Boolean
-
parse
Parses given string for Structured Boolean, according to the specification- Parameters:
httpHeader- String to parse, e.g. an HTTP header- Returns:
- Parsed Structured Boolean
- Throws:
StructuredException- Thrown in case of malformatted string or wrong item type- See Also:
-
equals
Description copied from class:StructuredItemCompares the specified object with this Structured Item for equality. Returns true if the given object is of the same class as this Item, it has the same value and properties.- Overrides:
equalsin classStructuredItem- Parameters:
o- Object to be compared with this Structured Item- Returns:
- True is specified object is equal to this Structured Item
-
hashCode
public int hashCode()Description copied from class:StructuredItemReturns hash code for this Structured Item. The hash code is a combination of hash codes of Item parameters and Item value.- Overrides:
hashCodein classStructuredItem- Returns:
- The hash code for this Structured Item
-