/** * Match the passed dpc, opc and si with Tree structure and return the As from corresponding * matched {@link SINode}. * * <p>For example if AS1 is added for Routing Key with DPC=123 only. The tree will be formed with * 123 as {@link DPCNode} parent node and -1 as {@link OPCNode} leaf and within {@link OPCNode} -1 * as {@link SINode} * * @param dpc * @param opc * @param si * @return */ public AsImpl getAs(int dpc, int opc, short si) { for (FastList.Node<DPCNode> n = dpcList.head(), end = dpcList.tail(); (n = n.getNext()) != end; ) { DPCNode dpcNode = n.getValue(); if (dpcNode.dpc == dpc) { return dpcNode.getAs(opc, si); } } return null; }
private void addSi(DPCNode dpcNode, int[] opcIntArr, short[] siShortArr, AsImpl asImpl) throws Exception { for (int i = 0; i < opcIntArr.length; i++) { for (int j = 0; j < siShortArr.length; j++) { dpcNode.addSi(opcIntArr[i], siShortArr[j], asImpl); } } }