List of usage examples for org.apache.commons.collections4.bidimap TreeBidiMap nextKey
public K nextKey(final K key)
From source file:org.apache.poi.hpsf.Section.java
/** * Retrieves the length of the given property (by key) * * @param offset2Id the offset to id map * @param entryOffset the current entry key * @param maxSize the maximum offset/size of the section stream * @return the length of the current property *///from w w w . j a va 2 s .com private static int propLen(TreeBidiMap<Long, Long> offset2Id, Long entryOffset, long maxSize) { Long nextKey = offset2Id.nextKey(entryOffset); long begin = entryOffset; long end = (nextKey != null) ? nextKey : maxSize; return (int) (end - begin); }