java.lang.StringBuffer.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(168)

本文整理了Java中java.lang.StringBuffer.getValue()方法的一些代码示例,展示了StringBuffer.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StringBuffer.getValue()方法的具体详情如下:
包路径:java.lang.StringBuffer
类名称:StringBuffer
方法名:getValue

StringBuffer.getValue介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Returns whether the characters in the StringBuffer {@code strbuf} are the
 * same as those in this string.
 *
 * @param strbuf
 *            the StringBuffer to compare this string to.
 * @return {@code true} if the characters in {@code strbuf} are identical to
 *         those in this string. If they are not, {@code false} will be
 *         returned.
 * @throws NullPointerException
 *             if {@code strbuf} is {@code null}.
 * @since 1.4
 */
public boolean contentEquals(StringBuffer strbuf) {
  synchronized (strbuf) {
    int size = strbuf.length();
    if (count != size) {
      return false;
    }
    return regionMatches(0, new String(0, size, strbuf.getValue()), 0,
        size);
  }
}

代码示例来源:origin: robovm/robovm

/**
 * Appends the contents of the specified {@code StringBuffer}. If the
 * StringBuffer is {@code null}, then the string {@code "null"} is
 * appended.
 *
 * @param sb
 *            the {@code StringBuffer} to append.
 * @return this builder.
 */
public StringBuilder append(StringBuffer sb) {
  if (sb == null) {
    appendNull();
  } else {
    append0(sb.getValue(), 0, sb.length());
  }
  return this;
}

代码示例来源:origin: robovm/robovm

/**
 * Adds the specified StringBuffer to the end of this buffer.
 * <p>
 * If the specified StringBuffer is {@code null} the string {@code "null"}
 * is appended, otherwise the contents of the specified StringBuffer is
 * appended.
 *
 * @param sb
 *            the StringBuffer to append (may be null).
 * @return this StringBuffer.
 *
 * @since 1.4
 */
public synchronized StringBuffer append(StringBuffer sb) {
  if (sb == null) {
    appendNull();
  } else {
    synchronized (sb) {
      append0(sb.getValue(), 0, sb.length());
    }
  }
  return this;
}

代码示例来源:origin: robovm/robovm

