public class WhitespaceCorrector extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WhitespaceCorrector.Punctuation |
static class |
WhitespaceCorrector.Whitespace |
| Modifier and Type | Field and Description |
|---|---|
static Set<WhitespaceCorrector.Whitespace> |
ALL_WHITESPACE |
static Set<WhitespaceCorrector.Whitespace> |
HORIZONTAL_TABS |
static Set<WhitespaceCorrector.Whitespace> |
NONBREAKING_SPACES |
static Set<WhitespaceCorrector.Whitespace> |
OTHER |
protected Set<WhitespaceCorrector.Punctuation> |
punctuation |
protected LocaleId |
sourceLocale |
static Set<WhitespaceCorrector.Whitespace> |
SPACE |
protected LocaleId |
targetLocale |
static Set<WhitespaceCorrector.Whitespace> |
VERTICAL_WHITESPACE |
protected Set<WhitespaceCorrector.Whitespace> |
whitespace |
protected static char |
WHITESPACE |
| Constructor and Description |
|---|
WhitespaceCorrector(LocaleId sourceLocale,
LocaleId targetLocale,
Set<WhitespaceCorrector.Punctuation> punctuation,
Set<WhitespaceCorrector.Whitespace> whitespace) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTrailingWhitespace(ITextUnit textUnit) |
ITextUnit |
correctWhitespace(ITextUnit tu) |
protected boolean |
isNonSpaceDelimitedPunctuation(char c) |
protected boolean |
isSpaceDelimitedPunctuation(char c) |
protected boolean |
isWhitespace(char c) |
protected void |
removeTrailingWhitespace(ITextUnit textUnit) |
public static final Set<WhitespaceCorrector.Whitespace> VERTICAL_WHITESPACE
public static final Set<WhitespaceCorrector.Whitespace> NONBREAKING_SPACES
public static final Set<WhitespaceCorrector.Whitespace> SPACE
public static final Set<WhitespaceCorrector.Whitespace> ALL_WHITESPACE
public static final Set<WhitespaceCorrector.Whitespace> OTHER
public static final Set<WhitespaceCorrector.Whitespace> HORIZONTAL_TABS
protected static final char WHITESPACE
protected LocaleId sourceLocale
protected LocaleId targetLocale
protected Set<WhitespaceCorrector.Punctuation> punctuation
protected Set<WhitespaceCorrector.Whitespace> whitespace
public WhitespaceCorrector(LocaleId sourceLocale, LocaleId targetLocale, Set<WhitespaceCorrector.Punctuation> punctuation, Set<WhitespaceCorrector.Whitespace> whitespace)
protected void removeTrailingWhitespace(ITextUnit textUnit)
protected void addTrailingWhitespace(ITextUnit textUnit)
protected boolean isWhitespace(char c)
protected boolean isSpaceDelimitedPunctuation(char c)
protected boolean isNonSpaceDelimitedPunctuation(char c)
Copyright © 2022. All rights reserved.