diff --git a/src/main/java/walkingkooka/spreadsheet/engine/SpreadsheetCellQuery.java b/src/main/java/walkingkooka/spreadsheet/engine/SpreadsheetCellFindQuery.java
similarity index 86%
rename from src/main/java/walkingkooka/spreadsheet/engine/SpreadsheetCellQuery.java
rename to src/main/java/walkingkooka/spreadsheet/engine/SpreadsheetCellFindQuery.java
index b745365eb..261decc72 100644
--- a/src/main/java/walkingkooka/spreadsheet/engine/SpreadsheetCellQuery.java
+++ b/src/main/java/walkingkooka/spreadsheet/engine/SpreadsheetCellFindQuery.java
@@ -44,16 +44,16 @@
/**
* Captures the parameter values of a cell find.
*/
-public final class SpreadsheetCellQuery implements HasUrlFragment,
+public final class SpreadsheetCellFindQuery implements HasUrlFragment,
CanBeEmpty,
HasText {
/**
- * Parses the given text into a {@link SpreadsheetCellQuery}.
+ * Parses the given text into a {@link SpreadsheetCellFindQuery}.
*
* Note the query is not verified to be a valid expression syntically in any form.
*/
- public static SpreadsheetCellQuery parse(final String text) {
+ public static SpreadsheetCellFindQuery parse(final String text) {
Objects.requireNonNull(text, "text");
return extract(
@@ -65,9 +65,9 @@ public static SpreadsheetCellQuery parse(final String text) {
}
/**
- * Reads or extracts a {@link SpreadsheetCellQuery} from the parameters probably a {@link UrlQueryString}.
+ * Reads or extracts a {@link SpreadsheetCellFindQuery} from the parameters probably a {@link UrlQueryString}.
*/
- public static SpreadsheetCellQuery extract(final Map, ?> parameters) {
+ public static SpreadsheetCellFindQuery extract(final Map, ?> parameters) {
Objects.requireNonNull(parameters, "parameters");
return empty()
@@ -132,11 +132,11 @@ private static String invalidQueryParameterMessage(final String text,
return "Invalid " + parameter + "=" + CharSequences.quoteAndEscape(text);
}
- public static SpreadsheetCellQuery empty() {
+ public static SpreadsheetCellFindQuery empty() {
return EMPTY;
}
- private final static SpreadsheetCellQuery EMPTY = new SpreadsheetCellQuery(
+ private final static SpreadsheetCellFindQuery EMPTY = new SpreadsheetCellFindQuery(
Optional.empty(), // path
OptionalInt.empty(), // offset
OptionalInt.empty(), // max
@@ -145,11 +145,11 @@ public static SpreadsheetCellQuery empty() {
);
// VisibleForTesting
- SpreadsheetCellQuery(final Optional path,
- final OptionalInt offset,
- final OptionalInt max,
- final Optional valueType,
- final Optional query) {
+ SpreadsheetCellFindQuery(final Optional path,
+ final OptionalInt offset,
+ final OptionalInt max,
+ final Optional valueType,
+ final Optional query) {
this.path = path;
this.offset = offset;
this.max = max;
@@ -161,7 +161,7 @@ public Optional path() {
return this.path;
}
- public SpreadsheetCellQuery setPath(final Optional path) {
+ public SpreadsheetCellFindQuery setPath(final Optional path) {
Objects.requireNonNull(path, "path");
return this.path.equals(path) ?
@@ -181,7 +181,7 @@ public OptionalInt offset() {
return this.offset;
}
- public SpreadsheetCellQuery setOffset(final OptionalInt offset) {
+ public SpreadsheetCellFindQuery setOffset(final OptionalInt offset) {
Objects.requireNonNull(offset, "offset");
return this.offset.equals(offset) ?
@@ -201,7 +201,7 @@ public OptionalInt max() {
return this.max;
}
- public SpreadsheetCellQuery setMax(final OptionalInt max) {
+ public SpreadsheetCellFindQuery setMax(final OptionalInt max) {
Objects.requireNonNull(max, "max");
return this.max.equals(max) ?
@@ -221,7 +221,7 @@ public Optional valueType() {
return this.valueType;
}
- public SpreadsheetCellQuery setValueType(final Optional valueType) {
+ public SpreadsheetCellFindQuery setValueType(final Optional valueType) {
Objects.requireNonNull(valueType, "valueType");
return this.valueType.equals(valueType) ?
@@ -241,7 +241,7 @@ public Optional query() {
return this.query;
}
- public SpreadsheetCellQuery setQuery(final Optional query) {
+ public SpreadsheetCellFindQuery setQuery(final Optional query) {
Objects.requireNonNull(query, "query");
return this.query.equals(query) ?
@@ -257,17 +257,17 @@ public SpreadsheetCellQuery setQuery(final Optional query) {
private final Optional query;
- private SpreadsheetCellQuery replace(final Optional path,
- final OptionalInt offset,
- final OptionalInt max,
- final Optional valueType,
- final Optional query) {
+ private SpreadsheetCellFindQuery replace(final Optional path,
+ final OptionalInt offset,
+ final OptionalInt max,
+ final Optional valueType,
+ final Optional query) {
return path.isPresent() ||
offset.isPresent() ||
max.isPresent() ||
valueType.isPresent() ||
query.isPresent() ?
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
path,
offset,
max,
@@ -473,10 +473,10 @@ public int hashCode() {
public boolean equals(final Object other) {
return this == other ||
- other instanceof SpreadsheetCellQuery && this.equals0((SpreadsheetCellQuery) other);
+ other instanceof SpreadsheetCellFindQuery && this.equals0((SpreadsheetCellFindQuery) other);
}
- private boolean equals0(final SpreadsheetCellQuery other) {
+ private boolean equals0(final SpreadsheetCellFindQuery other) {
return this.path.equals(other.path) &&
this.offset.equals(other.offset) &&
this.max.equals(other.max) &&
@@ -494,10 +494,10 @@ public String toString() {
static {
JsonNodeContext.register(
- JsonNodeContext.computeTypeName(SpreadsheetCellQuery.class),
- SpreadsheetCellQuery::unmarshall,
- SpreadsheetCellQuery::marshall,
- SpreadsheetCellQuery.class
+ JsonNodeContext.computeTypeName(SpreadsheetCellFindQuery.class),
+ SpreadsheetCellFindQuery::unmarshall,
+ SpreadsheetCellFindQuery::marshall,
+ SpreadsheetCellFindQuery.class
);
}
@@ -505,8 +505,8 @@ private JsonNode marshall(final JsonNodeMarshallContext context) {
return context.marshall(this.text());
}
- static SpreadsheetCellQuery unmarshall(final JsonNode node,
- final JsonNodeUnmarshallContext context) {
+ static SpreadsheetCellFindQuery unmarshall(final JsonNode node,
+ final JsonNodeUnmarshallContext context) {
return parse(node.stringOrFail());
}
}
diff --git a/src/main/java/walkingkooka/spreadsheet/meta/FakeSpreadsheetMetadataVisitor.java b/src/main/java/walkingkooka/spreadsheet/meta/FakeSpreadsheetMetadataVisitor.java
index d58adedd2..6868a5ecc 100644
--- a/src/main/java/walkingkooka/spreadsheet/meta/FakeSpreadsheetMetadataVisitor.java
+++ b/src/main/java/walkingkooka/spreadsheet/meta/FakeSpreadsheetMetadataVisitor.java
@@ -25,7 +25,7 @@
import walkingkooka.spreadsheet.SpreadsheetName;
import walkingkooka.spreadsheet.compare.SpreadsheetComparatorAliasSet;
import walkingkooka.spreadsheet.compare.SpreadsheetComparatorNameList;
-import walkingkooka.spreadsheet.engine.SpreadsheetCellQuery;
+import walkingkooka.spreadsheet.engine.SpreadsheetCellFindQuery;
import walkingkooka.spreadsheet.export.SpreadsheetExporterAliasSet;
import walkingkooka.spreadsheet.format.SpreadsheetColorName;
import walkingkooka.spreadsheet.format.SpreadsheetFormatterAliasSet;
@@ -177,7 +177,7 @@ protected void visitFindFunctions(final ExpressionFunctionAliasSet aliases) {
}
@Override
- protected void visitFindQuery(final SpreadsheetCellQuery query) {
+ protected void visitFindQuery(final SpreadsheetCellFindQuery query) {
throw new UnsupportedOperationException();
}
diff --git a/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyName.java b/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyName.java
index a116f6750..e8519b5b2 100644
--- a/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyName.java
+++ b/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyName.java
@@ -33,7 +33,7 @@
import walkingkooka.spreadsheet.compare.SpreadsheetComparatorAliasSet;
import walkingkooka.spreadsheet.compare.SpreadsheetComparatorName;
import walkingkooka.spreadsheet.compare.SpreadsheetComparatorNameList;
-import walkingkooka.spreadsheet.engine.SpreadsheetCellQuery;
+import walkingkooka.spreadsheet.engine.SpreadsheetCellFindQuery;
import walkingkooka.spreadsheet.export.SpreadsheetExporterAliasSet;
import walkingkooka.spreadsheet.export.SpreadsheetExporterName;
import walkingkooka.spreadsheet.export.SpreadsheetExporterSelector;
@@ -208,9 +208,9 @@ private static SpreadsheetMetadataPropertyName registerConstant(final Spr
public static final SpreadsheetMetadataPropertyName FIND_HIGHLIGHTING = registerConstant(SpreadsheetMetadataPropertyNameBooleanFindHighlighting.instance());
/**
- * A {@link SpreadsheetMetadataPropertyName} holding the find-query {@link SpreadsheetCellQuery}
+ * A {@link SpreadsheetMetadataPropertyName} holding the find-query {@link SpreadsheetCellFindQuery}
*/
- public static final SpreadsheetMetadataPropertyName FIND_QUERY = registerConstant(SpreadsheetMetadataPropertyNameFindQuery.instance());
+ public static final SpreadsheetMetadataPropertyName FIND_QUERY = registerConstant(SpreadsheetMetadataPropertyNameFindQuery.instance());
/**
* A {@link SpreadsheetMetadataPropertyName} holding the {@link ConverterSelector}
which will be used to convert values during a formatting of values.
@@ -779,7 +779,7 @@ static SpreadsheetMetadataPropertyName> unmarshallName(final JsonNode node) {
ExpressionFunctionAliasSet.parse("hello");
FontFamily.with("MS Sans Serif");
FontSize.with(1);
- SpreadsheetCellQuery.empty();
+ SpreadsheetCellFindQuery.empty();
SpreadsheetComparatorNameList.parse(
SpreadsheetComparatorName.TEXT.toString()
);
diff --git a/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyNameFindQuery.java b/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyNameFindQuery.java
index 8648d484c..8ec352283 100644
--- a/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyNameFindQuery.java
+++ b/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyNameFindQuery.java
@@ -18,15 +18,15 @@
package walkingkooka.spreadsheet.meta;
-import walkingkooka.spreadsheet.engine.SpreadsheetCellQuery;
+import walkingkooka.spreadsheet.engine.SpreadsheetCellFindQuery;
import java.util.Locale;
import java.util.Optional;
/**
- * Holds the {@link SpreadsheetCellQuery}
+ * Holds the {@link SpreadsheetCellFindQuery}
*/
-final class SpreadsheetMetadataPropertyNameFindQuery extends SpreadsheetMetadataPropertyName {
+final class SpreadsheetMetadataPropertyNameFindQuery extends SpreadsheetMetadataPropertyName {
/**
* Singleton
@@ -43,31 +43,31 @@ private SpreadsheetMetadataPropertyNameFindQuery() {
}
/**
- * After checking the type force the {@link SpreadsheetCellQuery}
+ * After checking the type force the {@link SpreadsheetCellFindQuery}
*/
@Override
- SpreadsheetCellQuery checkValue0(final Object value) {
+ SpreadsheetCellFindQuery checkValue0(final Object value) {
return this.checkValueType(value,
- v -> v instanceof SpreadsheetCellQuery);
+ v -> v instanceof SpreadsheetCellFindQuery);
}
@Override
String expected() {
- return SpreadsheetCellQuery.class.getSimpleName();
+ return SpreadsheetCellFindQuery.class.getSimpleName();
}
@Override
- Optional extractLocaleAwareValue(final Locale locale) {
+ Optional extractLocaleAwareValue(final Locale locale) {
return Optional.empty();
}
@Override
- Class type() {
- return SpreadsheetCellQuery.class;
+ Class type() {
+ return SpreadsheetCellFindQuery.class;
}
@Override
- void accept(final SpreadsheetCellQuery value,
+ void accept(final SpreadsheetCellFindQuery value,
final SpreadsheetMetadataVisitor visitor) {
visitor.visitFindQuery(value);
}
@@ -75,7 +75,7 @@ void accept(final SpreadsheetCellQuery value,
// parseUrlFragmentSaveValue........................................................................................
@Override
- public SpreadsheetCellQuery parseUrlFragmentSaveValue0(final String value) {
+ public SpreadsheetCellFindQuery parseUrlFragmentSaveValue0(final String value) {
return this.failParseUrlFragmentSaveValueUnsupported();
}
}
diff --git a/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataVisitor.java b/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataVisitor.java
index dfa9038f7..2110123d7 100644
--- a/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataVisitor.java
+++ b/src/main/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataVisitor.java
@@ -26,7 +26,7 @@
import walkingkooka.spreadsheet.SpreadsheetName;
import walkingkooka.spreadsheet.compare.SpreadsheetComparatorAliasSet;
import walkingkooka.spreadsheet.compare.SpreadsheetComparatorNameList;
-import walkingkooka.spreadsheet.engine.SpreadsheetCellQuery;
+import walkingkooka.spreadsheet.engine.SpreadsheetCellFindQuery;
import walkingkooka.spreadsheet.export.SpreadsheetExporterAliasSet;
import walkingkooka.spreadsheet.format.SpreadsheetColorName;
import walkingkooka.spreadsheet.format.SpreadsheetFormatterAliasSet;
@@ -181,7 +181,7 @@ protected void visitFindFunctions(final ExpressionFunctionAliasSet aliases) {
// nop
}
- protected void visitFindQuery(final SpreadsheetCellQuery query) {
+ protected void visitFindQuery(final SpreadsheetCellFindQuery query) {
// nop
}
diff --git a/src/test/java/walkingkooka/spreadsheet/engine/SpreadsheetCellQueryTest.java b/src/test/java/walkingkooka/spreadsheet/engine/SpreadsheetCellFindQueryTest.java
similarity index 84%
rename from src/test/java/walkingkooka/spreadsheet/engine/SpreadsheetCellQueryTest.java
rename to src/test/java/walkingkooka/spreadsheet/engine/SpreadsheetCellFindQueryTest.java
index 6066ab926..a98ea94d5 100644
--- a/src/test/java/walkingkooka/spreadsheet/engine/SpreadsheetCellQueryTest.java
+++ b/src/test/java/walkingkooka/spreadsheet/engine/SpreadsheetCellFindQueryTest.java
@@ -51,13 +51,13 @@
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertThrows;
-public final class SpreadsheetCellQueryTest implements HasUrlFragmentTesting,
+public final class SpreadsheetCellFindQueryTest implements HasUrlFragmentTesting,
CanBeEmptyTesting,
HasTextTesting,
- HashCodeEqualsDefinedTesting2,
- ToStringTesting,
- ParseStringTesting,
- JsonNodeMarshallingTesting {
+ HashCodeEqualsDefinedTesting2,
+ ToStringTesting,
+ ParseStringTesting,
+ JsonNodeMarshallingTesting {
private final static Optional PATH = Optional.of(
SpreadsheetCellRangeReferencePath.LRTD
@@ -75,8 +75,8 @@ public final class SpreadsheetCellQueryTest implements HasUrlFragmentTesting,
@Test
public void testEmpty() {
this.checkEquals(
- SpreadsheetCellQuery.empty(),
- new SpreadsheetCellQuery(
+ SpreadsheetCellFindQuery.empty(),
+ new SpreadsheetCellFindQuery(
Optional.empty(),
OptionalInt.empty(),
OptionalInt.empty(),
@@ -92,14 +92,14 @@ public void testEmpty() {
public void testSetPathNullFails() {
assertThrows(
NullPointerException.class,
- () -> SpreadsheetCellQuery.empty()
+ () -> SpreadsheetCellFindQuery.empty()
.setPath(null)
);
}
@Test
public void testSetPathSame() {
- final SpreadsheetCellQuery find = SpreadsheetCellQuery.empty();
+ final SpreadsheetCellFindQuery find = SpreadsheetCellFindQuery.empty();
assertSame(
find,
find.setPath(find.path())
@@ -108,13 +108,13 @@ public void testSetPathSame() {
@Test
public void testSetPathDifferent() {
- final SpreadsheetCellQuery find = SpreadsheetCellQuery.empty();
+ final SpreadsheetCellFindQuery find = SpreadsheetCellFindQuery.empty();
final Optional path = Optional.of(
SpreadsheetCellRangeReferencePath.RLTD
);
this.checkNotEquals(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
path,
OFFSET,
MAX,
@@ -131,14 +131,14 @@ public void testSetPathDifferent() {
public void testSetOffsetNullFails() {
assertThrows(
NullPointerException.class,
- () -> SpreadsheetCellQuery.empty()
+ () -> SpreadsheetCellFindQuery.empty()
.setOffset(null)
);
}
@Test
public void testSetOffsetSame() {
- final SpreadsheetCellQuery find = SpreadsheetCellQuery.empty();
+ final SpreadsheetCellFindQuery find = SpreadsheetCellFindQuery.empty();
assertSame(
find,
find.setOffset(find.max())
@@ -147,13 +147,13 @@ public void testSetOffsetSame() {
@Test
public void testSetOffsetDifferent() {
- final SpreadsheetCellQuery find = SpreadsheetCellQuery.empty();
+ final SpreadsheetCellFindQuery find = SpreadsheetCellFindQuery.empty();
final OptionalInt offset = OptionalInt.of(
999
);
this.checkNotEquals(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
PATH,
offset,
MAX,
@@ -170,14 +170,14 @@ public void testSetOffsetDifferent() {
public void testSetMaxNullFails() {
assertThrows(
NullPointerException.class,
- () -> SpreadsheetCellQuery.empty()
+ () -> SpreadsheetCellFindQuery.empty()
.setMax(null)
);
}
@Test
public void testSetMaxSame() {
- final SpreadsheetCellQuery find = SpreadsheetCellQuery.empty();
+ final SpreadsheetCellFindQuery find = SpreadsheetCellFindQuery.empty();
assertSame(
find,
find.setMax(find.max())
@@ -186,13 +186,13 @@ public void testSetMaxSame() {
@Test
public void testSetMaxDifferent() {
- final SpreadsheetCellQuery find = SpreadsheetCellQuery.empty();
+ final SpreadsheetCellFindQuery find = SpreadsheetCellFindQuery.empty();
final OptionalInt max = OptionalInt.of(
999
);
this.checkNotEquals(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
PATH,
OFFSET,
max,
@@ -209,14 +209,14 @@ public void testSetMaxDifferent() {
public void testSetValueTypeNullFails() {
assertThrows(
NullPointerException.class,
- () -> SpreadsheetCellQuery.empty()
+ () -> SpreadsheetCellFindQuery.empty()
.setValueType(null)
);
}
@Test
public void testSetValueTypeSame() {
- final SpreadsheetCellQuery find = SpreadsheetCellQuery.empty();
+ final SpreadsheetCellFindQuery find = SpreadsheetCellFindQuery.empty();
assertSame(
find,
find.setValueType(find.valueType())
@@ -225,13 +225,13 @@ public void testSetValueTypeSame() {
@Test
public void testSetValueTypeDifferent() {
- final SpreadsheetCellQuery find = SpreadsheetCellQuery.empty();
+ final SpreadsheetCellFindQuery find = SpreadsheetCellFindQuery.empty();
final Optional valueType = Optional.of(
SpreadsheetValueType.TEXT
);
this.checkNotEquals(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
PATH,
OFFSET,
MAX,
@@ -248,14 +248,14 @@ public void testSetValueTypeDifferent() {
public void testSetQueryNullFails() {
assertThrows(
NullPointerException.class,
- () -> SpreadsheetCellQuery.empty()
+ () -> SpreadsheetCellFindQuery.empty()
.setQuery(null)
);
}
@Test
public void testSetQuerySame() {
- final SpreadsheetCellQuery find = SpreadsheetCellQuery.empty();
+ final SpreadsheetCellFindQuery find = SpreadsheetCellFindQuery.empty();
assertSame(
find,
find.setQuery(find.query())
@@ -264,13 +264,13 @@ public void testSetQuerySame() {
@Test
public void testSetQueryDifferent() {
- final SpreadsheetCellQuery find = SpreadsheetCellQuery.empty();
+ final SpreadsheetCellFindQuery find = SpreadsheetCellFindQuery.empty();
final Optional query = Optional.of(
"different123"
);
this.checkNotEquals(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
PATH,
OFFSET,
MAX,
@@ -286,7 +286,7 @@ public void testSetQueryDifferent() {
@Test
public void testSetUntilEmpty() {
assertSame(
- SpreadsheetCellQuery.empty(),
+ SpreadsheetCellFindQuery.empty(),
this.createObject()
.setPath(Optional.empty())
.setOffset(OptionalInt.empty())
@@ -302,7 +302,7 @@ public void testSetUntilEmpty() {
public void testIsEmptyWhenEmpty() {
this.checkEquals(
true,
- SpreadsheetCellQuery.empty().isEmpty()
+ SpreadsheetCellFindQuery.empty().isEmpty()
);
}
@@ -320,7 +320,7 @@ public void testIsEmptyWhenNotEmpty() {
@Test
public void testToUrlQueryStringPath() {
this.toUrlQueryStringAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setPath(PATH),
"cell-range-path=lrtd"
);
@@ -329,7 +329,7 @@ public void testToUrlQueryStringPath() {
@Test
public void testToUrlQueryStringOffset() {
this.toUrlQueryStringAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setOffset(OFFSET),
"offset=123"
);
@@ -338,7 +338,7 @@ public void testToUrlQueryStringOffset() {
@Test
public void testToUrlQueryStringMax() {
this.toUrlQueryStringAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setMax(MAX),
"max=456"
);
@@ -347,7 +347,7 @@ public void testToUrlQueryStringMax() {
@Test
public void testToUrlQueryStringValueType() {
this.toUrlQueryStringAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setValueType(
Optional.of(
SpreadsheetValueType.NUMBER)
@@ -359,7 +359,7 @@ public void testToUrlQueryStringValueType() {
@Test
public void testToUrlQueryStringQuery() {
this.toUrlQueryStringAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setQuery(QUERY),
"query=%3D789%2Bblah%28%29"
);
@@ -368,7 +368,7 @@ public void testToUrlQueryStringQuery() {
@Test
public void testToUrlQueryStringAllParameters() {
this.toUrlQueryStringAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setPath(PATH)
.setOffset(OFFSET)
.setMax(MAX)
@@ -378,7 +378,7 @@ public void testToUrlQueryStringAllParameters() {
);
}
- private void toUrlQueryStringAndCheck(final SpreadsheetCellQuery find,
+ private void toUrlQueryStringAndCheck(final SpreadsheetCellFindQuery find,
final String expected) {
this.toUrlQueryStringAndCheck(
find,
@@ -386,7 +386,7 @@ private void toUrlQueryStringAndCheck(final SpreadsheetCellQuery find,
);
}
- private void toUrlQueryStringAndCheck(final SpreadsheetCellQuery find,
+ private void toUrlQueryStringAndCheck(final SpreadsheetCellFindQuery find,
final UrlQueryString expected) {
this.checkEquals(
expected,
@@ -464,7 +464,7 @@ public void testParseInvalidOffsetFails3() {
public void testParseEmpty() {
this.parseStringAndCheck(
"",
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
);
}
@@ -480,7 +480,7 @@ public void testParse() {
public void testParseCellRangePath() {
this.parseStringAndCheck(
"cell-range-path=lrtd",
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setPath(PATH)
);
}
@@ -489,7 +489,7 @@ public void testParseCellRangePath() {
public void testParseIncludesInvalidQuery() {
this.parseStringAndCheck(
"cell-range-path=lrtd&query=XYZ",
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setPath(PATH)
.setQuery(
Optional.of("XYZ")
@@ -498,8 +498,8 @@ public void testParseIncludesInvalidQuery() {
}
@Override
- public SpreadsheetCellQuery parseString(final String text) {
- return SpreadsheetCellQuery.parse(text);
+ public SpreadsheetCellFindQuery parseString(final String text) {
+ return SpreadsheetCellFindQuery.parse(text);
}
@Override
@@ -518,7 +518,7 @@ public RuntimeException parseStringFailedExpected(final RuntimeException thrown)
public void testExtractWithNullFails() {
assertThrows(
NullPointerException.class,
- () -> SpreadsheetCellQuery.extract(null)
+ () -> SpreadsheetCellFindQuery.extract(null)
);
}
@@ -526,7 +526,7 @@ public void testExtractWithNullFails() {
public void testExtractCellRangePath() {
this.extractAndCheck(
"cell-range-path=lrtd",
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setPath(PATH)
);
}
@@ -535,7 +535,7 @@ public void testExtractCellRangePath() {
public void testExtractIncludesInvalidQuery() {
this.extractAndCheck(
"cell-range-path=lrtd&query=XYZ",
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setPath(PATH)
.setQuery(
Optional.of("XYZ")
@@ -552,7 +552,7 @@ public void testExtract() {
}
private void extractAndCheck(final String text,
- final SpreadsheetCellQuery expected) {
+ final SpreadsheetCellFindQuery expected) {
this.extractAndCheck0(
Cast.to(
UrlQueryString.parse(text)
@@ -578,10 +578,10 @@ public void testExtractFromRequest() {
}
private void extractAndCheck0(final Map, ?> parameters,
- final SpreadsheetCellQuery expected) {
+ final SpreadsheetCellFindQuery expected) {
this.checkEquals(
expected,
- SpreadsheetCellQuery.extract(
+ SpreadsheetCellFindQuery.extract(
parameters
)
);
@@ -600,7 +600,7 @@ public void testQueryToExpressionNullContextFails() {
@Test
public void testQueryToExpressionWhenEmpty() {
this.queryToExpressionAndCheck(
- SpreadsheetCellQuery.empty(),
+ SpreadsheetCellFindQuery.empty(),
SpreadsheetEngineContexts.fake(),
Optional.empty()
);
@@ -618,7 +618,7 @@ public void testQueryToExpressionWhenPresent() {
);
this.queryToExpressionAndCheck(
- SpreadsheetCellQuery.parse("query=" + query),
+ SpreadsheetCellFindQuery.parse("query=" + query),
new FakeSpreadsheetEngineContext() {
@Override
public SpreadsheetParserToken parseFormula(final TextCursor formula) {
@@ -647,7 +647,7 @@ public Optional toExpression(final SpreadsheetParserToken t) {
);
}
- private void queryToExpressionAndCheck(final SpreadsheetCellQuery find,
+ private void queryToExpressionAndCheck(final SpreadsheetCellFindQuery find,
final SpreadsheetEngineContext context,
final Optional expected) {
this.checkEquals(
@@ -662,7 +662,7 @@ private void queryToExpressionAndCheck(final SpreadsheetCellQuery find,
@Test
public void testEqualsDifferentPath() {
this.checkNotEquals(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
Optional.of(
SpreadsheetCellRangeReferencePath.BULR
),
@@ -677,7 +677,7 @@ public void testEqualsDifferentPath() {
@Test
public void testEqualsDifferentOffset() {
this.checkNotEquals(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
PATH,
OptionalInt.of(999),
MAX,
@@ -690,7 +690,7 @@ public void testEqualsDifferentOffset() {
@Test
public void testEqualsDifferentMax() {
this.checkNotEquals(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
PATH,
OFFSET,
OptionalInt.of(9999),
@@ -703,7 +703,7 @@ public void testEqualsDifferentMax() {
@Test
public void testEqualsDifferentValueType() {
this.checkNotEquals(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
PATH,
OFFSET,
MAX,
@@ -716,7 +716,7 @@ public void testEqualsDifferentValueType() {
@Test
public void testEqualsDifferentQuery() {
this.checkNotEquals(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
PATH,
OFFSET,
MAX,
@@ -731,7 +731,7 @@ public void testEqualsDifferentQuery() {
@Test
public void testUrlFragmentPath() {
this.urlFragmentAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setPath(
Optional.of(SpreadsheetCellRangeReferencePath.BULR)
),
@@ -742,7 +742,7 @@ public void testUrlFragmentPath() {
@Test
public void testUrlFragmentOffset() {
this.urlFragmentAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setOffset(
OptionalInt.of(123)
),
@@ -753,7 +753,7 @@ public void testUrlFragmentOffset() {
@Test
public void testUrlFragmentMax() {
this.urlFragmentAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setMax(
OptionalInt.of(456)
),
@@ -764,7 +764,7 @@ public void testUrlFragmentMax() {
@Test
public void testUrlFragmentValueType() {
this.urlFragmentAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setValueType(
Optional.of(SpreadsheetValueType.NUMBER)
),
@@ -775,7 +775,7 @@ public void testUrlFragmentValueType() {
@Test
public void testUrlFragmentQuery() {
this.urlFragmentAndCheck(
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setQuery(
Optional.of("query123")
),
@@ -796,7 +796,7 @@ public void testUrlFragmentAll() {
@Test
public void testToStringEmpty() {
this.toStringAndCheck(
- SpreadsheetCellQuery.empty(),
+ SpreadsheetCellFindQuery.empty(),
""
);
}
@@ -804,7 +804,7 @@ public void testToStringEmpty() {
@Test
public void testToStringNonEmpty() {
this.toStringAndCheck(
- new SpreadsheetCellQuery(
+ new SpreadsheetCellFindQuery(
Optional.of(SpreadsheetCellRangeReferencePath.BULR),
OptionalInt.of(123), // offset
OptionalInt.of(456), // max
@@ -818,30 +818,30 @@ public void testToStringNonEmpty() {
// json.............................................................................................................
@Override
- public SpreadsheetCellQuery unmarshall(final JsonNode json,
- final JsonNodeUnmarshallContext context) {
- return SpreadsheetCellQuery.unmarshall(
+ public SpreadsheetCellFindQuery unmarshall(final JsonNode json,
+ final JsonNodeUnmarshallContext context) {
+ return SpreadsheetCellFindQuery.unmarshall(
json,
context
);
}
@Override
- public SpreadsheetCellQuery createJsonNodeMarshallingValue() {
+ public SpreadsheetCellFindQuery createJsonNodeMarshallingValue() {
return this.createObject();
}
// ClassTesting.....................................................................................................
@Override
- public Class type() {
- return SpreadsheetCellQuery.class;
+ public Class type() {
+ return SpreadsheetCellFindQuery.class;
}
// Object...........................................................................................................
- public SpreadsheetCellQuery createObject() {
- return new SpreadsheetCellQuery(
+ public SpreadsheetCellFindQuery createObject() {
+ return new SpreadsheetCellFindQuery(
PATH,
OFFSET,
MAX,
diff --git a/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataNonEmptyTest.java b/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataNonEmptyTest.java
index 4e7bb738b..3c70fbbce 100644
--- a/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataNonEmptyTest.java
+++ b/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataNonEmptyTest.java
@@ -46,7 +46,7 @@
import walkingkooka.spreadsheet.convert.SpreadsheetConverterContext;
import walkingkooka.spreadsheet.convert.SpreadsheetConverterContexts;
import walkingkooka.spreadsheet.convert.SpreadsheetConvertersConverterProviders;
-import walkingkooka.spreadsheet.engine.SpreadsheetCellQuery;
+import walkingkooka.spreadsheet.engine.SpreadsheetCellFindQuery;
import walkingkooka.spreadsheet.export.SpreadsheetExporterAliasSet;
import walkingkooka.spreadsheet.export.SpreadsheetExporterSelector;
import walkingkooka.spreadsheet.format.FakeSpreadsheetFormatterContext;
@@ -2747,7 +2747,7 @@ public void testMarshallRoundtrip() {
);
properties.put(
SpreadsheetMetadataPropertyName.FIND_QUERY,
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setQuery(Optional.of("help()"))
);
properties.put(
diff --git a/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyNameFindQueryTest.java b/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyNameFindQueryTest.java
index c38a97241..4e0acd313 100644
--- a/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyNameFindQueryTest.java
+++ b/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataPropertyNameFindQueryTest.java
@@ -18,7 +18,7 @@
package walkingkooka.spreadsheet.meta;
import org.junit.jupiter.api.Test;
-import walkingkooka.spreadsheet.engine.SpreadsheetCellQuery;
+import walkingkooka.spreadsheet.engine.SpreadsheetCellFindQuery;
import java.util.Locale;
import java.util.Optional;
@@ -26,13 +26,13 @@
public final class SpreadsheetMetadataPropertyNameFindQueryTest extends SpreadsheetMetadataPropertyNameTestCase<
SpreadsheetMetadataPropertyNameFindQuery,
- SpreadsheetCellQuery> {
+ SpreadsheetCellFindQuery> {
@Test
public void testCheckValueWithInvalidFails3() {
this.checkValueFails(
"invalid",
- "Expected SpreadsheetCellQuery, but got \"invalid\" for \"find-query\""
+ "Expected SpreadsheetCellFindQuery, but got \"invalid\" for \"find-query\""
);
}
@@ -55,14 +55,14 @@ SpreadsheetMetadataPropertyNameFindQuery createName() {
}
@Override
- SpreadsheetCellQuery propertyValue() {
- return SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery propertyValue() {
+ return SpreadsheetCellFindQuery.empty()
.setQuery(Optional.of("xyz"));
}
@Override
String propertyValueType() {
- return SpreadsheetCellQuery.class.getSimpleName();
+ return SpreadsheetCellFindQuery.class.getSimpleName();
}
// ClassTesting.....................................................................................................
diff --git a/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataVisitorTest.java b/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataVisitorTest.java
index 9a2b0ae1b..896a789cd 100644
--- a/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataVisitorTest.java
+++ b/src/test/java/walkingkooka/spreadsheet/meta/SpreadsheetMetadataVisitorTest.java
@@ -28,7 +28,7 @@
import walkingkooka.spreadsheet.SpreadsheetId;
import walkingkooka.spreadsheet.compare.SpreadsheetComparatorAliasSet;
import walkingkooka.spreadsheet.compare.SpreadsheetComparatorNameList;
-import walkingkooka.spreadsheet.engine.SpreadsheetCellQuery;
+import walkingkooka.spreadsheet.engine.SpreadsheetCellFindQuery;
import walkingkooka.spreadsheet.export.SpreadsheetExporterAliasSet;
import walkingkooka.spreadsheet.format.SpreadsheetColorName;
import walkingkooka.spreadsheet.format.SpreadsheetFormatterAliasSet;
@@ -350,12 +350,12 @@ protected void visitFindHighlighting(final boolean b) {
public void testVisitFindQuery() {
new TestSpreadsheetMetadataVisitor() {
@Override
- protected void visitFindQuery(final SpreadsheetCellQuery q) {
+ protected void visitFindQuery(final SpreadsheetCellFindQuery q) {
this.visited = q;
}
}.accept(
SpreadsheetMetadataPropertyName.FIND_QUERY,
- SpreadsheetCellQuery.empty()
+ SpreadsheetCellFindQuery.empty()
.setPath(
Optional.of(SpreadsheetCellRangeReferencePath.BULR)
)