private synchronized void writeObject(ObjectOutputStream out)
    throws IOException {
  ObjectOutputStream.PutField fields = out.putFields();
  fields.put("count", length());
  fields.put("shared", false);
  fields.put("value", getValue());
  out.writeFields();
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns whether the characters in the StringBuffer {@code strbuf} are the
 * same as those in this string.
 *
 * @param strbuf
 *            the StringBuffer to compare this string to.
 * @return {@code true} if the characters in {@code strbuf} are identical to
 *         those in this string. If they are not, {@code false} will be
 *         returned.
 * @throws NullPointerException
 *             if {@code strbuf} is {@code null}.
 * @since 1.4
 */
public boolean contentEquals(StringBuffer strbuf) {
  synchronized (strbuf) {
    int size = strbuf.length();
    if (count != size) {
      return false;
    }
    return regionMatches(0, new String(0, size, strbuf.getValue()), 0,
        size);
  }
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns whether the characters in the StringBuffer {@code strbuf} are the
 * same as those in this string.
 *
 * @param strbuf
 *            the StringBuffer to compare this string to.
 * @return {@code true} if the characters in {@code strbuf} are identical to
 *         those in this string. If they are not, {@code false} will be
 *         returned.
 * @throws NullPointerException
 *             if {@code strbuf} is {@code null}.
 * @since 1.4
 */
public boolean contentEquals(StringBuffer strbuf) {
  synchronized (strbuf) {
    int size = strbuf.length();
    if (count != size) {
      return false;
    }
    return regionMatches(0, new String(0, size, strbuf.getValue()), 0,
        size);
  }
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns whether the characters in the StringBuffer {@code strbuf} are the
 * same as those in this string.
 *
 * @param strbuf
 *            the StringBuffer to compare this string to.
 * @return {@code true} if the characters in {@code strbuf} are identical to
 *         those in this string. If they are not, {@code false} will be
 *         returned.
 * @throws NullPointerException
 *             if {@code strbuf} is {@code null}.
 * @since 1.4
 */
public boolean contentEquals(StringBuffer strbuf) {
  synchronized (strbuf) {
    int size = strbuf.length();
    if (count != size) {
      return false;
    }
    return regionMatches(0, new String(0, size, strbuf.getValue()), 0,
        size);
  }
}

代码示例来源:origin: MobiVM/robovm

/**
 * Appends the contents of the specified {@code StringBuffer}. If the
 * StringBuffer is {@code null}, then the string {@code "null"} is
 * appended.
 *
 * @param sb
 *            the {@code StringBuffer} to append.
 * @return this builder.
 */
public StringBuilder append(StringBuffer sb) {
  if (sb == null) {
    appendNull();
  } else {
    append0(sb.getValue(), 0, sb.length());
  }
  return this;
}

代码示例来源:origin: ibinti/bugvm

/**
 * Appends the contents of the specified {@code StringBuffer}. If the
 * StringBuffer is {@code null}, then the string {@code "null"} is
 * appended.
 *
 * @param sb
 *            the {@code StringBuffer} to append.
 * @return this builder.
 */
public StringBuilder append(StringBuffer sb) {
  if (sb == null) {
    appendNull();
  } else {
    append0(sb.getValue(), 0, sb.length());
  }
  return this;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Appends the contents of the specified {@code StringBuffer}. If the
 * StringBuffer is {@code null}, then the string {@code "null"} is
 * appended.
 *
 * @param sb
 *            the {@code StringBuffer} to append.
 * @return this builder.
 */
public StringBuilder append(StringBuffer sb) {
  if (sb == null) {
    appendNull();
  } else {
    append0(sb.getValue(), 0, sb.length());
  }
  return this;
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Appends the contents of the specified {@code StringBuffer}. If the
 * StringBuffer is {@code null}, then the string {@code "null"} is
 * appended.
 *
 * @param sb
 *            the {@code StringBuffer} to append.
 * @return this builder.
 */
public StringBuilder append(StringBuffer sb) {
  if (sb == null) {
    appendNull();
  } else {
    append0(sb.getValue(), 0, sb.length());
  }
  return this;
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Appends the contents of the specified {@code StringBuffer}. If the
 * StringBuffer is {@code null}, then the string {@code "null"} is
 * appended.
 *
 * @param sb
 *            the {@code StringBuffer} to append.
 * @return this builder.
 */
public StringBuilder append(StringBuffer sb) {
  if (sb == null) {
    appendNull();
  } else {
    append0(sb.getValue(), 0, sb.length());
  }
  return this;
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Appends the contents of the specified {@code StringBuffer}. If the
 * StringBuffer is {@code null}, then the string {@code "null"} is
 * appended.
 *
 * @param sb
 *            the {@code StringBuffer} to append.
 * @return this builder.
 */
public StringBuilder append(StringBuffer sb) {
  if (sb == null) {
    appendNull();
  } else {
    append0(sb.getValue(), 0, sb.length());
  }
  return this;
}

代码示例来源:origin: MobiVM/robovm

/**
 * Adds the specified StringBuffer to the end of this buffer.
 * <p>
 * If the specified StringBuffer is {@code null} the string {@code "null"}
 * is appended, otherwise the contents of the specified StringBuffer is
 * appended.
 *
 * @param sb
 *            the StringBuffer to append (may be null).
 * @return this StringBuffer.
 *
 * @since 1.4
 */
public synchronized StringBuffer append(StringBuffer sb) {
  if (sb == null) {
    appendNull();
  } else {
    synchronized (sb) {
      append0(sb.getValue(), 0, sb.length());
    }
  }
  return this;
}

代码示例来源:origin: ibinti/bugvm

private synchronized void writeObject(ObjectOutputStream out)
    throws IOException {
  ObjectOutputStream.PutField fields = out.putFields();
  fields.put("count", length());
  fields.put("shared", false);
  fields.put("value", getValue());
  out.writeFields();
}

代码示例来源:origin: com.gluonhq/robovm-rt

private synchronized void writeObject(ObjectOutputStream out)
    throws IOException {
  ObjectOutputStream.PutField fields = out.putFields();
  fields.put("count", length());
  fields.put("shared", false);
  fields.put("value", getValue());
  out.writeFields();
}

代码示例来源:origin: MobiVM/robovm

private synchronized void writeObject(ObjectOutputStream out)
    throws IOException {
  ObjectOutputStream.PutField fields = out.putFields();
  fields.put("count", length());
  fields.put("shared", false);
  fields.put("value", getValue());
  out.writeFields();
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

private synchronized void writeObject(ObjectOutputStream out)
    throws IOException {
  ObjectOutputStream.PutField fields = out.putFields();
  fields.put("count", length());
  fields.put("shared", false);
  fields.put("value", getValue());
  out.writeFields();
}

代码示例来源:origin: com.bugvm/bugvm-rt

private synchronized void writeObject(ObjectOutputStream out)
    throws IOException {
  ObjectOutputStream.PutField fields = out.putFields();
  fields.put("count", length());
  fields.put("shared", false);
  fields.put("value", getValue());
  out.writeFields();
}

代码示例来源:origin: FlexoVM/flexovm

private synchronized void writeObject(ObjectOutputStream out)
    throws IOException {
  ObjectOutputStream.PutField fields = out.putFields();
  fields.put("count", length());
  fields.put("shared", false);
  fields.put("value", getValue());
  out.writeFields();
}

相关文章