@Override public void doStep() { final String mtdName = "doStep"; if (logger.isLoggable(Level.FINER)) logger.logp(Level.FINER, clsName, mtdName, "entering"); currentX += stepSize * (2 * rng.nextDouble() - 1); currentY += stepSize * (2 * rng.nextDouble() - 1); currentZ += stepSize * (2 * rng.nextDouble() - 1); currentT += timeStep; currentX = bounce(currentX, bounds.getXMin(), bounds.getXMax()); currentY = bounce(currentY, bounds.getYMin(), bounds.getYMax()); currentZ = bounce(currentZ, bounds.getZMin(), bounds.getZMax()); }
public long next() { if (persist && current >= max) { lock.lock(); try { if (seed == null) { seed = DataBox.get().getGlobalTable(); } String ss = seed.getRecord(name); if (ss == "") { current = 1; } else { current = Convert.toLong(ss); } max = current + 100; String bb = Convert.toString(max); seed.putRecord(name, bb); } finally { lock.unlock(); } } current++; return current - 1; }
public int compare(DataBox a, DataBox b) { TimeStamp ta = a.getTargetTime(); TimeStamp tb = b.getTargetTime(); return ta.timeFormatted().compareTo(tb.timeFormatted()); }
@Override public void run() { for (int i = 1; i <= 3; i++) { String data = dataBox.getData(); } }