org.apache.xpath.objects.XStringForFSB类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(8.8k)|赞(0)|评价(0)|浏览(121)

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

XStringForFSB介绍

[英]This class will wrap a FastStringBuffer and allow for
[中]这个类将包装一个FastStringBuffer并允许

代码示例

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

/**
 * Returns a new string that is a substring of this string. The
 * substring begins with the character at the specified index and
 * extends to the end of this string. <p>
 * Examples:
 * <blockquote><pre>
 * "unhappy".substring(2) returns "happy"
 * "Harbison".substring(3) returns "bison"
 * "emptiness".substring(9) returns "" (an empty string)
 * </pre></blockquote>
 *
 * @param      beginIndex   the beginning index, inclusive.
 * @return     the specified substring.
 * @exception  IndexOutOfBoundsException  if
 *             <code>beginIndex</code> is negative or larger than the
 *             length of this <code>String</code> object.
 */
public XMLString substring(int beginIndex)
{
 int len = m_length - beginIndex;
 if (len <= 0)
  return XString.EMPTYSTRING;
 else
 {
  int start = m_start + beginIndex;
  return new XStringForFSB(fsb(), start, len);
 }
}

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

return obj2.equals(this);
else if (obj2 instanceof XStringForFSB)
 return equals((XMLString) obj2);
else
 return equals(obj2.toString());

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

/**
 * Removes white space from both ends of this string.
 *
 * @return  this string, with white space removed from the front and end.
 */
public XMLString trim()
{
 return fixWhiteSpace(true, true, false);
}

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

FastStringBuffer fsb = fsb();
boolean edit = false;
 if (isSpace(c))

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

/**
 * Since this object is incomplete without the length and the offset, we 
 * have to convert to a string when this function is called.
 *
 * @return The java String representation of this object.
 */
public Object object()
{
 return str();
}

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

/**
 * Directly call the
 * comment method on the passed LexicalHandler for the
 * string-value.
 *
 * @param lh A non-null reference to a LexicalHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchAsComment(org.xml.sax.ext.LexicalHandler lh)
    throws org.xml.sax.SAXException
{
 fsb().sendSAXComment(lh, m_start, m_length);
}

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

/**
 * Create a XMLString from a FastStringBuffer.
 *
 *
 * @param fsb FastStringBuffer reference, which must be non-null.
 * @param start The start position in the array.
 * @param length The number of characters to read from the array.
 *
 * @return An XMLString object that wraps the FastStringBuffer reference.
 */
public XMLString newstr(FastStringBuffer fsb, int start, int length)
{
 return new XStringForFSB(fsb, start, length);
}

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

/**
 * Tests if this string starts with the specified prefix.
 *
 * @param   prefix   the prefix.
 * @return  <code>true</code> if the character sequence represented by the
 *          argument is a prefix of the character sequence represented by
 *          this string; <code>false</code> otherwise.
 *          Note also that <code>true</code> will be returned if the
 *          argument is an empty string or is equal to this
 *          <code>String</code> object as determined by the
 *          {@link #equals(Object)} method.
 * @exception java.lang.NullPointerException if <code>prefix</code> is
 *          <code>null</code>.
 * @since   JDK1. 0
 */
public boolean startsWith(XMLString prefix)
{
 return startsWith(prefix, 0);
}

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

/**
 * Returns the index within this string of the first occurrence of the
 * specified character. If a character with value <code>ch</code> occurs
 * in the character sequence represented by this <code>String</code>
 * object, then the index of the first such occurrence is returned --
 * that is, the smallest value <i>k</i> such that:
 * <blockquote><pre>
 * this.charAt(<i>k</i>) == ch
 * </pre></blockquote>
 * is <code>true</code>. If no such character occurs in this string,
 * then <code>-1</code> is returned.
 *
 * @param   ch   a character.
 * @return  the index of the first occurrence of the character in the
 *          character sequence represented by this object, or
 *          <code>-1</code> if the character does not occur.
 */
public int indexOf(int ch)
{
 return indexOf(ch, 0);
}

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

FastStringBuffer fsb = fsb();
boolean edit = false;
 if (isSpace(c))

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

/**
 * Since this object is incomplete without the length and the offset, we 
 * have to convert to a string when this function is called.
 *
 * @return The java String representation of this object.
 */
public Object object()
{
 return str();
}

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

