Class VasPayloadElement

    • Constructor Detail

      • VasPayloadElement

        public VasPayloadElement()
        Constructs a new empty instance.
      • VasPayloadElement

        protected VasPayloadElement​(boolean noInit)
        Constructs a new empty instance.
      • VasPayloadElement

        public VasPayloadElement​(JSONObject jsonObject)
        Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • VasPayloadElement

        public VasPayloadElement​(VasPayloadElement src)
        Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
    • Method Detail

      • getDataType

        public VasDataType getDataType()
        Indicates the type of data in this response.
      • getResponseFormat

        public VasResponseFormat getResponseFormat()
        Format of vasData payload.
      • getVasData

        public String getVasData()
        Vas data. For NDEF it will be base64 encoded binary.
      • getProtocolId

        public VasProtocol getProtocolId()
        Protocol this payload element was derived from
      • getMerchantId

        public String getMerchantId()
        Merchant id associated with this payload element (hex encoded)
      • getJSONObject

        public JSONObject getJSONObject()
        Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be reflected in this instance and vice-versa.
        Specified by:
        getJSONObject in interface JSONifiable
      • isNotNullDataType

        public boolean isNotNullDataType()
        Checks whether the 'dataType' field is set and is not null
      • isNotNullResponseFormat

        public boolean isNotNullResponseFormat()
        Checks whether the 'responseFormat' field is set and is not null
      • isNotNullVasData

        public boolean isNotNullVasData()
        Checks whether the 'vasData' field is set and is not null
      • isNotNullProtocolId

        public boolean isNotNullProtocolId()
        Checks whether the 'protocolId' field is set and is not null
      • isNotNullMerchantId

        public boolean isNotNullMerchantId()
        Checks whether the 'merchantId' field is set and is not null
      • hasDataType

        public boolean hasDataType()
        Checks whether the 'dataType' field has been set, however the value could be null
      • hasResponseFormat

        public boolean hasResponseFormat()
        Checks whether the 'responseFormat' field has been set, however the value could be null
      • hasVasData

        public boolean hasVasData()
        Checks whether the 'vasData' field has been set, however the value could be null
      • hasProtocolId

        public boolean hasProtocolId()
        Checks whether the 'protocolId' field has been set, however the value could be null
      • hasMerchantId

        public boolean hasMerchantId()
        Checks whether the 'merchantId' field has been set, however the value could be null
      • setDataType

        public VasPayloadElement setDataType​(VasDataType dataType)
        Sets the field 'dataType'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • clearDataType

        public void clearDataType()
        Clears the 'dataType' field, the 'has' method for this field will now return false
      • clearResponseFormat

        public void clearResponseFormat()
        Clears the 'responseFormat' field, the 'has' method for this field will now return false
      • clearVasData

        public void clearVasData()
        Clears the 'vasData' field, the 'has' method for this field will now return false
      • clearProtocolId

        public void clearProtocolId()
        Clears the 'protocolId' field, the 'has' method for this field will now return false
      • clearMerchantId

        public void clearMerchantId()
        Clears the 'merchantId' field, the 'has' method for this field will now return false
      • containsChanges

        public boolean containsChanges()
        Returns true if this instance has any changes.
      • resetChangeLog

        public void resetChangeLog()
        Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
      • copyChanges

        public VasPayloadElement copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(VasPayloadElement src)
        Copy all the changed fields from the given source to this instance.