public long get( int index ) { synchronized( mutex ) { return list.get( index ); } } public long set( int index, long element) {
@Override public Long get( int index ) { long value = list.get( index ); if ( value == list.getNoEntryValue() ) return null; else return Long.valueOf( value ); }
public long get( int index ) { return list.get( index ); } public int indexOf( long o ) { return list.indexOf( o ); }
@Override public Long get( int index ) { long value = list.get( index ); if ( value == list.getNoEntryValue() ) return null; else return Long.valueOf( value ); }
long middleY = 0; for (int i = 0; i < c.size(); i++) { middleY = middleY + (long)(c.get(i) & mask); int firstX = Integer.MIN_VALUE; int prevX = (int) (c.get(0) >> 32); int prevY = (int) (c.get(0) & mask); int x = (int) (c.get(i) >> 32); int y = (int) (c.get(i) & mask); int rX = ray_intersect_x(prevX, prevY, x, y, (int) middleY); if (rX != Integer.MIN_VALUE) {
@Override public Long get( int index ) { long value = list.get( index ); if ( value == list.getNoEntryValue() ) return null; else return Long.valueOf( value ); }
@Override public List<CandidateCellForSweeping> next() { Preconditions.checkState(hasNext()); List<CellTsPairInfo> cellTsBatch = cellTsIterator.next(); List<CandidateCellForSweeping> candidates = new ArrayList<>(); for (CellTsPairInfo cellTs : cellTsBatch) { checkCurrentCellAndUpdateIfNecessary(cellTs).ifPresent(candidates::add); if (currentCellTimestamps.size() > 0) { // We expect the timestamps in ascending order. This check costs us a few CPU cycles // but it's worth it for paranoia reasons - mistaking a cell with data for an empty one // can cause data corruption. Preconditions.checkArgument(cellTs.ts > currentCellTimestamps.get(currentCellTimestamps.size() - 1), "Timestamps for each cell must be fed in strictly increasing order"); } updateStateAfterSingleCellTsPairProcessed(cellTs); } if (!cellTsIterator.hasNext()) { getCurrentCandidate().ifPresent(candidates::add); } return candidates; }
@Override public Long get( int index ) { long value = list.get( index ); if ( value == list.getNoEntryValue() ) return null; else return Long.valueOf( value ); }
public long get( int index ) { synchronized( mutex ) { return list.get( index ); } } public long set( int index, long element) {
@Override public Long get( int index ) { long value = list.get( index ); if ( value == list.getNoEntryValue() ) return null; else return Long.valueOf( value ); }
@Override public long get( int index ) { synchronized( mutex ) { return list.get( index ); } } @Override
public long getOSMID() { return osmids.get(pairIndex); } }
public long getOSMID() { return osmids.get(pairIndex); } }
public long get( int index ) { return list.get( index ); } public int indexOf( long o ) { return list.indexOf( o ); }
@Override public long get( int index ) { return list.get( index ); } @Override
public long get( int index ) { synchronized( mutex ) { return list.get( index ); } } public long set( int index, long element) {
public long get(int idx) { return timestamps.get(timestamps.size() - 1 - idx); }
@Override public void endDocument() { // After the entire diff has been applied, re-index all the ways that were added or modified. if (!waysModified.isEmpty()) { LOG.debug("Indexing modified ways..."); for (int w = 0; w < waysModified.size(); w++) { // TODO unless we are doing snapshots and transactions, we should unindex after indexing the new one? osm.unIndexWay(id); osm.indexWay(waysModified.get(w), null); } } }