Class DataQuery
java.lang.Object
org.spongepowered.api.data.persistence.DataQuery
Represents a query that can be done on views. Queries do not depend on
 their separator, it is just a way to construct them.
- 
Method SummaryModifier and TypeMethodDescriptionasString(char separator) Gets this query as a string separated by the given separator character.Gets this query as a string separated by the given separator.booleanvoidinthashCode()iterator()last()Gets the last entry of thisDataQuery.static DataQueryof()Gets an emptyDataQuery.static DataQueryConstructs a query using the given separator character and path.static DataQueryConstructs a query using the given parts.static DataQueryConstructs a query using the given parts.parts()Gets the parts that make up this query.pop()Returns aDataQuerywhere the last node is "popped" off.popFirst()Returns aDataQuerywhere the first node is "popped" off.Returns the parts of this query as individual queries.Returns a new query that is made up of this query's parts followed by the given query.Returns a new query that is made up of this query's parts followed by the given query's parts.toString()
- 
Method Details- 
ofGets an emptyDataQuery. This query is constant and never changes and therefor can be called multiple times returning the same instance.- Returns:
- An empty data query
 
- 
ofConstructs a query using the given separator character and path.As an example, new DataQuery('/', "a/b/c")andnew DataQuery('.', "a.b.c")represent the same path but are constructed using different separators.- Parameters:
- separator- The separator
- path- The path
- Returns:
- The newly constructed DataQuery
 
- 
ofConstructs a query using the given parts.- Parameters:
- parts- The parts
- Returns:
- The newly constructed DataQuery
 
- 
ofConstructs a query using the given parts.- Parameters:
- parts- The parts
- Returns:
- The newly constructed DataQuery
 
- 
partsGets the parts that make up this query. The returned list is immutable.- Returns:
- The parts of this query
 
- 
thenReturns a new query that is made up of this query's parts followed by the given query's parts.- Parameters:
- that- The given query to follow this one
- Returns:
- The constructed query
 
- 
thenReturns a new query that is made up of this query's parts followed by the given query.- Parameters:
- that- The given query to follow this one
- Returns:
- The constructed query
 
- 
queryPartsReturns the parts of this query as individual queries. The returned list is immutable.- Returns:
- The constructed queries
 
- 
popReturns aDataQuerywhere the last node is "popped" off. If this query is already the top level query, then theof()is returned.- Returns:
- The next level query
 
- 
popFirstReturns aDataQuerywhere the first node is "popped" off. If this query is already the top level query, then theof()is returned.- Returns:
- The next level query
 
- 
lastGets the last entry of thisDataQuery. If this query is a single entry query or an empty query, it returns itself.- Returns:
- The last entry as a data query, if not already last
 
- 
asStringGets this query as a string separated by the given separator.- Parameters:
- separator- The separator
- Returns:
- This query as a string
 
- 
asStringGets this query as a string separated by the given separator character.- Parameters:
- separator- The separator
- Returns:
- This query as a string
 
- 
toString
- 
hashCodepublic int hashCode()
- 
equals
- 
iterator
- 
forEach
- 
spliterator- Specified by:
- spliteratorin interface- Iterable<String>
 
 
-