@Override public final Object toValue () { return value != null ? value : (value = doToValue ()) ; }
public short shortValue () { return ( short ) intValue (); }
@Override public String stringValueEncoded () { return toString (); }
return toValue().equals(i); } else if (o instanceof Float) { Float i = (Float) o; return floatValue() == i; } else if (o instanceof Double) { Double i = (Double) o; return toValue().equals(i); } else if (o instanceof Short) { Short i = (Short) o; return shortValue() == i; } else if (o instanceof Byte) { Byte i = (Byte) o; return byteValue() == i; } else if (o instanceof Date) { Date i = (Date) o; return dateValue().equals(i); } else if (o instanceof Long) { Long i = (Long) o; return longValue()==i;
private final Object doToValue () { switch ( type ) { case DOUBLE: case DOUBLE_WRAPPER: return doubleValue (); case INT: case INTEGER_WRAPPER: if ( CharScanner.isInteger(buffer, startIndex, endIndex - startIndex) ) { return intValue (); } else { return longValue (); } } Exceptions.die(); return null; }
private final Value decodeNumberOverlay(final boolean minus) { char[] array = charArray; final int startIndex = __index; int index = __index; char currentChar; boolean doubleFloat = false; if (minus && index + 1 < array.length) { index++; } while (true) { currentChar = array[index]; if (CharScanner.isNumberDigit(currentChar)) { //noop } else if ( currentChar <= 32 ) { //white break; } else if ( CharScanner.isDelimiter ( currentChar ) ) { break; } else if ( CharScanner.isDecimalChar(currentChar) ) { doubleFloat = true; } index++; if (index >= array.length) break; } __index = index; __currentChar = currentChar; TypeType type = doubleFloat ? TypeType.DOUBLE : TypeType.INT; NumberValue value = new NumberValue ( chop, type, startIndex, __index, this.charArray ); return value; }
@Override public Date dateValue () { return new Date ( Dates.utc ( longValue () ) ); }
return toValue().equals(i); } else if (o instanceof Float) { Float i = (Float) o; return floatValue() == i; } else if (o instanceof Double) { Double i = (Double) o; return toValue().equals(i); } else if (o instanceof Short) { Short i = (Short) o; return shortValue() == i; } else if (o instanceof Byte) { Byte i = (Byte) o; return byteValue() == i; } else if (o instanceof Date) { Date i = (Date) o; return dateValue().equals(i); } else if (o instanceof Long) { Long i = (Long) o; return longValue()==i;
private final Object doToValue () { switch ( type ) { case DOUBLE: case DOUBLE_WRAPPER: return doubleValue (); case INT: case INTEGER_WRAPPER: if ( CharScanner.isInteger(buffer, startIndex, endIndex - startIndex) ) { return intValue (); } else { return longValue (); } } Exceptions.die(); return null; }
private final Value decodeNumberOverlay(final boolean minus) { char[] array = charArray; final int startIndex = __index; int index = __index; char currentChar; boolean doubleFloat = false; if (minus && index + 1 < array.length) { index++; } while (true) { currentChar = array[index]; if (CharScanner.isNumberDigit(currentChar)) { //noop } else if ( currentChar <= 32 ) { //white break; } else if ( CharScanner.isDelimiter ( currentChar ) ) { break; } else if ( CharScanner.isDecimalChar(currentChar) ) { doubleFloat = true; } index++; if (index >= array.length) break; } __index = index; __currentChar = currentChar; TypeType type = doubleFloat ? TypeType.DOUBLE : TypeType.INT; NumberValue value = new NumberValue ( chop, type, startIndex, __index, this.charArray ); return value; }
@Override public Date dateValue () { return new Date ( Dates.utc ( longValue () ) ); }
private final Value decodeNumberOverlay(final boolean minus) { char[] array = charArray; final int startIndex = __index; int index = __index; char currentChar; boolean doubleFloat = false; if (minus && index + 1 < array.length) { index++; } while (true) { currentChar = array[index]; if (CharScanner.isNumberDigit(currentChar)) { //noop } else if ( currentChar <= 32 ) { //white break; } else if ( CharScanner.isDelimiter ( currentChar ) ) { break; } else if ( CharScanner.isDecimalChar(currentChar) ) { doubleFloat = true; } index++; if (index >= array.length) break; } __index = index; __currentChar = currentChar; TypeType type = doubleFloat ? TypeType.DOUBLE : TypeType.INT; NumberValue value = new NumberValue ( chop, type, startIndex, __index, this.charArray ); return value; }
@Override public String stringValue(CharBuf charBuf) { return toString(); }
public byte byteValue () { return ( byte ) intValue (); }
@Override public final Object toValue () { return value != null ? value : (value = doToValue ()) ; }
protected final Value decodeNumberLax(boolean minus) { char[] array = charArray; final int startIndex = __index; int index = __index; char currentChar; boolean doubleFloat = false; if (minus && index + 1 < array.length) { index++; } while (true) { currentChar = array[index]; if ( CharScanner.isNumberDigit(currentChar)) { //noop } else if ( currentChar <= 32 ) { //white break; } else if ( CharScanner.isDelimiter(currentChar) ) { break; } else if ( CharScanner.isDecimalChar(currentChar) ) { doubleFloat = true; } index++; if (index >= array.length) break; } __index = index; __currentChar = currentChar; TypeType type = doubleFloat ? TypeType.DOUBLE : TypeType.INT; NumberValue value = new NumberValue ( chop, type, startIndex, __index, this.charArray ); if (events!=null) if (!events.number( startIndex, __index, value ))stop(); return value; }
@Override public String stringValueEncoded () { return toString (); }
public short shortValue () { return ( short ) intValue (); }
protected final Value decodeNumberLax(boolean minus) { char[] array = charArray; final int startIndex = __index; int index = __index; char currentChar; boolean doubleFloat = false; if (minus && index + 1 < array.length) { index++; } while (true) { currentChar = array[index]; if ( CharScanner.isNumberDigit(currentChar)) { //noop } else if ( currentChar <= 32 ) { //white break; } else if ( CharScanner.isDelimiter(currentChar) ) { break; } else if ( CharScanner.isDecimalChar(currentChar) ) { doubleFloat = true; } index++; if (index >= array.length) break; } __index = index; __currentChar = currentChar; TypeType type = doubleFloat ? TypeType.DOUBLE : TypeType.INT; NumberValue value = new NumberValue ( chop, type, startIndex, __index, this.charArray ); if (events!=null) if (!events.number( startIndex, __index, value ))stop(); return value; }
@Override public String stringValue(CharBuf charBuf) { return toString(); }