org.ccsds.moims.mo.common.directory.structures.AddressDetailsList Maven / Gradle / Ivy
package org.ccsds.moims.mo.common.directory.structures;
/**
* List class for AddressDetails.
*/
public final class AddressDetailsList extends java.util.ArrayList implements org.ccsds.moims.mo.mal.structures.HomogeneousList {
/**
* Short form for type.
*/
@Deprecated
private static final Integer TYPE_SHORT_FORM = -4;
/**
* Absolute short form for type. This will be replaced by the TypeId.
*/
@Deprecated
public static final Long SHORT_FORM = 844429258653692L;
private static final long serialVersionUID = 844429258653692L;
/**
* Absolute short form for type.
*/
public static final org.ccsds.moims.mo.mal.TypeId TYPE_ID = new org.ccsds.moims.mo.mal.TypeId(SHORT_FORM);
/**
* Default constructor for AddressDetailsList.
*
*/
public AddressDetailsList() {
}
/**
* Constructor that initialises the capacity of the list.
*
* @param initialCapacity The required initial capacity.
*/
public AddressDetailsList(int initialCapacity) {
super(initialCapacity);
}
/**
* Constructor that uses an ArrayList for initialization.
*
* @param elementList The ArrayList that is used for initialization.
*/
public AddressDetailsList(java.util.ArrayList elementList) {
for(org.ccsds.moims.mo.common.directory.structures.AddressDetails element : elementList) {
this.add(element);
}
}
/**
* Adds an element to the list.
*
* @param element List element.
* @return The success status.
*/
public boolean add(org.ccsds.moims.mo.common.directory.structures.AddressDetails element) {
if (element == null) {
throw new IllegalArgumentException("The added argument cannot be null!");
}
return super.add(element);
}
/**
* Creates an instance of this type using the default constructor. It is a
* generic factory method.
*
* @return A new instance of this type with default field values.
*/
public org.ccsds.moims.mo.mal.structures.Element createElement() {
return new AddressDetailsList();
}
/**
* Creates an instance of the selected generic type for this list.
*
* @return A new instance of this type with default field values.
*/
public org.ccsds.moims.mo.mal.structures.Element createTypedElement() {
return new org.ccsds.moims.mo.common.directory.structures.AddressDetails();
}
/**
* Encodes the value of this object using the provided MALEncoder.
*
* @param encoder The encoder to use for encoding.
* @throws org.ccsds.moims.mo.mal.MALException if any encoding errors are
* detected.
*/
public void encode(org.ccsds.moims.mo.mal.MALEncoder encoder) throws org.ccsds.moims.mo.mal.MALException {
encoder.encodeHomogeneousList(this);
}
/**
* Decodes the value of this object using the provided MALDecoder.
*
* @param decoder The decoder to use for decoding.
* @return Returns this object.
* @throws org.ccsds.moims.mo.mal.MALException if any decoding errors are
* detected.
*/
public org.ccsds.moims.mo.mal.structures.Element decode(org.ccsds.moims.mo.mal.MALDecoder decoder) throws org.ccsds.moims.mo.mal.MALException {
decoder.decodeHomogeneousList(this);
return this;
}
/**
* Returns the absolute short form of this type.
*
* @return The absolute short form of this type.
*/
public Long getShortForm() {
return SHORT_FORM;
}
/**
* Returns the type short form of this type which is unique to the area/service
* it is defined in but not unique across all types.
*
* @return The type short form of this type.
*/
public Integer getTypeShortForm() {
return TYPE_SHORT_FORM;
}
/**
* Returns the area number of this type.
*
* @return The area number of this type.
*/
public org.ccsds.moims.mo.mal.structures.UShort getAreaNumber() {
return org.ccsds.moims.mo.common.CommonHelper.COMMON_AREA_NUMBER;
}
/**
* Returns the area version of this type.
*
* @return The area number of this type.
*/
public org.ccsds.moims.mo.mal.structures.UOctet getAreaVersion() {
return org.ccsds.moims.mo.common.CommonHelper.COMMON_AREA_VERSION;
}
/**
* Returns the service number of this type.
*
* @return The service number of this type.
*/
public org.ccsds.moims.mo.mal.structures.UShort getServiceNumber() {
return org.ccsds.moims.mo.common.directory.DirectoryServiceInfo.DIRECTORY_SERVICE_NUMBER;
}
/**
* Returns the TypeId of this element.
*
* @return The TypeId of this element.
*/
public org.ccsds.moims.mo.mal.TypeId getTypeId() {
return TYPE_ID;
}
}