/**
 * Directly call the
 * characters method on the passed ContentHandler for the
 * string-value. Multiple calls to the
 * ContentHandler's characters methods may well occur for a single call to
 * this method.
 *
 * @param ch A non-null reference to a ContentHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchCharactersEvents(org.xml.sax.ContentHandler ch)
    throws org.xml.sax.SAXException
{
 fsb().sendSAXcharacters(ch, m_start, m_length);
}

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

/**
 * Create a XMLString from a FastStringBuffer.
 *
 *
 * @param fsb FastStringBuffer reference, which must be non-null.
 * @param start The start position in the array.
 * @param length The number of characters to read from the array.
 *
 * @return An XMLString object that wraps the FastStringBuffer reference.
 */
public XMLString newstr(FastStringBuffer fsb, int start, int length)
{
 return new XStringForFSB(fsb, start, length);
}

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

/**
 * Tests if this string starts with the specified prefix.
 *
 * @param   prefix   the prefix.
 * @return  <code>true</code> if the character sequence represented by the
 *          argument is a prefix of the character sequence represented by
 *          this string; <code>false</code> otherwise.
 *          Note also that <code>true</code> will be returned if the
 *          argument is an empty string or is equal to this
 *          <code>String</code> object as determined by the
 *          {@link #equals(Object)} method.
 * @exception java.lang.NullPointerException if <code>prefix</code> is
 *          <code>null</code>.
 * @since   JDK1. 0
 */
public boolean startsWith(XMLString prefix)
{
 return startsWith(prefix, 0);
}

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

/**
 * Returns the index within this string of the first occurrence of the
 * specified character. If a character with value <code>ch</code> occurs
 * in the character sequence represented by this <code>String</code>
 * object, then the index of the first such occurrence is returned --
 * that is, the smallest value <i>k</i> such that:
 * <blockquote><pre>
 * this.charAt(<i>k</i>) == ch
 * </pre></blockquote>
 * is <code>true</code>. If no such character occurs in this string,
 * then <code>-1</code> is returned.
 *
 * @param   ch   a character.
 * @return  the index of the first occurrence of the character in the
 *          character sequence represented by this object, or
 *          <code>-1</code> if the character does not occur.
 */
public int indexOf(int ch)
{
 return indexOf(ch, 0);
}

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

FastStringBuffer fsb = fsb();
boolean edit = false;
 if (isSpace(c))

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

/**
 * Returns a new string that is a substring of this string. The
 * substring begins at the specified <code>beginIndex</code> and
 * extends to the character at index <code>endIndex - 1</code>.
 * Thus the length of the substring is <code>endIndex-beginIndex</code>.
 *
 * @param      beginIndex   the beginning index, inclusive.
 * @param      endIndex     the ending index, exclusive.
 * @return     the specified substring.
 * @exception  IndexOutOfBoundsException  if the
 *             <code>beginIndex</code> is negative, or
 *             <code>endIndex</code> is larger than the length of
 *             this <code>String</code> object, or
 *             <code>beginIndex</code> is larger than
 *             <code>endIndex</code>.
 */
public XMLString substring(int beginIndex, int endIndex)
{
 int len = endIndex - beginIndex;
 if (len > m_length)
  len = m_length;
 if (len <= 0)
  return XString.EMPTYSTRING;
 else
 {
  int start = m_start + beginIndex;
  return new XStringForFSB(fsb(), start, len);
 }
}

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

/**
 * Compares this <code>String</code> to another <code>String</code>,
 * ignoring case considerations.  Two strings are considered equal
 * ignoring case if they are of the same length, and corresponding
 * characters in the two strings are equal ignoring case.
 *
 * @param   anotherString   the <code>String</code> to compare this
 *                          <code>String</code> against.
 * @return  <code>true</code> if the argument is not <code>null</code>
 *          and the <code>String</code>s are equal,
 *          ignoring case; <code>false</code> otherwise.
 * @see     #equals(Object)
 * @see     java.lang.Character#toLowerCase(char)
 * @see java.lang.Character#toUpperCase(char)
 */
public boolean equalsIgnoreCase(String anotherString)
{
 return (m_length == anotherString.length())
     ? str().equalsIgnoreCase(anotherString) : false;
}

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

/**
 * Directly call the
 * comment method on the passed LexicalHandler for the
 * string-value.
 *
 * @param lh A non-null reference to a LexicalHandler.
 *
 * @throws org.xml.sax.SAXException
 */
public void dispatchAsComment(org.xml.sax.ext.LexicalHandler lh)
    throws org.xml.sax.SAXException
{
 fsb().sendSAXComment(lh, m_start, m_length);
}

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

/**
 * Removes white space from both ends of this string.
 *
 * @return  this string, with white space removed from the front and end.
 */
public XMLString trim()
{
 return fixWhiteSpace(true, true, false);
}

相关文章