Class WebVertex

    • Constructor Detail

      • WebVertex

        public WebVertex​(@NonNull
                         @NonNull Coordinate position,
                         java.util.Collection<WebRequirement> mustFulfillAnyOfRequirements,
                         java.util.Collection<WebRequirement> mustFulfillNoneOfRequirements)
      • WebVertex

        public WebVertex​(@NonNull
                         @NonNull Coordinate position,
                         java.util.Collection<WebRequirement> mustFulfillAnyOfRequirements)
      • WebVertex

        public WebVertex​(@NonNull
                         @NonNull Coordinate position,
                         java.util.Collection<WebRequirement> mustFulfillAnyOfRequirements,
                         java.util.Collection<WebRequirement> mustFulfillNoneOfRequirements,
                         int protocol,
                         java.io.ObjectInput stream)
    • Method Detail

      • getDefaultWeightBetween

        public static double getDefaultWeightBetween​(WebVertex first,
                                                     WebVertex second)
        Calculates the weight between two WebVertexs using the default algorithm
      • substitute

        public final void substitute​(Web web,
                                     WebVertex vertex,
                                     double cost)
      • addBidirectionalEdge

        public final void addBidirectionalEdge​(WebVertex target)
        Adds a bidirectional edge between this vertex and the target with a weight equaling the value returned by {code WebVertex#getDefaultWeightTo(WebVertex)}
      • addBidirectionalEdge

        public final void addBidirectionalEdge​(WebVertex target,
                                               double weight)
        Adds a bidirectional edge with the specified weight between this vertex and the target.
      • addDirectedEdge

        public void addDirectedEdge​(WebVertex target,
                                    double weight)
        Adds a directed edge with the specified weight
      • addDirectedEdge

        public final void addDirectedEdge​(WebVertex target)
        Adds a directed edge with a weight equaling the value returned by {code WebVertex#getDefaultWeightTo(WebVertex)}
      • getDefaultWeightTo

        public double getDefaultWeightTo​(WebVertex target)
        Calculates the default weight that would be used between this vertex and the target vertex
      • getInputCost

        public java.lang.Double getInputCost​(WebVertex vertex)
      • getInputCosts

        public java.util.Map<WebVertex,​java.lang.Double> getInputCosts()
      • getInputs

        public java.util.Collection<WebVertex> getInputs()
      • getOutputCost

        public java.lang.Double getOutputCost​(WebVertex vertex)
      • getOutputCosts

        public java.util.Map<WebVertex,​java.lang.Double> getOutputCosts()
      • getOutputs

        public java.util.Collection<WebVertex> getOutputs()
      • getPosition

        @NonNull
        public final @NonNull Coordinate getPosition()
        Description copied from interface: Locatable
        The exact coordinate position of this entity on the world-graph
        Specified by:
        getPosition in interface Locatable
        Returns:
        The coordinate position, or null if unavailable
      • getArea

        @NonNull
        public Area.Rectangular getArea()
        Description copied from interface: Locatable
        The coordinate area occupied on the world-graph
        Specified by:
        getArea in interface Locatable
        Returns:
        The coordinate area, or null if unavailable
      • getRequirements

        public final java.util.Collection<WebRequirement> getRequirements()
      • getBlockingConditions

        @Deprecated
        public final java.util.Collection<WebRequirement> getBlockingConditions()
        Deprecated.
      • hashCode

        public abstract int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public final boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isIsolated

        public boolean isIsolated()
      • isUsable

        public final boolean isUsable()
        Determines if the web vertex can be traversed over because all of its requirements are met.
        Specified by:
        isUsable in interface Usable
      • removeBidirectionalEdge

        public final boolean removeBidirectionalEdge​(WebVertex target)
        Removed a directional edge that exists between this vertex and the target vertex.
        Parameters:
        target - the vertex to to disconnect this vertex from
      • removeDirectedEdge

        public final boolean removeDirectedEdge​(WebVertex target)
        Removes an edge from this vertex to the target vertex, including the output edge from this vertex and the input edge for the target vertex.
        Parameters:
        target - the vertex to remove the edge towards.
      • removeEdges

        public final void removeEdges()
        Removes all edges that all connected to this vertex.
      • step

        public abstract boolean step()
      • step

        public abstract boolean step​(boolean prefersViewport)