Class QueryElementCollection<T extends QueryElement>
- java.lang.Object
-
- org.eclipse.rdf4j.sparqlbuilder.core.QueryElementCollection<T>
-
- Type Parameters:
T
- the type ofQueryElement
s in the collection
- All Implemented Interfaces:
QueryElement
- Direct Known Subclasses:
Projection
,RdfPredicateObjectListCollection
,StandardQueryElementCollection
public abstract class QueryElementCollection<T extends QueryElement> extends Object implements QueryElement
A logical collection of query elements. Provides common functionality for elements which are collections of other elements, especially in printing. Would have loved to have avoided making this public.
-
-
Field Summary
Fields Modifier and Type Field Description protected Collection<T>
elements
-
Constructor Summary
Constructors Modifier Constructor Description protected
QueryElementCollection()
protected
QueryElementCollection(String delimiter)
protected
QueryElementCollection(String delimiter, Collection<T> elements)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <O> void
addElements(Function<? super O,? extends T> mapper, O... os)
protected void
addElements(T... queryElements)
String
getQueryString()
boolean
isEmpty()
-
-
-
Field Detail
-
elements
protected Collection<T extends QueryElement> elements
-
-
Constructor Detail
-
QueryElementCollection
protected QueryElementCollection()
-
QueryElementCollection
protected QueryElementCollection(String delimiter)
-
QueryElementCollection
protected QueryElementCollection(String delimiter, Collection<T> elements)
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Returns:
- if this collection is empty
-
addElements
protected void addElements(T... queryElements)
-
getQueryString
public String getQueryString()
- Specified by:
getQueryString
in interfaceQueryElement
- Returns:
- the String representing the SPARQL syntax of this element
-
-