objects property

Set<RdfObject> get objects

Get all unique objects (values) in this graph

Returns a set containing all object resources and literals that appear as the object component of any triple in this graph. This includes both IRI resources and literal values.

Returns: An unmodifiable set of all objects in the graph. The set may be empty if the graph contains no triples.

Example:

// Find all values used in the graph
final allValues = graph.objects;
print('Graph contains ${allValues.length} different values');

// Filter for literal values only
final literals = allValues.whereType<LiteralTerm>();
print('Found ${literals.length} literal values');

Implementation

Set<RdfObject> get objects => _triples.map((triple) => triple.object).toSet();