Interface GetStatementOptional

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface GetStatementOptional
    Either supplies a statement matching the given pattern, or Optional.empty() otherwise.
    Author:
    Peter Ansell
    • Method Detail

      • get

        Optional<Statement> get​(Resource subject,
                                IRI predicate,
                                Value object,
                                Resource... contexts)
        Either supplies a statement matching the given pattern, or Optional.empty() otherwise.
        Parameters:
        subject - A Resource to be used to match to statements.
        predicate - An IRI to be used to match to statements.
        object - A Value to be used to match to statements.
        contexts - An array of context Resource objects, or left out (not null) to select from all contexts.
        Returns:
        An Optional either containing a single statement matching the pattern or Optional.empty() otherwise.