/** Return string representation of this VMID. */ public String toString() { StringBuffer result = new StringBuffer(); if (addr != null) for (int i = 0; i < addr.length; ++i) { int x = (int) (addr[i] & 0xFF); result.append((x < 0x10 ? "0" : "") + Integer.toString(x, 16)); } result.append(':'); result.append(uid.toString()); return result.toString(); }
public synchronized String getNewUUID() { UID uid = new UID(); String s = ""; if (_address != null) { byte[] b = _address.getAddress(); for (int i = 0; i < b.length; i++) s += (new Byte(b[i])).longValue() + "-"; } s += uid.toString(); cat.debug("new UUID: " + s); return s; }
@Override public JsonObject changeFilterState(JsonObject newFilterState) { if (newFilterState != null) { // new value of amount JsonObject amountJson = newFilterState.getJsonObject("amount"); setAmount((float) amountJson.getJsonNumber("value").doubleValue()); JsonObject sizeJson = newFilterState.getJsonObject("radius"); setRadius(sizeJson.getJsonNumber("value").intValue()); JsonObject thresholdJson = newFilterState.getJsonObject("threshold"); setThreshold(thresholdJson.getJsonNumber("value").intValue()); Main.debug(id.toString() + " \n" + toString()); return newFilterState; } return null; }