Package javolution.text

Examples of javolution.text.Text


            }
            return;
        }

        if (currentValue != null && currentFieldName != null) {
            Text value = Text.valueOf(values, offset, count);

            // Debug.logInfo("characters: value=" + value, module);
            if (currentFieldValue == null) {
                currentFieldValue = value;
            } else {
View Full Code Here


            }
            return;
        }

        if (currentValue != null && currentFieldName != null) {
            Text value = Text.valueOf(values, offset, count);

            // Debug.logInfo("characters: value=" + value, module);
            if (currentFieldValue == null) {
                currentFieldValue = value;
            } else {
View Full Code Here

     * @return this collection textual representation.
     */
    public Text toText() {
        // We use Text concatenation instead of TextBuilder to avoid copying
        // the text representation of the record values (unknown length).
        Text text = Text.valueOf("{");
        for (Record r = head(), end = tail(); (r = r.getNext()) != end;) {
            text = text.plus(valueOf(r));
            if (r.getNext() != end) {
                text = text.plus(", ");
            }
        }
        return text.plus("}");
    }
View Full Code Here

    */
    public static void debug(Object... messages) {
    LogContext logContext = (LogContext) LogContext.getCurrentLogContext();
    if (!logContext.isLogged("debug"))
    return;
    Text tmp = Text.valueOf(messages[0]);
    for (int i=1; i < messages.length; i++) {
    tmp = tmp.plus(messages[i]);
    }
    logContext.logDebug(tmp);
    }
View Full Code Here

    */
    public static void info(Object... messages) {
    LogContext logContext = (LogContext) LogContext.getCurrentLogContext();
    if (!logContext.isLogged("info"))
    return;
    Text tmp = Text.valueOf(messages[0]);
    for (int i = 1; i < messages.length; i++) {
    tmp = tmp.plus(messages[i]);
    }
    logContext.logInfo(tmp);
    }
View Full Code Here

    */
    public static void warning(Object... messages) {
    LogContext logContext = (LogContext) LogContext.getCurrentLogContext();
    if (!logContext.isLogged("warning"))
    return;
    Text tmp = Text.valueOf(messages[0]);
    for (int i = 1; i < messages.length; i++) {
    tmp = tmp.plus(messages[i]);
    }
    logContext.logWarning(tmp);
    }
View Full Code Here

    */
    public static void error(Throwable error, Object... messages) {
    LogContext logContext = (LogContext) LogContext.getCurrentLogContext();
    if (!logContext.isLogged("error"))
    return;
    Text tmp = Text.valueOf(messages[0]);
    for (int i = 1; i < messages.length; i++) {
    tmp = tmp.plus(messages[i]);
    }
    logContext.logError(error, tmp);
    }
View Full Code Here

    */
    public static void error(Object... messages) {
    LogContext logContext = (LogContext) LogContext.getCurrentLogContext();
    if (!logContext.isLogged("error"))
    return;
    Text tmp = Text.valueOf(messages[0]);
    for (int i = 1; i < messages.length; i++) {
    tmp = tmp.plus(messages[i]);
    }
    logContext.logError(null, tmp);
    }
View Full Code Here

        final Object csq = _input;
        if (csq instanceof String) {
            String str = (String) csq;
            str.getChars(_index, _index + count, cbuf, off);
        } else if (csq instanceof Text) {
            Text txt = (Text) csq;
            txt.getChars(_index, _index + count, cbuf, off);
        } else if (csq instanceof TextBuilder) {
            TextBuilder tb = (TextBuilder) csq;
            tb.getChars(_index, _index + count, cbuf, off);
        } else if (csq instanceof CharArray) {
            CharArray ca = (CharArray) csq;
View Full Code Here

     * Returns the string representation of these attributes.
     *
     * @return this attributes textual representation.
     */
    public String toString() {
        Text text = Text.valueOf('[');
        final Text equ = Text.valueOf('=');
        final Text sep = Text.valueOf(", ");
        for (int i = 0; i < _length;) {
            text = text.concat(Text.valueOf(_qNames[i]).concat(equ).concat(
                    Text.valueOf(_values[i])));
            if (++i != _length) {
                text = text.concat(sep);
View Full Code Here

TOP

Related Classes of javolution.text.Text

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.