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

CharSubSequence.StringLike (Editor Utilities) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.util/1 1.17

org.netbeans.lib.editor.util
Class CharSubSequence.StringLike

java.lang.Object
  extended by org.netbeans.lib.editor.util.AbstractCharSequence
      extended by org.netbeans.lib.editor.util.CharSubSequence
          extended by org.netbeans.lib.editor.util.CharSubSequence.StringLike
All Implemented Interfaces:
CharSequence
Enclosing class:
CharSubSequence

public static class CharSubSequence.StringLike
extends CharSubSequence

Subclass providing string-like implementation of hashCode() and equals() method accepting strings with the same content like charsequence has.
This makes the class suitable for matching to strings e.g. in maps.
NOTE: Matching is just uni-directional i.e. charsequence.equals(string) works but string.equals(charsequence) does not.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.lib.editor.util.CharSubSequence
CharSubSequence.StringLike
 
Constructor Summary
CharSubSequence.StringLike(CharSequence backingSequence, int start, int end)
           
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 
Methods inherited from class org.netbeans.lib.editor.util.CharSubSequence
backingSequence, charAt, checkIndexesValid, length, start
 
Methods inherited from class org.netbeans.lib.editor.util.AbstractCharSequence
subSequence, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharSubSequence.StringLike

public CharSubSequence.StringLike(CharSequence backingSequence,
                                  int start,
                                  int end)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

org.netbeans.modules.editor.util/1 1.17

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