com.avalara.avatax.services.address
Class ArrayOfValidAddress

java.lang.Object
  extended by com.avalara.avatax.services.address.ArrayOfValidAddress
All Implemented Interfaces:
java.io.Serializable

public class ArrayOfValidAddress
extends java.lang.Object
implements java.io.Serializable

A Axis Wrapper for an array containing zero or more ValidAddress objects.

 Example:
 [Java]
  ValidateRequest request = new ValidateRequest();
  Address address = new Address();
  address.setLine1("900 Winslow Way");
  address.setLine2("Suite 130");
  address.setCity("Bainbridge Is");
  address.setRegion("WA");
  address.setPostalCode("98110-2450");
  request.setAddress(address);
  request.setTextCase(TextCase.Upper);

  ValidateResult result;
  result = svc.validate(request);

  if (SeverityLevel.Success.equals(result.getResultCode()))
  {
      ArrayOfValidAddress arrValids = result.getValidAddresses();
      if (arrValids != null && arrValids.getValidAddress() != null &&
              arrValids.getValidAddress().length > 0)
      {
          ValidAddress validAddress = result.getValidAddresses().getValidAddress(0);
          System.out.println(validAddress.getLine1()); // "900 WINSLOW WAY E STE 130",
          System.out.println(validAddress.getLine4()); // "BAINBRIDGE IS WA 98110-2450"
          System.out.println(validAddress.getFipsCode()); // "5303500000"
          System.out.println(validAddress.getCounty()); // "KITSAP"
      }
  }
 

See Also:
Serialized Form

Constructor Summary
ArrayOfValidAddress()
          Initializes a new instance of the class an empty array of ValidAddress objects.
ArrayOfValidAddress(ValidAddress[] validAddress)
          Initializes a new instance of the class and initializes the internal array of ValidAddress objects.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines whether the specified Object is equal to the current Object.
static org.apache.axis.encoding.Deserializer getDeserializer(java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
          Get Axis Custom Deserializer; this method is used internally by the adapter and not intended to be used by external implementation code.
static org.apache.axis.encoding.Serializer getSerializer(java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType)
          Get Axis Custom Serializer; this method is used internally by the adapter and not intended to be used by external implementation code.
static org.apache.axis.description.TypeDesc getTypeDesc()
          Return Axis type metadata object; this method is used internally by the adapter and not intended to be used by external implementation code.
 ValidAddress[] getValidAddress()
          Retrieves the raw array of ValidAddress objects encapsulated in this object.
 ValidAddress getValidAddress(int i)
          Retrieves the ith ValidAddress object (counting from 0) from the array of ValidAddresses encapsulated in this object.
 int hashCode()
          Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
 void setValidAddress(int i, ValidAddress _value)
          Allows one to replace the ith ValidAddress object (counting from 0) within the array of ValidAddresses encapsulated in this object.
 void setValidAddress(ValidAddress[] validAddress)
          Allows one to programatically set the raw array of ValidAddress objects encapsulated by this object.
 int size()
          Gets the size of the array.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayOfValidAddress

public ArrayOfValidAddress()
Initializes a new instance of the class an empty array of ValidAddress objects.


ArrayOfValidAddress

public ArrayOfValidAddress(ValidAddress[] validAddress)
Initializes a new instance of the class and initializes the internal array of ValidAddress objects.

Method Detail

getValidAddress

public ValidAddress[] getValidAddress()
Retrieves the raw array of ValidAddress objects encapsulated in this object.

Returns:
validAddress warning this may be null, depending on how the object was initialized.

setValidAddress

public void setValidAddress(ValidAddress[] validAddress)
Allows one to programatically set the raw array of ValidAddress objects encapsulated by this object.

Parameters:
validAddress -

getValidAddress

public ValidAddress getValidAddress(int i)
Retrieves the ith ValidAddress object (counting from 0) from the array of ValidAddresses encapsulated in this object. Should only be used if its known that getValidAddress() returns a non-null value and that i < number of Valid Addresses actually in that array.

Parameters:
i - integer from 0 to (number of messages -1)
Returns:

setValidAddress

public void setValidAddress(int i,
                            ValidAddress _value)
Allows one to replace the ith ValidAddress object (counting from 0) within the array of ValidAddresses encapsulated in this object. Should only be used if its known that getValidAddress() returns a non-null value and that i < number of ValidAddresses actually in that array.

Parameters:
i - integer from 0 to (number of ValidAddresses -1)
_value - ValidAddress object to place in the indicated position of the ValidAddress array

equals

public boolean equals(java.lang.Object obj)
Determines whether the specified Object is equal to the current Object. Note: In current implementation all Java Strings members of the two objects must be exactly alike, including in case, for equal to return true.

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
true or false, indicating if the two objects are equal.

hashCode

public int hashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code for this GetTaxRequest object
See Also:
Object.hashCode()

getTypeDesc

public static org.apache.axis.description.TypeDesc getTypeDesc()
Return Axis type metadata object; this method is used internally by the adapter and not intended to be used by external implementation code.

Returns:
Type Description

getSerializer

public static org.apache.axis.encoding.Serializer getSerializer(java.lang.String mechType,
                                                                java.lang.Class _javaType,
                                                                javax.xml.namespace.QName _xmlType)
Get Axis Custom Serializer; this method is used internally by the adapter and not intended to be used by external implementation code.

Parameters:
mechType -
_javaType -
_xmlType -
Returns:
Serializer

getDeserializer

public static org.apache.axis.encoding.Deserializer getDeserializer(java.lang.String mechType,
                                                                    java.lang.Class _javaType,
                                                                    javax.xml.namespace.QName _xmlType)
Get Axis Custom Deserializer; this method is used internally by the adapter and not intended to be used by external implementation code.

Parameters:
mechType -
_javaType -
_xmlType -
Returns:
Deserializer

size

public int size()
Gets the size of the array.

Returns:
size