T
- A TripleLike
type used by the graph methods, typically
Triple
or Quad
public interface GraphLike<T extends TripleLike>
TripleLike
statements.
Extended by Graph
(for Triple
) and Dataset
(for
Quad
).
Unlike Graph
and Dataset
, this interface can support
generalised TripleLike
or QuadLike
statements, but does not
imply semantics like size()
or the requirement of mapping
RDFTerm
instances from different implementations.
As TripleLike
do not have a specific Object.equals(Object)
semantics, the behaviour of methods like contains(TripleLike)
and
remove(TripleLike)
is undefined for arguments that are not object
identical to previously added or returned TripleLike
statements.
Graph
,
Dataset
,
TripleLike
Modifier and Type | Method and Description |
---|---|
void |
add(T statement)
Add a statement.
|
void |
clear()
Remove all statements.
|
boolean |
contains(T statement)
Check if statement is contained.
|
Iterable<T> |
iterate()
Iterate over contained statements.
|
void |
remove(T statement)
Add a statement.
|
long |
size()
Number of statements.
|
Stream<? extends T> |
stream()
Return a Stream of contained statements.
|
boolean contains(T statement)
statement
- The TripleLike
statement to checkvoid remove(T statement)
statement
- The TripleLike statement to addvoid clear()
long size()
Stream<? extends T> stream()
Stream
of TripleLike
statements.Iterable<T> iterate() throws ConcurrentModificationException, IllegalStateException
Iterable
of TripleLike
statements.IllegalStateException
- if the Iterable
has been reusedConcurrentModificationException
- if a concurrency conflict occurs while the Iterator is
active.Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.