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:net.darkmist.alib.str.BackSlashEscape.java

public String escape(CharSequence in) {
    return escape(in.toString().getBytes());
}

From source file:io.wcm.devops.conga.generator.plugins.handlebars.escaping.XmlEscapingStrategy.java

@Override
public String escape(CharSequence value) {
    return value == null ? null : StringEscapeUtils.escapeXml10(value.toString());
}

From source file:HSqlPrimerDesign.java

@SuppressWarnings("Duplicates")
@Deprecated/*w  ww  .j a  va  2s .  c o  m*/
public static int hairpin(CharSequence primer1, CharSequence primer2, ThalLoad.Thal INSTANCE) {
    ThalLoad.Thal.thal_args args = new ThalLoad.Thal.thal_args();
    ThalLoad.Thal.thal_results out = new ThalLoad.Thal.thal_results();
    INSTANCE.set_thal_default_args(args);
    args.temp = 70.0;
    INSTANCE.thal(primer1.toString().getBytes(), primer2.toString().getBytes(), args, out);
    System.out.println(new String(out.msg));
    System.out.println(out.temp);
    return args.dimer;
}

From source file:com.themodernway.common.util.SHA512Helper.java

@Override
public String sha512(final CharSequence text) {
    return Hex.encodeHexString(DigestUtils.getSha512Digest().digest(text.toString().getBytes(Charsets.UTF_8)));
}

From source file:com.px100systems.data.browser.controller.Encoder.java

/**
 * Compare passwords/* w  ww .ja  v a 2  s .com*/
 * @param rawPassword clear-text password
 * @param encodedPassword encoded password
 * @return whether passwords match
 */
@Override
public boolean matches(CharSequence rawPassword, String encodedPassword) {
    return passwordEncoder.encodePassword(rawPassword.toString(), null).equals(encodedPassword);
}

From source file:carbon.shell.console.jline.CarbonHistory.java

@Override
public void add(CharSequence item) {
    if (!loading) {
        item = item.toString().replaceAll("\\!", "\\\\!");
    }/*www.jav a2  s .  c o m*/
    super.add(item);
}

From source file:net.erdfelt.android.sdkfido.project.Dir.java

public Dir(File dir, CharSequence name) {
    this(new File(dir, name.toString()));
}

From source file:de.ckatzorke.spring.security.password.encoder.Argon2PasswordEncoder.java

public boolean matches(CharSequence rawPassword, String encodedPassword) {
    return ARGON2.verify(encodedPassword, rawPassword.toString());
}

From source file:edu.cens.loci.ui.PlaceViewActivity.java

static String buildDataString(DataKind kind, ContentValues values, Context context) {
    if (kind.actionBody == null) {
        return null;
    }/*from ww w.j  a  v  a 2s  .  c  o m*/
    CharSequence actionBody = kind.actionBody.inflateUsing(context, values);
    return actionBody == null ? null : actionBody.toString();
}

From source file:com.discovery.darchrow.lang.StringUtil.java

/**
 * [?]:?./*from w w  w . j a va2  s  .  co m*/
 * 
 * <h3>:</h3>
 * 
 * <blockquote>
 * 
 * <pre class="code">
 * StringUtil.substringWithoutLast(null, "222")                     = ""
 * StringUtil.substringWithoutLast("jinxin.feilong", "ng")          = "jinxin.feilo"
 * StringUtil.substringWithoutLast("jinxin.feilong     ", "     ")  = "jinxin.feilong"
 * </pre>
 * 
 * </blockquote>
 *
 * @param text
 *            the text
 * @param lastString
 *            the last string
 * @return  <code>text</code> null, {@link StringUtils#EMPTY}<br>
 *          <code>lastString</code> null, <code>text.toString()</code><br>
 * @since 1.4.0
 */
public static String substringWithoutLast(final CharSequence text, final String lastString) {
    if (null == text) {
        return StringUtils.EMPTY;
    }
    String textString = text.toString();
    return null == lastString ? textString
            : textString.endsWith(lastString) ? substringWithoutLast(textString, lastString.length())
                    : textString;
}