List of usage examples for java.util SortedMap size
int size();
From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgClient.CFCrmXMsgClientSecGroupTable.java
public CFCrmSecGroupBuff[] readDerivedByClusterIdx(CFCrmAuthorization Authorization, long argClusterId) { final String S_ProcName = "readDerivedByClusterIdx"; String rqst = CFCrmXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFCrmXMsgSecGroupMessageFormatter.formatSecGroupRqstReadByClusterIdx("\n\t\t\t", argClusterId) + "\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 www . j a v a 2s . c o m 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<CFCrmSecGroupPKey, ICFCrmSecGroupObj> sortedMap = (SortedMap<CFCrmSecGroupPKey, ICFCrmSecGroupObj>) sortedMapObj; int sz = sortedMap.size(); CFCrmSecGroupBuff arr[] = new CFCrmSecGroupBuff[sz]; Iterator<ICFCrmSecGroupObj> iter = sortedMap.values().iterator(); ICFCrmSecGroupObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFCrmSecGroupObj) iter.next(); arr[idx] = cur.getSecGroupBuff(); } return (arr); }
From source file:net.sourceforge.msscodefactory.cfcore.v2_0.CFGenKbXMsgClient.CFGenKbXMsgClientToolTable.java
public CFGenKbToolBuff[] readAllDerived(CFGenKbAuthorization Authorization) { final String S_ProcName = "readAllDerived"; String rqst = CFGenKbXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFGenKbXMsgToolMessageFormatter.formatToolRqstReadAll("\n\t\t\t") + "\n" + CFGenKbXMsgSchemaMessageFormatter.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 . java 2s . co m CFGenKbXMsgRspnHandler 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<CFGenKbToolPKey, ICFGenKbToolObj> sortedMap = (SortedMap<CFGenKbToolPKey, ICFGenKbToolObj>) sortedMapObj; int sz = sortedMap.size(); CFGenKbToolBuff arr[] = new CFGenKbToolBuff[sz]; Iterator<ICFGenKbToolObj> iter = sortedMap.values().iterator(); ICFGenKbToolObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFGenKbToolObj) iter.next(); arr[idx] = cur.getToolBuff(); } return (arr); }
From source file:net.sourceforge.msscodefactory.cfcore.v2_0.CFGenKbXMsgClient.CFGenKbXMsgClientToolTable.java
public CFGenKbToolBuff[] readDerivedByReplacesIdx(CFGenKbAuthorization Authorization, Short argReplacesId) { final String S_ProcName = "readDerivedByReplacesIdx"; String rqst = CFGenKbXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFGenKbXMsgToolMessageFormatter.formatToolRqstReadByReplacesIdx("\n\t\t\t", argReplacesId) + "\n" + CFGenKbXMsgSchemaMessageFormatter.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 o m*/ CFGenKbXMsgRspnHandler 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<CFGenKbToolPKey, ICFGenKbToolObj> sortedMap = (SortedMap<CFGenKbToolPKey, ICFGenKbToolObj>) sortedMapObj; int sz = sortedMap.size(); CFGenKbToolBuff arr[] = new CFGenKbToolBuff[sz]; Iterator<ICFGenKbToolObj> iter = sortedMap.values().iterator(); ICFGenKbToolObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFGenKbToolObj) iter.next(); arr[idx] = cur.getToolBuff(); } return (arr); }
From source file:com.opengamma.util.timeseries.fast.integer.object.FastArrayIntObjectTimeSeries.java
@SuppressWarnings("unchecked") public FastArrayIntObjectTimeSeries(final DateTimeNumericEncoding encoding, final SortedMap<Integer, T> initialMap) { super(encoding); final int size = initialMap.size(); _times = new int[size]; _values = (T[]) new Object[size]; final Iterator<Entry<Integer, T>> iterator = initialMap.entrySet().iterator(); int i = 0;/*w w w . j a v a2 s . c o m*/ while (iterator.hasNext()) { final Entry<Integer, T> entry = iterator.next(); _times[i] = entry.getKey().intValue(); _values[i] = entry.getValue(); i++; } }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientClusterTable.java
public CFAccClusterBuff[] readAllDerived(CFAccAuthorization Authorization) { final String S_ProcName = "readAllDerived"; String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAccXMsgClusterMessageFormatter.formatClusterRqstReadAll("\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 ww . j a v a 2s. c o 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<CFAccClusterPKey, ICFAccClusterObj> sortedMap = (SortedMap<CFAccClusterPKey, ICFAccClusterObj>) sortedMapObj; int sz = sortedMap.size(); CFAccClusterBuff arr[] = new CFAccClusterBuff[sz]; Iterator<ICFAccClusterObj> iter = sortedMap.values().iterator(); ICFAccClusterObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFAccClusterObj) iter.next(); arr[idx] = cur.getClusterBuff(); } return (arr); }
From source file:com.opengamma.util.timeseries.fast.integer.FastArrayIntDoubleTimeSeries.java
public FastArrayIntDoubleTimeSeries(final DateTimeNumericEncoding encoding, final SortedMap<Integer, Double> initialMap) { super(encoding); final int size = initialMap.size(); _times = new int[size]; _values = new double[size]; final Iterator<Entry<Integer, Double>> iterator = initialMap.entrySet().iterator(); int i = 0;//w ww. j a va2s .com while (iterator.hasNext()) { final Entry<Integer, Double> entry = iterator.next(); _times[i] = entry.getKey().intValue(); _values[i] = entry.getValue().doubleValue(); i++; } }
From source file:com.opengamma.util.timeseries.fast.longint.object.FastArrayLongObjectTimeSeries.java
@SuppressWarnings("unchecked") public FastArrayLongObjectTimeSeries(final DateTimeNumericEncoding encoding, final SortedMap<Long, T> initialMap) { super(encoding); final int size = initialMap.size(); _times = new long[size]; _values = (T[]) new Object[size]; final Iterator<Entry<Long, T>> iterator = initialMap.entrySet().iterator(); int i = 0;// www. jav a2 s. c o m while (iterator.hasNext()) { final Entry<Long, T> entry = iterator.next(); _times[i] = entry.getKey().longValue(); _values[i] = entry.getValue(); i++; } }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamURLProtocolTable.java
public CFAccURLProtocolBuff[] readDerivedByIsSecureIdx(CFAccAuthorization Authorization, boolean IsSecure) { final String S_ProcName = "CFAccRamURLProtocol.readDerivedByIsSecureIdx() "; CFAccURLProtocolByIsSecureIdxKey key = schema.getFactoryURLProtocol().newIsSecureIdxKey(); key.setRequiredIsSecure(IsSecure);//from w ww. ja va 2 s. c om CFAccURLProtocolBuff[] recArray; if (dictByIsSecureIdx.containsKey(key)) { SortedMap<CFAccURLProtocolPKey, CFAccURLProtocolBuff> subdictIsSecureIdx = dictByIsSecureIdx.get(key); recArray = new CFAccURLProtocolBuff[subdictIsSecureIdx.size()]; Iterator<CFAccURLProtocolBuff> iter = subdictIsSecureIdx.values().iterator(); int idx = 0; while (iter.hasNext()) { recArray[idx++] = iter.next(); } } else { recArray = new CFAccURLProtocolBuff[0]; } return (recArray); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientSecAppTable.java
public CFAccSecAppBuff[] readAllDerived(CFAccAuthorization Authorization) { final String S_ProcName = "readAllDerived"; String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAccXMsgSecAppMessageFormatter.formatSecAppRqstReadAll("\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"); }/* w w w. j a v a2s .c o 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<CFAccSecAppPKey, ICFAccSecAppObj> sortedMap = (SortedMap<CFAccSecAppPKey, ICFAccSecAppObj>) sortedMapObj; int sz = sortedMap.size(); CFAccSecAppBuff arr[] = new CFAccSecAppBuff[sz]; Iterator<ICFAccSecAppObj> iter = sortedMap.values().iterator(); ICFAccSecAppObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFAccSecAppObj) iter.next(); arr[idx] = cur.getSecAppBuff(); } return (arr); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientSecAppTable.java
public CFAccSecAppBuff[] readDerivedByClusterIdx(CFAccAuthorization Authorization, long argClusterId) { final String S_ProcName = "readDerivedByClusterIdx"; String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAccXMsgSecAppMessageFormatter.formatSecAppRqstReadByClusterIdx("\n\t\t\t", argClusterId) + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); String rspn = schema.sendReceive(Authorization, rqst); if ((rspn == null) || (rspn.length() <= 0)) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn"); }/* www. j av a 2 s. c o 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<CFAccSecAppPKey, ICFAccSecAppObj> sortedMap = (SortedMap<CFAccSecAppPKey, ICFAccSecAppObj>) sortedMapObj; int sz = sortedMap.size(); CFAccSecAppBuff arr[] = new CFAccSecAppBuff[sz]; Iterator<ICFAccSecAppObj> iter = sortedMap.values().iterator(); ICFAccSecAppObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFAccSecAppObj) iter.next(); arr[idx] = cur.getSecAppBuff(); } return (arr); }