List of usage examples for java.lang Long MIN_VALUE
long MIN_VALUE
To view the source code for java.lang Long MIN_VALUE.
Click Source Link
From source file:gda.jython.scriptcontroller.logging.LoggingScriptController.java
public static String createUniqueID(String key) { long n = random.nextLong(); if (n == Long.MIN_VALUE) { n = 0; // corner case } else {/*from www .j a v a 2 s. c o m*/ n = Math.abs(n); } return key + "_" + Long.toString(n); }
From source file:com.basetechnology.s0.agentserver.field.IntField.java
public IntField(SymbolTable symbolTable, String name, String label) { this.symbol = new Symbol(symbolTable, name, IntegerTypeNode.one); this.label = label; minValue = Long.MIN_VALUE; maxValue = Long.MAX_VALUE;//w ww. j av a 2 s . c o m }
From source file:com.wabacus.system.dataimport.thread.TimingDataImportTask.java
public boolean shouldExecute() { if (this.intervalMilSeconds == Long.MIN_VALUE) { intervalMilSeconds = Config.getInstance().getSystemConfigValue("dataimport-autodetect-interval", 30) * 1000L;/*from w w w . j ava 2s . com*/ if (intervalMilSeconds <= 0) intervalMilSeconds = 30 * 1000L; } return System.currentTimeMillis() - lastExecuteMilSeconds >= intervalMilSeconds; }
From source file:net.sf.jasperreports.data.cache.BigIntegerStore.java
private void reset() { this.rawStore.resetValues(); this.min = BigInteger.valueOf(Long.MAX_VALUE); this.max = BigInteger.valueOf(Long.MIN_VALUE); }
From source file:br.com.blackhubos.eventozero.updater.assets.Asset.java
public Asset() { this(null, null, null, null, null, Long.MIN_VALUE, Long.MIN_VALUE, Long.MIN_VALUE, null, null, null); }
From source file:com.opentable.logging.CommonLogFields.java
/** Written by the encoder, value is ignored for serialization. */ @JsonProperty("sequencenumber") default long getSequenceNumber() { return Long.MIN_VALUE; }
From source file:com.wabacus.system.task.DeleteTempFileTask.java
public void parseInterval(String deleteFilesInterval) { intervalMilSeconds = Long.MIN_VALUE; persistencePeriods = Long.MIN_VALUE; int idx = deleteFilesInterval.indexOf("|"); if (!deleteFilesInterval.equals("") && idx > 0) { intervalMilSeconds = Long.parseLong(deleteFilesInterval.substring(0, idx).trim()) * 1000; persistencePeriods = Long.parseLong(deleteFilesInterval.substring(idx + 1).trim()) * 1000; }//from w w w . j av a 2 s . c om if (intervalMilSeconds <= 0) intervalMilSeconds = 300 * 1000L;//5 if (persistencePeriods <= 0) persistencePeriods = 600 * 1000L; }
From source file:com.p5solutions.core.utils.NumberUtils.java
public static boolean isLong(String value) { if (isNatural(value)) { Long v = NumberUtils.valueOf(value.toString(), Long.class); if (v >= Long.MIN_VALUE && v <= Long.MAX_VALUE) { return true; }//from w w w . j av a 2s .c om } return false; }
From source file:gov.nrel.util.Utility.java
/** * Returns a unique id, given a prefix string *//*from w w w . j a va 2 s . co m*/ public static String getUniqueKey() { long randomNum = random.nextLong(); if (randomNum == Long.MIN_VALUE) randomNum++; //make it so it can switch to positive since negative scale as one more value than positive long abs = Math.abs(randomNum); String newKey = generator.generateNewKey(null); String encodedRandom = Long.toString(abs, 36).toUpperCase(); String str = newKey + "." + encodedRandom; return str.toUpperCase(); }
From source file:motej.OutgoingThread.java
public void run() { while (active) { try {/* w w w . ja v a 2s . co m*/ if (rumbleMillis > 0) { rumbleMillis -= THREAD_SLEEP; } if (rumbleMillis == 0) { rumbleMillis = Long.MIN_VALUE; outgoing.send(RumbleRequest.getStopRumbleBytes(ledByte)); Thread.sleep(THREAD_SLEEP); continue; } if (requestQueue.peek() != null) { MoteRequest request = requestQueue.poll(); if (request instanceof PlayerLedRequest) { ledByte = ((PlayerLedRequest) request).getLedByte(); } if (request instanceof RumbleRequest) { ((RumbleRequest) request).setLedByte(ledByte); rumbleMillis = ((RumbleRequest) request).getMillis(); } outgoing.send(request.getBytes()); } Thread.sleep(THREAD_SLEEP); } catch (InterruptedException ex) { ex.printStackTrace(); } catch (IOException ex) { System.out.println("connection closed?"); active = false; } } try { outgoing.close(); } catch (IOException ex) { log.error(ex); } }