Example usage for java.lang CharSequence toString

List of usage examples for java.lang CharSequence toString

Introduction

In this page you can find the example usage for java.lang CharSequence toString.

Prototype

public String toString();

Source Link

Document

Returns a string containing the characters in this sequence in the same order as this sequence.

Usage

From source file:fr.landel.utils.commons.exception.AbstractRuntimeException.java

/**
 * Constructor with message. To format the message, this method uses
 * {@link String#format} function./* w w  w. j  a  v  a2 s  .com*/
 * 
 * @param message
 *            message
 * @param arguments
 *            message arguments
 */
public AbstractRuntimeException(final CharSequence message, final Object... arguments) {
    super(ArrayUtils.isNotEmpty(arguments) ? String.format(message.toString(), arguments) : message.toString());
}

From source file:fr.landel.utils.commons.exception.AbstractRuntimeException.java

/**
 * Constructor. To format the message, this method uses
 * {@link String#format} function.//  w w  w  . ja  va2 s  .c om
 *
 * @param cause
 *            the cause
 * @param enableSuppression
 *            whether or not suppression is enabled or disabled
 * @param writableStackTrace
 *            whether or not the stack trace should be writable
 * @param message
 *            message
 * @param arguments
 *            message arguments
 */
protected AbstractRuntimeException(final Throwable cause, final boolean enableSuppression,
        final boolean writableStackTrace, final CharSequence message, final Object... arguments) {
    super(ArrayUtils.isNotEmpty(arguments) ? String.format(message.toString(), arguments) : message.toString(),
            cause, enableSuppression, writableStackTrace);
}

From source file:fr.landel.utils.commons.exception.AbstractException.java

/**
 * Constructor with message. To format the message, this method uses
 * {@link String#format} function./*from  ww  w.  jav a 2s  .  c o  m*/
 * 
 * @param locale
 *            message locale
 * @param message
 *            message
 * @param arguments
 *            message arguments
 */
public AbstractException(final Locale locale, final CharSequence message, final Object... arguments) {
    super(ArrayUtils.isNotEmpty(arguments) ? String.format(locale, message.toString(), arguments)
            : message.toString());
}

From source file:fr.landel.utils.commons.exception.AbstractRuntimeException.java

/**
 * Constructor with message. To format the message, this method uses
 * {@link String#format} function./*  w ww. j  a  v  a  2s .  co m*/
 * 
 * @param locale
 *            message locale
 * @param message
 *            message
 * @param arguments
 *            message arguments
 */
public AbstractRuntimeException(final Locale locale, final CharSequence message, final Object... arguments) {
    super(ArrayUtils.isNotEmpty(arguments) ? String.format(locale, message.toString(), arguments)
            : message.toString());
}

From source file:edu.cornell.med.icb.geo.tools.FileGeneList.java

@Override
public Set<String> calculateProbeSetSelection(final ObjectSet<CharSequence> tableProbesetIds) {
    cachedProbesetIds = new ObjectOpenHashSet<String>();
    for (final CharSequence id : tableProbesetIds) {
        final String stringId = id.toString().intern();
        boolean add = false;
        add = matchesProbesetId(id, add);
        add = matchesPlatform(id, add);/*from w ww.ja  v a  2s. com*/
        if (add) {
            cachedProbesetIds.add(stringId);
        }
    }
    return cachedProbesetIds;
}

From source file:fr.landel.utils.commons.exception.AbstractRuntimeException.java

/**
 * Constructor with message and exception. To format the message, this
 * method uses {@link String#format} function.
 * //from   w w  w .  j a  v a  2  s. co  m
 * @param exception
 *            The exception
 * @param message
 *            The message
 * @param arguments
 *            message arguments
 */
public AbstractRuntimeException(final Throwable exception, final CharSequence message,
        final Object... arguments) {
    super(ArrayUtils.isNotEmpty(arguments) ? String.format(message.toString(), arguments) : message.toString(),
            exception);
}

From source file:fr.landel.utils.commons.exception.AbstractException.java

/**
 * Constructor with message and exception. To format the message, this
 * method uses {@link String#format} function.
 * /*www  . j a v  a 2 s.  co m*/
 * @param exception
 *            The exception
 * @param locale
 *            message locale
 * @param message
 *            The message
 * @param arguments
 *            message arguments
 */
public AbstractException(final Throwable exception, final Locale locale, final CharSequence message,
        final Object... arguments) {
    super(ArrayUtils.isNotEmpty(arguments) ? String.format(locale, message.toString(), arguments)
            : message.toString(), exception);
}

From source file:com.heliosapm.opentsdb.TSDBSubmitterImpl.java

/**
 * Cleans the passed stringy//from w ww .ja v  a2 s.  c om
 * @param cs The stringy to clean
 * @return the cleaned stringy
 */
public static String clean(final CharSequence cs) {
    if (cs == null || cs.toString().trim().isEmpty())
        return "";
    String s = cs.toString().trim();
    final int index = s.indexOf('/');
    if (index != -1) {
        s = s.substring(index + 1);
    }
    return s.replace(" ", "_");
}

From source file:fr.landel.utils.commons.exception.AbstractException.java

/**
 * Constructor. To format the message, this method uses
 * {@link String#format} function./*ww w  .  j  a  va 2  s.c  om*/
 *
 * @param cause
 *            the cause
 * @param enableSuppression
 *            whether or not suppression is enabled or disabled
 * @param writableStackTrace
 *            whether or not the stack trace should be writable
 * @param locale
 *            message locale
 * @param message
 *            message
 * @param arguments
 *            message arguments
 */
protected AbstractException(final Throwable cause, final boolean enableSuppression,
        final boolean writableStackTrace, final Locale locale, final CharSequence message,
        final Object... arguments) {
    super(ArrayUtils.isNotEmpty(arguments) ? String.format(locale, message.toString(), arguments)
            : message.toString(), cause, enableSuppression, writableStackTrace);
}

From source file:fr.landel.utils.commons.exception.AbstractRuntimeException.java

/**
 * Constructor with message and exception. To format the message, this
 * method uses {@link String#format} function.
 * //from   w ww  .java  2s  .  c  o  m
 * @param exception
 *            The exception
 * @param locale
 *            message locale
 * @param message
 *            The message
 * @param arguments
 *            message arguments
 */
public AbstractRuntimeException(final Throwable exception, final Locale locale, final CharSequence message,
        final Object... arguments) {
    super(ArrayUtils.isNotEmpty(arguments) ? String.format(locale, message.toString(), arguments)
            : message.toString(), exception);
}