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.CFAstRamSecFormTable.java

public CFAstSecFormBuff[] readDerivedBySecAppIdx(CFAstAuthorization Authorization, long ClusterId,
        int SecAppId) {
    final String S_ProcName = "CFAstRamSecForm.readDerivedBySecAppIdx() ";
    CFAstSecFormBySecAppIdxKey key = schema.getFactorySecForm().newSecAppIdxKey();
    key.setRequiredClusterId(ClusterId);
    key.setRequiredSecAppId(SecAppId);/*from w w  w  .j a v a 2s.  c  o  m*/

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

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

public CFAstSipConfBuff[] readAllDerived(CFAstAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgSipConfMessageFormatter.formatSipConfRqstReadAll("\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 .ja v  a 2 s .c  o  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<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj> sortedMap = (SortedMap<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstSipConfBuff arr[] = new CFAstSipConfBuff[sz];
    Iterator<ICFAstConfigurationFileObj> iter = sortedMap.values().iterator();
    ICFAstSipConfObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstSipConfObj) iter.next();
        arr[idx] = cur.getSipConfBuff();
    }
    return (arr);
}

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

public CFAstSipConfBuff[] readDerivedByClusterIdx(CFAstAuthorization Authorization, long argClusterId) {
    final String S_ProcName = "readDerivedByClusterIdx";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgSipConfMessageFormatter.formatSipConfRqstReadByClusterIdx("\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");
    }/*from ww  w.j  av  a  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<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj> sortedMap = (SortedMap<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstSipConfBuff arr[] = new CFAstSipConfBuff[sz];
    Iterator<ICFAstConfigurationFileObj> iter = sortedMap.values().iterator();
    ICFAstSipConfObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstSipConfObj) iter.next();
        arr[idx] = cur.getSipConfBuff();
    }
    return (arr);
}

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

public CFAstSipConfBuff[] readDerivedBySipClusterIdx(CFAstAuthorization Authorization, long argClusterId) {
    final String S_ProcName = "readDerivedBySipClusterIdx";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgSipConfMessageFormatter.formatSipConfRqstReadBySipClusterIdx("\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");
    }/*from   www. j  a  v  a  2  s  . c  o  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<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj> sortedMap = (SortedMap<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstSipConfBuff arr[] = new CFAstSipConfBuff[sz];
    Iterator<ICFAstConfigurationFileObj> iter = sortedMap.values().iterator();
    ICFAstSipConfObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstSipConfObj) iter.next();
        arr[idx] = cur.getSipConfBuff();
    }
    return (arr);
}

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

public CFAstSipConfBuff[] readDerivedByHostIdx(CFAstAuthorization Authorization, long argClusterId,
        long argHostNodeId) {
    final String S_ProcName = "readDerivedByHostIdx";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFAstXMsgSipConfMessageFormatter.formatSipConfRqstReadByHostIdx("\n\t\t\t",
                    argClusterId, argHostNodeId)
            + "\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 .j  a  v  a 2  s  .  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<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj> sortedMap = (SortedMap<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstSipConfBuff arr[] = new CFAstSipConfBuff[sz];
    Iterator<ICFAstConfigurationFileObj> iter = sortedMap.values().iterator();
    ICFAstSipConfObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstSipConfObj) iter.next();
        arr[idx] = cur.getSipConfBuff();
    }
    return (arr);
}

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

public CFAccTenantBuff[] readDerivedByClusterIdx(CFAccAuthorization Authorization, long ClusterId) {
    final String S_ProcName = "CFAccRamTenant.readDerivedByClusterIdx() ";
    CFAccTenantByClusterIdxKey key = schema.getFactoryTenant().newClusterIdxKey();
    key.setRequiredClusterId(ClusterId);

    CFAccTenantBuff[] recArray;//from   ww w . j  a v  a2  s . c o  m
    if (dictByClusterIdx.containsKey(key)) {
        SortedMap<CFAccTenantPKey, CFAccTenantBuff> subdictClusterIdx = dictByClusterIdx.get(key);
        recArray = new CFAccTenantBuff[subdictClusterIdx.size()];
        Iterator<CFAccTenantBuff> iter = subdictClusterIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAccTenantBuff[0];
    }
    return (recArray);
}

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

public CFAstVoicemailConfBuff[] readAllDerived(CFAstAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgVoicemailConfMessageFormatter.formatVoicemailConfRqstReadAll("\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  ww .j ava  2 s  .c  o  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<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj> sortedMap = (SortedMap<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstVoicemailConfBuff arr[] = new CFAstVoicemailConfBuff[sz];
    Iterator<ICFAstConfigurationFileObj> iter = sortedMap.values().iterator();
    ICFAstVoicemailConfObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstVoicemailConfObj) iter.next();
        arr[idx] = cur.getVoicemailConfBuff();
    }
    return (arr);
}

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

public CFAstAsteriskConfBuff[] readAllDerived(CFAstAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgAsteriskConfMessageFormatter.formatAsteriskConfRqstReadAll("\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 . j  a v a2  s.c  o  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<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj> sortedMap = (SortedMap<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstAsteriskConfBuff arr[] = new CFAstAsteriskConfBuff[sz];
    Iterator<ICFAstConfigurationFileObj> iter = sortedMap.values().iterator();
    ICFAstAsteriskConfObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstAsteriskConfObj) iter.next();
        arr[idx] = cur.getAsteriskConfBuff();
    }
    return (arr);
}

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

public CFAstExtConfigConfBuff[] readAllDerived(CFAstAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgExtConfigConfMessageFormatter.formatExtConfigConfRqstReadAll("\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 2s.c  o  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<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj> sortedMap = (SortedMap<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstExtConfigConfBuff arr[] = new CFAstExtConfigConfBuff[sz];
    Iterator<ICFAstConfigurationFileObj> iter = sortedMap.values().iterator();
    ICFAstExtConfigConfObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstExtConfigConfObj) iter.next();
        arr[idx] = cur.getExtConfigConfBuff();
    }
    return (arr);
}

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

public CFAstVoicemailConfBuff[] readDerivedByClusterIdx(CFAstAuthorization Authorization, long argClusterId) {
    final String S_ProcName = "readDerivedByClusterIdx";
    String rqst = CFAstXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAstXMsgVoicemailConfMessageFormatter.formatVoicemailConfRqstReadByClusterIdx("\n\t\t\t",
                    argClusterId)//w ww. j a v  a  2s.  co  m
            + "\n" + CFAstXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }
    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<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj> sortedMap = (SortedMap<CFAstConfigurationFilePKey, ICFAstConfigurationFileObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAstVoicemailConfBuff arr[] = new CFAstVoicemailConfBuff[sz];
    Iterator<ICFAstConfigurationFileObj> iter = sortedMap.values().iterator();
    ICFAstVoicemailConfObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAstVoicemailConfObj) iter.next();
        arr[idx] = cur.getVoicemailConfBuff();
    }
    return (arr);
}