All Methods Static Methods Instance Methods Concrete Methods
Modifier and Type |
Method and Description |
boolean |
add(TextGrid grid)
Adds grid to this.
|
void |
addToMarkupTags(Collection<String> tags) |
boolean |
cellContainsDashedLineChar(TextGrid.Cell cell) |
void |
clear() |
boolean |
containsAtLeastOneDashedLine(CellSet set) |
void |
copyCellsTo(CellSet cells,
TextGrid grid) |
boolean |
equals(TextGrid grid) |
boolean |
exactlyOneNeighbourIsBoundary(TextGrid.Cell cell) |
void |
fillCellsWith(Iterable cells,
char c)
Fills all the cells in cells with c
|
CellSet |
fillContinuousArea(int x,
int y,
char c)
Fills the continuous area with if c1 characters with c2,
flooding from cell x, y
|
CellSet |
fillContinuousArea(TextGrid.Cell cell,
char c) |
ArrayList |
findArrowheads() |
CellSet |
findBoundariesExpandingFrom(TextGrid.Cell seed)
Locates and returns the '*' boundaries that we would
encounter if we did a flood-fill at seed .
|
ArrayList<TextGrid.CellColorPair> |
findColorCodes() |
ArrayList<TextGrid.CellTagPair> |
findMarkupTags() |
ArrayList<TextGrid.CellStringPair> |
findStrings()
Returns an ArrayList of CellStringPairs that
represents all the continuous (non-blank) Strings
in the grid.
|
CellSet |
followCell(TextGrid.Cell cell) |
CellSet |
followCell(TextGrid.Cell cell,
TextGrid.Cell blocked) |
CellSet |
followCorner(TextGrid.Cell cell) |
CellSet |
followCorner(TextGrid.Cell cell,
TextGrid.Cell blocked) |
CellSet |
followCorner1(TextGrid.Cell cell) |
CellSet |
followCorner1(TextGrid.Cell cell,
TextGrid.Cell blocked) |
CellSet |
followCorner2(TextGrid.Cell cell) |
CellSet |
followCorner2(TextGrid.Cell cell,
TextGrid.Cell blocked) |
CellSet |
followCorner3(TextGrid.Cell cell) |
CellSet |
followCorner3(TextGrid.Cell cell,
TextGrid.Cell blocked) |
CellSet |
followCorner4(TextGrid.Cell cell) |
CellSet |
followCorner4(TextGrid.Cell cell,
TextGrid.Cell blocked) |
CellSet |
followCrossOnLine(TextGrid.Cell cell,
TextGrid.Cell blocked) |
CellSet |
followIntersection(TextGrid.Cell cell) |
CellSet |
followIntersection(TextGrid.Cell cell,
TextGrid.Cell blocked) |
CellSet |
followLine(int x,
int y) |
CellSet |
followLine(TextGrid.Cell cell)
Returns the neighbours of a line-cell that are boundaries
(0 to 2 cells are returned)
|
CellSet |
followLine(TextGrid.Cell cell,
TextGrid.Cell blocked) |
CellSet |
followStub(TextGrid.Cell cell) |
CellSet |
followStub(TextGrid.Cell cell,
TextGrid.Cell blocked) |
char |
get(int x,
int y) |
char |
get(TextGrid.Cell cell) |
CellSet |
getAllBlanksBetweenCharacters() |
CellSet |
getAllBoundaries() |
CellSet |
getAllNonBlank() |
String |
getCellTypeAsString(TextGrid.Cell cell) |
String |
getDebugString() |
char |
getEastOf(int x,
int y) |
char |
getEastOf(TextGrid.Cell cell) |
int |
getHeight() |
char |
getNorthOf(int x,
int y) |
char |
getNorthOf(TextGrid.Cell cell) |
CellSet |
getPointMarkersOnLine() |
StringBuffer |
getRow(int y) |
protected ArrayList<StringBuffer> |
getRows() |
char |
getSouthOf(int x,
int y) |
char |
getSouthOf(TextGrid.Cell cell) |
String |
getStringAt(int x,
int y,
int length) |
String |
getStringAt(TextGrid.Cell cell,
int length) |
TextGrid |
getSubGrid(int x,
int y,
int width,
int height) |
TextGrid |
getTestingSubGrid(TextGrid.Cell cell) |
char |
getWestOf(int x,
int y) |
char |
getWestOf(TextGrid.Cell cell) |
int |
getWidth() |
boolean |
hasBlankCells() |
boolean |
hasEntryPoint(TextGrid.Cell cell,
int entryPointId)
This is done in a bit of a messy way, should be impossible
to go out of sync with corresponding GridPatternGroup.
|
boolean |
initialiseWithLines(ArrayList<StringBuffer> lines,
ProcessingOptions options) |
boolean |
initialiseWithText(String text,
ProcessingOptions options) |
boolean |
isArrowhead(TextGrid.Cell cell) |
boolean |
isBlank(int x,
int y) |
boolean |
isBlank(TextGrid.Cell cell) |
boolean |
isBlankBetweenCharacters(TextGrid.Cell cell)
true if cell is blank and the east and west cells are not
(used to find gaps between words)
|
static boolean |
isBoundary(char c) |
boolean |
isBoundary(int x,
int y) |
boolean |
isBoundary(TextGrid.Cell cell) |
boolean |
isBullet(int x,
int y) |
boolean |
isBullet(TextGrid.Cell cell) |
boolean |
isColumnBlank(int x) |
boolean |
isCorner(int x,
int y) |
boolean |
isCorner(TextGrid.Cell cell) |
boolean |
isCorner1(TextGrid.Cell cell) |
boolean |
isCorner2(TextGrid.Cell cell) |
boolean |
isCorner3(TextGrid.Cell cell) |
boolean |
isCorner4(TextGrid.Cell cell) |
boolean |
isCross(TextGrid.Cell cell) |
boolean |
isCrossOnLine(TextGrid.Cell cell) |
boolean |
isEastArrowhead(TextGrid.Cell cell) |
boolean |
isHorizontalCrossOnLine(TextGrid.Cell cell) |
static boolean |
isHorizontalLine(char c) |
boolean |
isHorizontalLine(int x,
int y) |
boolean |
isHorizontalLine(TextGrid.Cell cell) |
boolean |
isHorizontalLinesEnd(TextGrid.Cell cell) |
boolean |
isHorizontalStarOnLine(TextGrid.Cell cell) |
boolean |
isIntersection(int x,
int y) |
boolean |
isIntersection(TextGrid.Cell cell) |
boolean |
isInverseK(TextGrid.Cell cell) |
boolean |
isInverseT(TextGrid.Cell cell) |
boolean |
isK(TextGrid.Cell cell) |
boolean |
isLine(TextGrid.Cell cell) |
boolean |
isLinesEnd(int x,
int y) |
boolean |
isLinesEnd(TextGrid.Cell cell)
Stubs are also considered end of lines
|
boolean |
isLoneDiagonal(TextGrid.Cell cell) |
boolean |
isNormalCorner(int x,
int y) |
boolean |
isNormalCorner(TextGrid.Cell cell) |
boolean |
isNorthArrowhead(TextGrid.Cell cell) |
boolean |
isOnHorizontalLine(TextGrid.Cell cell) |
boolean |
isOnVerticalLine(TextGrid.Cell cell) |
boolean |
isOutOfBounds(int x,
int y) |
boolean |
isOutOfBounds(TextGrid.Cell cell) |
boolean |
isPointCell(TextGrid.Cell cell) |
boolean |
isRoundCorner(int x,
int y) |
boolean |
isRoundCorner(TextGrid.Cell cell) |
boolean |
isSouthArrowhead(TextGrid.Cell cell) |
boolean |
isStarOnLine(TextGrid.Cell cell) |
boolean |
isStringsEnd(TextGrid.Cell cell)
true if the cell is not blank
but the next (east) is
|
boolean |
isStringsStart(TextGrid.Cell cell)
true if the cell is not blank
but the previous (west) is
|
boolean |
isStub(TextGrid.Cell cell)
A stub looks like that:
+- or -+ or + or + or /- or -/ or / (you get the point)
| | |
|
boolean |
isT(TextGrid.Cell cell) |
boolean |
isVerticalCrossOnLine(TextGrid.Cell cell) |
static boolean |
isVerticalLine(char c) |
boolean |
isVerticalLine(int x,
int y) |
boolean |
isVerticalLine(TextGrid.Cell cell) |
boolean |
isVerticalLinesEnd(TextGrid.Cell cell) |
boolean |
isVerticalStarOnLine(TextGrid.Cell cell) |
boolean |
isWestArrowhead(TextGrid.Cell cell) |
boolean |
loadFrom(String filename) |
boolean |
loadFrom(String filename,
ProcessingOptions options) |
static void |
main(String[] args) |
static TextGrid |
makeSameSizeAs(TextGrid grid) |
boolean |
matches(GridPattern criteria) |
boolean |
matchesAll(GridPatternGroup criteria) |
boolean |
matchesAny(GridPatternGroup criteria) |
boolean |
matchesAny(TextGrid.Cell cell,
GridPatternGroup criteria) |
int |
otherStringsEndInTheSameColumn(TextGrid.Cell cell) |
int |
otherStringsStartInTheSameColumn(TextGrid.Cell cell) |
void |
printDebug() |
void |
removeArrowheads() |
void |
removeBoundaries() |
void |
removeColorCodes() |
void |
removeMarkupTags() |
void |
removeNonText()
Makes blank all the cells that contain non-text
elements.
|
void |
replaceAll(char c1,
char c2)
Replace all occurences of c1 with c2
|
void |
replaceBullets() |
void |
replaceHumanColorCodes() |
void |
replacePointMarkersOnLine() |
void |
replaceTypeOnLine()
Replaces letters or numbers that are on horizontal or vertical
lines, with the appropriate character that will make the line
continuous (| for vertical and - for horizontal lines)
|
void |
set(int x,
int y,
char c) |
void |
set(TextGrid.Cell cell,
char c) |
void |
setRow(int y,
String row) |
void |
setRow(int y,
StringBuffer row) |
String |
toString() |
void |
writeStringTo(int x,
int y,
String str) |
void |
writeStringTo(TextGrid.Cell cell,
String str) |