站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

TokenUtilities (Lexer) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.lexer/2 1.19.0 1

org.netbeans.api.lexer
Class TokenUtilities

java.lang.Object
  extended by org.netbeans.api.lexer.TokenUtilities

public final class TokenUtilities
extends Object

Various utility methods related to token text.


Method Summary
static String debugText(CharSequence text)
          Return the given text as String translating the special characters (and '\') into escape sequences.
static boolean endsWith(CharSequence text, CharSequence suffix)
          Implementation of String.endsWith(String) for character sequences.
static boolean equals(CharSequence text1, CharSequence text2)
          Test whether the given character sequences represent the same text content.
static int indexOf(CharSequence text, CharSequence seq)
          Implementation of String.indexOf(String) for character sequences.
static int indexOf(CharSequence text, CharSequence seq, int fromIndex)
          Implementation of String.indexOf(String,int) for character sequences.
static int indexOf(CharSequence text, int ch)
          Implementation of String.indexOf(int) for character sequences.
static int indexOf(CharSequence text, int ch, int fromIndex)
          Implementation of String.indexOf(int,int) for character sequences.
static int lastIndexOf(CharSequence text, CharSequence seq)
          Implementation of String.lastIndexOf(String) for character sequences.
static int lastIndexOf(CharSequence text, CharSequence seq, int fromIndex)
          Implementation of String.lastIndexOf(String,int) for character sequences.
static int lastIndexOf(CharSequence text, int ch)
          Implementation of String.lastIndexOf(int) for character sequences.
static int lastIndexOf(CharSequence text, int ch, int fromIndex)
          Implementation of String.lastIndexOf(int,int) for character sequences.
static boolean startsWith(CharSequence text, CharSequence prefix)
          Implementation of String.startsWith(String) for character sequences.
static CharSequence trim(CharSequence text)
          Implementation of String.trim() for character sequences.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

equals

public static boolean equals(CharSequence text1,
                             CharSequence text2)
Test whether the given character sequences represent the same text content.

Parameters:
text1 - non-null text to be compared to the other text parameter.
text2 - non-null text to be compared to the previous text parameter.
Returns:
true if the given character sequences represent the same text content.

indexOf

public static int indexOf(CharSequence text,
                          int ch)
Implementation of String.indexOf(int) for character sequences.


indexOf

public static int indexOf(CharSequence text,
                          int ch,
                          int fromIndex)
Implementation of String.indexOf(int,int) for character sequences.


indexOf

public static int indexOf(CharSequence text,
                          CharSequence seq)
Implementation of String.indexOf(String) for character sequences.


indexOf

public static int indexOf(CharSequence text,
                          CharSequence seq,
                          int fromIndex)
Implementation of String.indexOf(String,int) for character sequences.


lastIndexOf

public static int lastIndexOf(CharSequence text,
                              CharSequence seq)
Implementation of String.lastIndexOf(String) for character sequences.


lastIndexOf

public static int lastIndexOf(CharSequence text,
                              CharSequence seq,
                              int fromIndex)
Implementation of String.lastIndexOf(String,int) for character sequences.


lastIndexOf

public static int lastIndexOf(CharSequence text,
                              int ch)
Implementation of String.lastIndexOf(int) for character sequences.


lastIndexOf

public static int lastIndexOf(CharSequence text,
                              int ch,
                              int fromIndex)
Implementation of String.lastIndexOf(int,int) for character sequences.


startsWith

public static boolean startsWith(CharSequence text,
                                 CharSequence prefix)
Implementation of String.startsWith(String) for character sequences.


endsWith

public static boolean endsWith(CharSequence text,
                               CharSequence suffix)
Implementation of String.endsWith(String) for character sequences.


trim

public static CharSequence trim(CharSequence text)
Implementation of String.trim() for character sequences.


debugText

public static String debugText(CharSequence text)
Return the given text as String translating the special characters (and '\') into escape sequences.

Parameters:
text - non-null text to be debugged.
Returns:
non-null string containing the debug text.

org.netbeans.modules.lexer/2 1.19.0 1

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.