@Override public Long convertToModel(String value, Class<? extends Long> targetType, Locale locale) throws com.vaadin.v7.data.util.converter.Converter.ConversionException { return MCast.tolong(value, 0); }
@Override public boolean doReconfigure(String config) { long l = MCast.tolong(config, -1); if (l > 0 ) { interval = l; return true; } return false; }
@Override public boolean doReconfigure(String config) { long l = MCast.tolong(config, -1); if (l > 0 ) { interval = l; return true; } return false; }
@Override protected Long loadValue(String value) { return MCast.tolong(value, 0); }
public static long c(Object in, long def) { return MCast.tolong(in, def); }
public long getFacet(String name, long def) { if (facets == null) return def; return MCast.tolong(facets.get(name), def); }
@Override public long getLong(String name, long def) { Object out; try { out = getProperty(name); } catch (Throwable e) { return def; } return MCast.tolong(out, def); }
public Version(String in) { if (in == null) in = Versioned.DEFAULT_VERSION; this.original = in; // parse in // crop for (int i = 0; i < in.length(); i++) { char c = in.charAt(i); if (!(c == '.' || (c >= '0' && c <= '9'))) { in = in.substring(0, i); break; } } String[] parts = in.split("\\."); versions = new long[parts.length]; for (int i = 0; i < parts.length; i++) versions[i] = MCast.tolong(parts[i], 0); }
@Override public long getLong(String columnLabel) throws Exception { return MCast.tolong(getString(columnLabel),0); }
public static long toTime(String in, long def) { if (in == null) return def; in = in.trim().toLowerCase(); if (in.endsWith("M") || in.endsWith("min") || in.endsWith("minutes") || in.endsWith("minute")) return MCast.tolong( MString.integerPart(in) , 0) * MINUTE_IN_MILLISECOUNDS; if (in.endsWith("h") || in.endsWith("hour") || in.endsWith("hours")) return MCast.tolong( MString.integerPart(in) , 0) * HOUR_IN_MILLISECOUNDS; if (in.endsWith("s") || in.endsWith("sec") || in.endsWith("secound") || in.endsWith("secounds")) return MCast.tolong( MString.integerPart(in) , 0) * SECOUND_IN_MILLISECOUNDS; if (in.endsWith("d") || in.endsWith("day") || in.endsWith("days")) return MCast.tolong( MString.integerPart(in) , 0) * DAY_IN_MILLISECOUNDS; if (in.endsWith("w") || in.endsWith("week") || in.endsWith("weeks") ) return MCast.tolong( MString.integerPart(in) , 0) * DAY_IN_MILLISECOUNDS * 7; if (in.endsWith("m") || in.endsWith("mon") || in.endsWith("month") || in.endsWith("months")) return MCast.tolong( MString.integerPart(in) , 0) * MONTH_AVERAGE_MILLISECONDS; if (in.endsWith("y") || in.endsWith("year") || in.endsWith("years")) return MCast.tolong( MString.integerPart(in) , 0) * YEAR_AVERAGE_MILLISECONDS; return MCast.tolong(in, def); }
long stop = 0; if (p2 > 0) { start = tolong(left.substring(0, p2), 0); stop = tolong(left.substring(p2+1),0); } else { stop = tolong(left,0); long interval = Math.max(1, Math.abs(tolong(right,0)) ); long len = (stop - start) / interval; long[] out = new long[(int) len]; boolean needOrder = false; for (int i = 0; i < out.length; i++) { out[i] = tolong(parts[i],0); if (i != 0 && out[i-1] >= out[1]) needOrder = true;
int p = msg.indexOf('|'); if (p >= 0) { ts = MCast.tolong(msg.substring(0, p), 0); msg = msg.substring(p+1);
return MCast.tolong(value, 0);
return MCast.tolong(value, 0);
local = parts[6].equals("L"); if (parts.length > 7) setTimeout( MCast.tolong(parts[7], 0)); if (parts.length > 8) id = parts[8];
/** * <p>doConfigure.</p> * * @param config a {@link java.lang.String} object. */ public void doConfigure(String config) { if (config == null) return; String[] parts = config.toUpperCase().split(","); if (parts.length > 1) trace = toLevel(parts[1]); if (parts.length > 2) debug = toLevel(parts[2]); if (parts.length > 3) info = toLevel(parts[3]); if (parts.length > 4) warn = toLevel(parts[4]); if (parts.length > 5) error = toLevel(parts[5]); if (parts.length > 6) fatal = toLevel(parts[6]); if (parts.length > 7) local = parts[7].equals("L"); if (parts.length > 8) setTimeout( MCast.tolong(parts[8], 0)); if (parts.length > 9) id = parts[9]; }
long dbVersionLong = MCast.tolong(dbVersion, 0); schema.doMigrate(this, dbVersionLong);