/** * 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 ServiceKeyList(); }
ServiceKeyList serviceKeyList = new ServiceKeyList(); serviceKeyList.add(new ServiceKey(service.getCOMService().getArea().getNumber(), service.getCOMService().getNumber(), service.getCOMService().getArea().getVersion()));
/** * Decodes the value of this object using the provided MALDecoder. * @param decoder 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 { org.ccsds.moims.mo.mal.MALListDecoder listDecoder = decoder.createListDecoder(this); int decodedSize = listDecoder.size(); if (decodedSize > 0) { ensureCapacity(decodedSize); } while (listDecoder.hasNext()) { add((org.ccsds.moims.mo.common.structures.ServiceKey) listDecoder.decodeNullableElement(new org.ccsds.moims.mo.common.structures.ServiceKey())); } return this; }
/** * Encodes the value of this object using the provided MALEncoder. * @param encoder 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 { org.ccsds.moims.mo.mal.MALListEncoder listEncoder = encoder.createListEncoder(this); for (int i = 0; i < size(); i++) { listEncoder.encodeNullableElement((org.ccsds.moims.mo.common.structures.ServiceKey) get(i)); } listEncoder.close(); }
/** * Creates an instance of the source type using the default constructor. It is a generic factory method. * @return A new instance of the source type with default field values. */ public org.ccsds.moims.mo.mal.structures.Element createElement() { return new org.ccsds.moims.mo.common.structures.ServiceKeyList(); }