Package org.apache.jena.mem
Class HashedTripleBunch
- All Implemented Interfaces:
TripleBunch
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jena.mem.HashCommon
HashCommon.NotifyEmpty
-
Field Summary
Fields inherited from class org.apache.jena.mem.HashCommon
capacity
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Addt
to the triples in this bunch.boolean
Answer true iff this TripleBunch contains a triple .equals tot
.boolean
Answer true iff this TripleBunch contains a triple with .sameValueAs subject, predicate, and object.int
Answer the current capacity of this HashedTripleBunch; for testing purposes only.iterator()
Answer an iterator over all the triples in this bunch.iterator
(HashCommon.NotifyEmpty container) Answer an iterator over all the triples in this bunch.void
Remove the objectkey
from this hash's keys if it is present (if it's absent, do nothing).int
size()
Answer the number of items currently in this TripleBunch.Methods inherited from class org.apache.jena.mem.HashCommon
getItemForTestingAt, keyIterator, keyIterator
-
Constructor Details
-
HashedTripleBunch
-
-
Method Details
-
contains
Description copied from interface:TripleBunch
Answer true iff this TripleBunch contains a triple .equals tot
.- Specified by:
contains
in interfaceTripleBunch
-
containsBySameValueAs
Description copied from interface:TripleBunch
Answer true iff this TripleBunch contains a triple with .sameValueAs subject, predicate, and object. (Typically this only matters for the object. For example, integer literals with different numbers of leading zeroes can be .sameValueAs but not .equals).- Specified by:
containsBySameValueAs
in interfaceTripleBunch
-
size
public int size()Answer the number of items currently in this TripleBunch.- Specified by:
size
in interfaceTripleBunch
- See Also:
-
currentCapacity
public int currentCapacity()Answer the current capacity of this HashedTripleBunch; for testing purposes only. [Note that the bunch is resized when it is more than half-occupied.] -
add
Description copied from interface:TripleBunch
Addt
to the triples in this bunch. Ift
is already a member, nothing happens. The bunch now .contains this triple.- Specified by:
add
in interfaceTripleBunch
-
remove
Description copied from class:HashCommon
Remove the objectkey
from this hash's keys if it is present (if it's absent, do nothing). If a key is removed, theremoveAssociatedValues
will be invoked. If a key is moved, themoveAssociatedValues
method will be called.- Specified by:
remove
in interfaceTripleBunch
- Overrides:
remove
in classHashCommon<Triple>
-
iterator
Description copied from interface:TripleBunch
Answer an iterator over all the triples in this bunch. It is unwise to .remove from this iterator. (It may become illegal.)- Specified by:
iterator
in interfaceTripleBunch
-
iterator
Description copied from interface:TripleBunch
Answer an iterator over all the triples in this bunch. If use of .remove on this iterator empties the bunch, theemptied
method ofcontainer
is invoked.- Specified by:
iterator
in interfaceTripleBunch
-