Package org.basex.query.value
Class ValueBuilder
java.lang.Object
org.basex.query.value.ValueBuilder
- Author:
- BaseX Team 2005-21, BSD License, Leo Woerteler
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.ValueBuilder(QueryContext qc, Item item1, Item item2) Constructor with initial items. -
Method Summary
Modifier and TypeMethodDescriptionAppends an item to the built value.Appends a value to the built value.Adds an item to the front of the built value.static Valueconcat(Value value1, Value value2, QueryContext qc) Concatenates two values.toString()value()Returns aValuerepresentation of the items currently stored in this builder.Returns aValuerepresentation of the items currently stored in this builder annotated with the type of the given expression.Returns aValuerepresentation of the items currently stored in this builder annotated with the given item type.
-
Constructor Details
-
ValueBuilder
Constructor.- Parameters:
qc- query context (required for interrupting running queries)
-
ValueBuilder
Constructor with initial items.- Parameters:
qc- query context (required for interrupting running queries)item1- first item to appenditem2- second item to append
-
-
Method Details
-
concat
Concatenates two values.- Parameters:
value1- first value to concatenatevalue2- second value to concatenateqc- query context- Returns:
- concatenated values
-
addFront
Adds an item to the front of the built value.- Parameters:
item- item to add- Returns:
- reference to this builder for convenience
-
add
Appends an item to the built value.- Parameters:
item- item to append- Returns:
- reference to this builder for convenience
-
add
Appends a value to the built value.- Parameters:
value- value to append- Returns:
- reference to this builder for convenience
-
value
Returns aValuerepresentation of the items currently stored in this builder.- Returns:
- value
-
value
Returns aValuerepresentation of the items currently stored in this builder annotated with the given item type.- Parameters:
type- type (can benull, only considered if new sequence is created)- Returns:
- value
-
value
Returns aValuerepresentation of the items currently stored in this builder annotated with the type of the given expression.- Parameters:
expr- expression that created the value (can benull)- Returns:
- value
-
toString
-