Skip to content

Commit

Permalink
#153 second ctor for Children
Browse files Browse the repository at this point in the history
  • Loading branch information
vssekorin committed Mar 25, 2018
1 parent 5d1d2c8 commit 80fa6d6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/com/vssekorin/cactoosmath/graph/Children.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

import com.vssekorin.cactoosmath.Graph;
import com.vssekorin.cactoosmath.set.SetEnvelope;
import org.cactoos.Scalar;
import org.cactoos.scalar.UncheckedScalar;

/**
* Children of vertex.
Expand All @@ -36,6 +38,15 @@
*/
public final class Children<T> extends SetEnvelope<T> {

/**
* Ctor.
* @param graph Graph
* @param vertex Scalar
*/
public Children(final Graph<T> graph, final Scalar<T> vertex) {
this(graph, new UncheckedScalar<>(vertex).value());
}

/**
* Ctor.
* @param graph Graph
Expand Down

0 comments on commit 80fa6d6

Please sign in to comment.