Class SGraphPoint

    • Constructor Detail

      • SGraphPoint

        SGraphPoint​(SGraph graph1)
        Constructor.
        Parameters:
        graph1 - is the graph in which the connection is.
    • Method Detail

      • clear

        void clear()
        Clear the connection.
      • add

        void add​(Iterable<SGraphSegment> segments)
        Add the given segments in the connection.
        Parameters:
        segments - the segments to add.
      • add

        void add​(SGraphSegment segment)
        Add the given segment in the connection.
        Parameters:
        segment - the segment to add.
      • remove

        void remove​(SGraphSegment segment)
        Remove the given segment from the connection.
        Parameters:
        segment - the segment to remove.
      • getGraph

        @Pure
        public SGraph getGraph()
        Replies the graph in which this connection is.
        Returns:
        the graph in which this connection is.
      • isConnectedSegment

        @Pure
        public boolean isConnectedSegment​(SGraphSegment segment)
        Description copied from interface: GraphPoint
        Replies if the specified segment was connected to this point.
        Specified by:
        isConnectedSegment in interface GraphPoint<SGraphPoint,​SGraphSegment>
        Parameters:
        segment - the starting point.
        Returns:
        true if the given segment is connected to this node, otherwise false
      • isFinalConnectionPoint

        @Pure
        public boolean isFinalConnectionPoint()
        Description copied from interface: GraphPoint
        Replies if this point is a final connection point ie, a point connected to only one segment.
        Specified by:
        isFinalConnectionPoint in interface GraphPoint<SGraphPoint,​SGraphSegment>
        Returns:
        true if zero or one segment was connected to this point, otherwhise false
      • addUserData

        public boolean addUserData​(Object userData)
        Add a user data in the data associated to this point.
        Parameters:
        userData - the user data to add.
        Returns:
        true if the data was added; otherwise false.
      • removeUserData

        public boolean removeUserData​(Object userData)
        Remove a user data from the data associated to this point.
        Parameters:
        userData - the user data to remove.
        Returns:
        true if the data was removed; otherwise false.
      • getUserDataCount

        @Pure
        public int getUserDataCount()
        Replies the number of user data.
        Returns:
        the number of user data.
      • getUserDataAt

        @Pure
        public Object getUserDataAt​(int index)
        Replies the user data at the given index.
        Parameters:
        index - is the index of the data.
        Returns:
        the data
      • setUserDataAt

        public void setUserDataAt​(int index,
                                  Object data)
        Set the user data at the given index.
        Parameters:
        index - is the index of the data.
        data - is the data
      • getAllUserData

        @Pure
        public Collection<Object> getAllUserData()
        Replies all the user data.
        Returns:
        an unmodifiable collection of user data.