public class Word extends Object implements CharSequence
WordFinder| Constructor and Description |
|---|
Word(String text,
int start)
Creates a new Word object.
|
Word(String text,
int start,
boolean isStart)
Creates a new Word object.
|
| Modifier and Type | Method and Description |
|---|---|
char |
charAt(int index) |
boolean |
equalIgnoreCase(String text) |
boolean |
equalIgnoreCaseText(Word word) |
boolean |
equals(Object o) |
boolean |
equalText(String text) |
boolean |
equalText(Word word) |
int |
getEnd() |
int |
getStart() |
String |
getStartSentenceWordCase() |
static String |
getStartSentenceWordCase(CharSequence word) |
String |
getText() |
boolean |
hasLetters() |
boolean |
isCorrectFirstChar()
Nos dice si está bien el primer carácter.
|
boolean |
isStartOfSentence()
Nos dice si esta palabra es inicio de frase.
|
boolean |
isUpperCase() |
int |
length() |
void |
moveTo(int start)
return a new word that start at start.
|
void |
setStartStartOfSentence(boolean isStart) |
CharSequence |
subSequence(int start,
int end) |
String |
toString() |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchars, codePointspublic Word(String text, int start, boolean isStart)
text - the String representing the word.start - the start index of the word.isStart - Indicate it is start of the sentence.public Word(String text, int start)
text - the String representing the word.start - the start index of the word.public void moveTo(int start)
public int getEnd()
public int getStart()
public String getText()
public int length()
length in interface CharSequencepublic String toString()
toString in interface CharSequencetoString in class Objectpublic boolean isStartOfSentence()
public void setStartStartOfSentence(boolean isStart)
public boolean isCorrectFirstChar()
public boolean isUpperCase()
public boolean hasLetters()
public boolean equalText(Word word)
public boolean equalText(String text)
public boolean equalIgnoreCaseText(Word word)
public boolean equalIgnoreCase(String text)
public char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic String getStartSentenceWordCase()
public static String getStartSentenceWordCase(CharSequence word)
Copyright © 2020. All rights reserved.