Package dev.hypera.chameleon.util.graph
Interface Edge<T>
-
- Type Parameters:
T- Node type.
public interface Edge<T>An edge between two nodes.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Edge<T>flip()Returns a new edge with the sources and targets of this edge, but reversed.static <T> @NotNull Edge<T>of(T source, T target)Create a new edge betweensourceandtarget.Tsource()Returns the source of this edge.Ttarget()Returns the target of this edge.
-
-
-
Method Detail
-
of
@NotNull static <T> @NotNull Edge<T> of(@NotNull T source, @NotNull T target)
Create a new edge betweensourceandtarget.- Type Parameters:
T- Node type.- Parameters:
source- Edge source.target- Edge target.- Returns:
- new edge.
-
source
@NotNull T source()
Returns the source of this edge.- Returns:
- edge source.
-
target
@NotNull T target()
Returns the target of this edge.- Returns:
- edge target.
-
-