All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.thomsonreuters.ema.access.ElementList Maven / Gradle / Ivy

There is a newer version: 3.5.1.0
Show newest version
///*|-----------------------------------------------------------------------------
// *|            This source code is provided under the Apache 2.0 license      --
// *|  and is provided AS IS with no warranty or guarantee of fit for purpose.  --
// *|                See the project's LICENSE.md for details.                  --
// *|           Copyright (C) 2019 Refinitiv. All rights reserved.            --
///*|-----------------------------------------------------------------------------

package com.thomsonreuters.ema.access;

import java.util.Collection;


/**
 * ElementList is a heterogeneous container of complex and primitive data type entries.
* ElementList entries are identified by name.

* * The following code snippet shows addition of containers to ElementList. *
 * ElementList elementList = EmaFactory.createElementList();
 * elementList.add(EmaFactory.createElementEntry().ascii(EmaRdm.ENAME_APP_ID, "127"));
 * elementList.add(EmaFactory.createElementEntry().intValue("value", 23));
 * 
* * The following code snippet shows extracting data from ElementList. *
 * for(MapEntry mEntry : map)
 * {
 *    if(mEntry.loadType() == DataTypes.ELEMENT_LIST)
 *    {
 *       ElementList elementList = mEntry.elementList();
 *       for(ElementEntry elementEntry : elementList)
 *       {
 *          switch(elementEntry.loadType())
 *          {
 *             case DataTypes.INT :
 *                long value = elementEntry.intValue();
 *                break;
 *             case DataTypes.REAL :
 *                double d = elementEntry.real().asDouble();
 *                break;
 *
 *             ...
 *          }
 *       }
 *    }
 * }
 * 
* * Objects of this class are intended to be short lived or rather transitional.
* This class is designed to efficiently perform setting and extracting of ElementList and its content.
* Objects of this class are not cache-able. * * @see Data * @see ElementEntry * @see ReqMsg * @see RefreshMsg * @see UpdateMsg * @see StatusMsg * @see GenericMsg * @see PostMsg * @see AckMsg * @see FieldList * @see Map * @see Vector * @see Series * @see FilterList * @see OmmOpaque * @see OmmXml * @see OmmAnsiPage * @see OmmError */ public interface ElementList extends ComplexType, Collection { /** * Indicates presence of Info. * * @return true if ElementList Info is set; false otherwise */ public boolean hasInfo(); /** * Returns InfoElementListNum. * * @throws OmmInvalidUsageException * if {@link #hasInfo()} returns false * * @return ElementList Number */ public int infoElementListNum(); /** * Clears the ElementList.
* Note: allows re-use of ElementList instance during encoding. */ public void clear(); /** * Specifies Info.
* The ElementList Info is optional. If used, it must be specified before adding anything to ElementList. * * @param elementListNum * FieldList template number * @return reference to this object */ public ElementList info(int elementListNum); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy