Class EdgeSegmentImpl<E extends DirectedEdge>

    • Constructor Detail

      • EdgeSegmentImpl

        protected EdgeSegmentImpl​(IdGroupingToken groupId,
                                  E parentEdge,
                                  boolean directionAb,
                                  Class<? extends EdgeSegment> idClazz)
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        parentEdge - parent edge of segment
        directionAb - direction of travel
        idClazz - custom id class to use
      • EdgeSegmentImpl

        protected EdgeSegmentImpl​(IdGroupingToken groupId,
                                  E parentEdge,
                                  boolean directionAb)
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        parentEdge - parent edge of segment
        directionAb - direction of travel
      • EdgeSegmentImpl

        protected EdgeSegmentImpl​(IdGroupingToken groupId,
                                  boolean directionAb)
        Constructor (without setting parent edge)
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        directionAb - direction of travel
      • EdgeSegmentImpl

        protected EdgeSegmentImpl​(EdgeSegmentImpl<E> edgeSegmentImpl,
                                  boolean deepCopy)
        Copy constructor
        Parameters:
        edgeSegmentImpl - to copy
        deepCopy - when true, create a deep copy, shallow copy otherwise
    • Method Detail

      • validate

        protected static final boolean validate​(EdgeSegment edgeSegment)
        Validate given edge segment on validity
        Parameters:
        edgeSegment - to validate
        Returns:
        true when valid, false when not
      • isDirectionAb

        public boolean isDirectionAb()
        check if edge segment runs from vertex a to b or b to a
        Specified by:
        isDirectionAb in interface EdgeSegment
        Returns:
        true when running from a to b, otherwise false
      • getParent

        public E getParent()
        Collect the parent edge of the segment
        Specified by:
        getParent in interface EdgeSegment
        Returns:
        parentEdge
      • setParent

        public void setParent​(DirectedEdge parentEdge)
        Set the parent edge
        Specified by:
        setParent in interface EdgeSegment
        Parameters:
        parentEdge - to set
      • removeParentEdge

        public void removeParentEdge()
        remove the parent edge from this edge segment
        Specified by:
        removeParentEdge in interface EdgeSegment
      • deepClone

        public EdgeSegmentImpl<E> deepClone()
        An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code
        Specified by:
        deepClone in interface EdgeSegment
        Specified by:
        deepClone in interface GraphEntity
        Specified by:
        deepClone in interface IdAble
        Specified by:
        deepClone in class GraphEntityImpl
        Returns:
        deep copy of entity
      • validate

        public boolean validate()
        validate the contents of this edge segment
        Specified by:
        validate in interface EdgeSegment
        Returns:
        true when valid, false otherwise