Class Voucher
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.assurance.evidences.Voucher
-
-
Constructor Summary
Constructors Constructor Description Voucher(Name name, String birthdateString, Address address, Occupation occupation, Organization organization)
Creates a new voucher.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Address
getAddress()
Returns the address elements.String
getBirthdateString()
Returns the birthdate string.Name
getName()
Returns the name.Occupation
getOccupation()
Returns the occupation.Organization
getOrganization()
Returns the organisation.int
hashCode()
static Voucher
parse(net.minidev.json.JSONObject jsonObject)
Parses a voucher from the specified JSON objecassertEquals("Equality", voucher, Voucher.parse(jsonObject)); assertEquals("Hash code", voucher.hashCode(), Voucher.parse(jsonObject).hashCode());t.net.minidev.json.JSONObject
toJSONObject()
Returns a JSON object representation of this voucher.
-
-
-
Constructor Detail
-
Voucher
public Voucher(Name name, String birthdateString, Address address, Occupation occupation, Organization organization)
Creates a new voucher.- Parameters:
name
- The name,null
if not specified.birthdateString
- The birthday string,null
if not specified.address
- The address elements,null
if not specified.occupation
- The occupation,null
if not specified.organization
- The organisation,null
if not specified.
-
-
Method Detail
-
getBirthdateString
public String getBirthdateString()
Returns the birthdate string.- Returns:
- The birthdate string,
null
if not specified.
-
getAddress
public Address getAddress()
Returns the address elements.- Returns:
- The address elements,
null
if not specified.
-
getOccupation
public Occupation getOccupation()
Returns the occupation.- Returns:
- The occupation,
null
if not specified.
-
getOrganization
public Organization getOrganization()
Returns the organisation.- Returns:
- The organisation,
null
if not specified.
-
toJSONObject
public net.minidev.json.JSONObject toJSONObject()
Returns a JSON object representation of this voucher.- Returns:
- The JSON object.
-
parse
public static Voucher parse(net.minidev.json.JSONObject jsonObject) throws ParseException
Parses a voucher from the specified JSON objecassertEquals("Equality", voucher, Voucher.parse(jsonObject)); assertEquals("Hash code", voucher.hashCode(), Voucher.parse(jsonObject).hashCode());t.- Parameters:
jsonObject
- The JSON object. Must not benull
.- Returns:
- The voucher.
- Throws:
ParseException
- If parsing failed.
-
-