Example usage for java.util SortedMap size

List of usage examples for java.util SortedMap size

Introduction

In this page you can find the example usage for java.util SortedMap size.

Prototype

int size();

Source Link

Document

Returns the number of key-value mappings in this map.

Usage

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamURLProtocolTable.java

public CFAstURLProtocolBuff[] readDerivedByIsSecureIdx(CFAstAuthorization Authorization, boolean IsSecure) {
    final String S_ProcName = "CFAstRamURLProtocol.readDerivedByIsSecureIdx() ";
    CFAstURLProtocolByIsSecureIdxKey key = schema.getFactoryURLProtocol().newIsSecureIdxKey();
    key.setRequiredIsSecure(IsSecure);/*from www  .j av  a  2  s . c  o m*/

    CFAstURLProtocolBuff[] recArray;
    if (dictByIsSecureIdx.containsKey(key)) {
        SortedMap<CFAstURLProtocolPKey, CFAstURLProtocolBuff> subdictIsSecureIdx = dictByIsSecureIdx.get(key);
        recArray = new CFAstURLProtocolBuff[subdictIsSecureIdx.size()];
        Iterator<CFAstURLProtocolBuff> iter = subdictIsSecureIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAstURLProtocolBuff[0];
    }
    return (recArray);
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstXMsgClient.CFAstXMsgClientSecAppTable.java

public CFAstSecAppBuff[] readAllDerived(CFAstAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgSecAppMessageFormatter.formatSecAppRqstReadAll("\n\t\t\t") + "\n"
            + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/*from  w  w  w .jav  a2s . co m*/
    CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAstSecAppPKey, ICFAstSecAppObj> sortedMap = (SortedMap<CFAstSecAppPKey, ICFAstSecAppObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstSecAppBuff arr[] = new CFAstSecAppBuff[sz];
    Iterator<ICFAstSecAppObj> iter = sortedMap.values().iterator();
    ICFAstSecAppObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstSecAppObj) iter.next();
        arr[idx] = cur.getSecAppBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstXMsgClient.CFAstXMsgClientSecAppTable.java

public CFAstSecAppBuff[] readDerivedByClusterIdx(CFAstAuthorization Authorization, long argClusterId) {
    final String S_ProcName = "readDerivedByClusterIdx";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgSecAppMessageFormatter.formatSecAppRqstReadByClusterIdx("\n\t\t\t", argClusterId) + "\n"
            + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/* w  w w  .  j av  a  2s  . c om*/
    CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAstSecAppPKey, ICFAstSecAppObj> sortedMap = (SortedMap<CFAstSecAppPKey, ICFAstSecAppObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstSecAppBuff arr[] = new CFAstSecAppBuff[sz];
    Iterator<ICFAstSecAppObj> iter = sortedMap.values().iterator();
    ICFAstSecAppObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstSecAppObj) iter.next();
        arr[idx] = cur.getSecAppBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamTldTable.java

public CFAccTldBuff[] readDerivedByTenantIdx(CFAccAuthorization Authorization, long TenantId) {
    final String S_ProcName = "CFAccRamTld.readDerivedByTenantIdx() ";
    CFAccTldByTenantIdxKey key = schema.getFactoryTld().newTenantIdxKey();
    key.setRequiredTenantId(TenantId);//from   ww  w . j ava  2s.  c om

    CFAccTldBuff[] recArray;
    if (dictByTenantIdx.containsKey(key)) {
        SortedMap<CFAccTldPKey, CFAccTldBuff> subdictTenantIdx = dictByTenantIdx.get(key);
        recArray = new CFAccTldBuff[subdictTenantIdx.size()];
        Iterator<CFAccTldBuff> iter = subdictTenantIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAccTldBuff[0];
    }
    return (recArray);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientISOCountryTable.java

public CFAccISOCountryBuff[] readAllDerived(CFAccAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgISOCountryMessageFormatter.formatISOCountryRqstReadAll("\n\t\t\t") + "\n"
            + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/*from w  w  w  . j a v a 2s.  co m*/
    CFAccXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAccISOCountryPKey, ICFAccISOCountryObj> sortedMap = (SortedMap<CFAccISOCountryPKey, ICFAccISOCountryObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAccISOCountryBuff arr[] = new CFAccISOCountryBuff[sz];
    Iterator<ICFAccISOCountryObj> iter = sortedMap.values().iterator();
    ICFAccISOCountryObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAccISOCountryObj) iter.next();
        arr[idx] = cur.getISOCountryBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamTldTable.java

public CFAstTldBuff[] readDerivedByTenantIdx(CFAstAuthorization Authorization, long TenantId) {
    final String S_ProcName = "CFAstRamTld.readDerivedByTenantIdx() ";
    CFAstTldByTenantIdxKey key = schema.getFactoryTld().newTenantIdxKey();
    key.setRequiredTenantId(TenantId);/*  w  w w.jav a  2  s . co m*/

    CFAstTldBuff[] recArray;
    if (dictByTenantIdx.containsKey(key)) {
        SortedMap<CFAstTldPKey, CFAstTldBuff> subdictTenantIdx = dictByTenantIdx.get(key);
        recArray = new CFAstTldBuff[subdictTenantIdx.size()];
        Iterator<CFAstTldBuff> iter = subdictTenantIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAstTldBuff[0];
    }
    return (recArray);
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstXMsgClient.CFAstXMsgClientISOCountryTable.java

public CFAstISOCountryBuff[] readAllDerived(CFAstAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgISOCountryMessageFormatter.formatISOCountryRqstReadAll("\n\t\t\t") + "\n"
            + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/*from www .j  av  a 2  s.c  om*/
    CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAstISOCountryPKey, ICFAstISOCountryObj> sortedMap = (SortedMap<CFAstISOCountryPKey, ICFAstISOCountryObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstISOCountryBuff arr[] = new CFAstISOCountryBuff[sz];
    Iterator<ICFAstISOCountryObj> iter = sortedMap.values().iterator();
    ICFAstISOCountryObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstISOCountryObj) iter.next();
        arr[idx] = cur.getISOCountryBuff();
    }
    return (arr);
}

From source file:com.opengamma.util.timeseries.fast.longint.FastArrayLongDoubleTimeSeries.java

public FastArrayLongDoubleTimeSeries(final DateTimeNumericEncoding encoding,
        final SortedMap<Long, Double> initialMap) {
    super(encoding);
    final int size = initialMap.size();
    _times = new long[size];
    _values = new double[size];
    final Iterator<Entry<Long, Double>> iterator = initialMap.entrySet().iterator();
    int i = 0;/*  w ww. j  a v  a 2  s.  c  o m*/
    while (iterator.hasNext()) {
        final Entry<Long, Double> entry = iterator.next();
        _times[i] = entry.getKey().longValue();
        _values[i] = entry.getValue().doubleValue();
        i++;
    }
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstXMsgClient.CFAstXMsgClientClusterTable.java

public CFAstClusterBuff[] readAllDerived(CFAstAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgClusterMessageFormatter.formatClusterRqstReadAll("\n\t\t\t") + "\n"
            + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/* w  w  w  .  j  a va 2s. com*/
    CFAstXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAstClusterPKey, ICFAstClusterObj> sortedMap = (SortedMap<CFAstClusterPKey, ICFAstClusterObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstClusterBuff arr[] = new CFAstClusterBuff[sz];
    Iterator<ICFAstClusterObj> iter = sortedMap.values().iterator();
    ICFAstClusterObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstClusterObj) iter.next();
        arr[idx] = cur.getClusterBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgClient.CFCrmXMsgClientSubProjectTable.java

public CFCrmSubProjectBuff[] readAllDerived(CFCrmAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFCrmXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFCrmXMsgSubProjectMessageFormatter.formatSubProjectRqstReadAll("\n\t\t\t") + "\n"
            + CFCrmXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/*from   w  w  w. j ava  2  s  .  c  om*/
    CFCrmXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFCrmDomainBasePKey, ICFCrmDomainBaseObj> sortedMap = (SortedMap<CFCrmDomainBasePKey, ICFCrmDomainBaseObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFCrmSubProjectBuff arr[] = new CFCrmSubProjectBuff[sz];
    Iterator<ICFCrmDomainBaseObj> iter = sortedMap.values().iterator();
    ICFCrmSubProjectObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFCrmSubProjectObj) iter.next();
        arr[idx] = cur.getSubProjectBuff();
    }
    return (arr);
}