Class SimpleTriple

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Value object
      The triple's object.
      private IRI predicate
      The triple's predicate.
      private Resource subject
      The triple's subject.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SimpleTriple​(Resource subject, IRI predicate, Value object)
      Creates a new Triple with the supplied subject, predicate and object.
    • Field Detail

      • subject

        private final Resource subject
        The triple's subject.
      • predicate

        private final IRI predicate
        The triple's predicate.
      • object

        private final Value object
        The triple's object.
    • Constructor Detail

      • SimpleTriple

        protected SimpleTriple​(Resource subject,
                               IRI predicate,
                               Value object)
        Creates a new Triple with the supplied subject, predicate and object.

        Note that creating SimpleStatement objects directly via this constructor is not the recommended approach. Instead, use an instance of ValueFactory to create new Triple objects.

        Parameters:
        subject - The triple's subject, must not be null.
        predicate - The triple's predicate, must not be null.
        object - The triple's object, must not be null.
        See Also:
        SimpleValueFactory.createTriple(Resource, IRI, Value)
    • Method Detail

      • getSubject

        public Resource getSubject()
        Description copied from interface: Triple
        Gets the subject of this triple.
        Returns:
        The triple's subject.
      • getPredicate

        public IRI getPredicate()
        Description copied from interface: Triple
        Gets the predicate of this triple.
        Returns:
        The triple's predicate.
      • getObject

        public Value getObject()
        Description copied from interface: Triple
        Gets the object of this triple.
        Returns:
        The triple's object.
      • equals

        public boolean equals​(java.lang.Object o)
        Description copied from interface: Triple
        Compares this triple to another object.
        Specified by:
        equals in interface Triple
        Overrides:
        equals in class AbstractTriple
        Parameters:
        o - the object to compare this triple to
        Returns:
        true if the other object is an instance of Triple and if their subjects, predicates and objects are equal; false otherwise