Class TripletPath<V,​E>

  • Type Parameters:
    V -
    E -

    public class TripletPath<V,​E>
    extends Object
    A path from triplets. A path is expected to be connected, hence for any consecutive triplets either of a triplet's subject or object matches either of its successor.
    Author:
    raven
    • Field Detail

      • start

        protected V start
      • end

        protected V end
    • Constructor Detail

      • TripletPath

        public TripletPath​(V start,
                           V end,
                           List<Triplet<V,​E>> triples)
    • Method Detail

      • getNodeSet

        public Set<V> getNodeSet()
      • getNode

        public V getNode​(int i)
      • isCycleFree

        public boolean isCycleFree()
        An rdf path is cycle free, if it contains each triple at most once
        Returns:
      • subPath

        public TripletPath<V,​E> subPath​(int fromIndex,
                                              int toIndex)
      • getStart

        public V getStart()
      • getEnd

        public V getEnd()
      • getLength

        public int getLength()
        Returns the number of triplets - NOT nodes
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object