/** Return the highest token that is less than the given token */ BigInteger getTokenBefore(BigInteger token) { BigInteger k = tokenToEndPointMap_.lowerKey(token); if (k != null) return k; // Wrap around return tokenToEndPointMap_.lastKey(); }
public static NetconfOperationExecution createExecutionChain( TreeMap<HandlingPriority, NetconfOperation> sortedByPriority, HandlingPriority handlingPriority) { NetconfOperation netconfOperation = sortedByPriority.get(handlingPriority); HandlingPriority subsequentHandlingPriority = sortedByPriority.lowerKey(handlingPriority); NetconfOperationChainedExecution subsequentExecution = null; if (subsequentHandlingPriority != null) { subsequentExecution = createExecutionChain(sortedByPriority, subsequentHandlingPriority); } else { subsequentExecution = EXECUTION_TERMINATION_POINT; } return new NetconfOperationExecution(netconfOperation, subsequentExecution); }
public K lowerKey(K key) { return realMap.lowerKey(key); }