diff --git a/src/main/java/com/bio4j/angulillos/TypedVertex.java b/src/main/java/com/bio4j/angulillos/TypedVertex.java index b55444f..e0aa269 100644 --- a/src/main/java/com/bio4j/angulillos/TypedVertex.java +++ b/src/main/java/com/bio4j/angulillos/TypedVertex.java @@ -69,8 +69,8 @@ V set(Property property, X value) { /* #### Outgoing edges */ default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type > Stream outE(ET edgeType) { @@ -83,8 +83,8 @@ Stream outE(ET edgeType) { } default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.ToAtLeastOne > Stream outAtLeastOneE(ET edgeType) { @@ -98,8 +98,8 @@ Stream outAtLeastOneE(ET edgeType) { } default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.ToAtMostOne > Optional outAtMostOneE(ET edgeType) { @@ -113,8 +113,8 @@ Optional outAtMostOneE(ET edgeType) { } default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.ToOne > E outOneE(ET edgeType) { @@ -130,8 +130,8 @@ E outOneE(ET edgeType) { /* #### Incoming edges */ default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type > Stream inE(ET edgeType) { @@ -144,8 +144,8 @@ Stream inE(ET edgeType) { } default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.FromAtLeastOne > Stream inAtLeastOneE(ET edgeType) { @@ -159,8 +159,8 @@ Stream inAtLeastOneE(ET edgeType) { } default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.FromAtMostOne > Optional inAtMostOneE(ET edgeType) { @@ -174,8 +174,8 @@ Optional inAtMostOneE(ET edgeType) { } default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.FromOne > E inOneE(ET edgeType) { @@ -193,8 +193,8 @@ E inOneE(ET edgeType) { /* #### Outgoing vertices */ default < - E extends TypedEdge, - ET extends TypedEdge.Type, + E extends TypedEdge, + ET extends TypedEdge.Type, T extends TypedVertex, TT extends TypedVertex.Type > @@ -209,8 +209,8 @@ Stream outV(ET edgeType) { } default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.ToAtLeastOne, T extends TypedVertex, TT extends TypedVertex.Type @@ -226,8 +226,8 @@ Stream outAtLeastOneV(ET edgeType) { } default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.ToAtMostOne, T extends TypedVertex, TT extends TypedVertex.Type @@ -243,8 +243,8 @@ Optional outAtMostOneV(ET edgeType) { } default < - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.ToOne, T extends TypedVertex, TT extends TypedVertex.Type @@ -264,8 +264,8 @@ T outOneV(ET edgeType) { default < S extends TypedVertex, ST extends TypedVertex.Type, - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type > Stream inV(ET edgeType) { @@ -280,8 +280,8 @@ Stream inV(ET edgeType) { default < S extends TypedVertex, ST extends TypedVertex.Type, - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.FromAtLeastOne > Stream inAtLeastOneV(ET edgeType) { @@ -297,8 +297,8 @@ Stream inAtLeastOneV(ET edgeType) { default < S extends TypedVertex, ST extends TypedVertex.Type, - E extends TypedEdge, - ET extends TypedEdge.Type + E extends TypedEdge, + ET extends TypedEdge.Type & Arity.FromAtMostOne > Optional inAtMostOneV(ET edgeType) { @@ -314,9 +314,8 @@ Optional inAtMostOneV(ET edgeType) { default < S extends TypedVertex, ST extends TypedVertex.Type, - E extends TypedEdge, - ET extends TypedEdge.Type - & Arity.FromOne + E extends TypedEdge, + ET extends Arity.FromOne & TypedEdge.Type > S inOneV(ET edgeType) { diff --git a/src/test/java/com/bio4j/angulillos/TwitterGraphTestSuite.java b/src/test/java/com/bio4j/angulillos/TwitterGraphTestSuite.java index 23ea76f..1cc2397 100644 --- a/src/test/java/com/bio4j/angulillos/TwitterGraphTestSuite.java +++ b/src/test/java/com/bio4j/angulillos/TwitterGraphTestSuite.java @@ -5,6 +5,8 @@ import java.util.Date; import java.net.URL; +import com.bio4j.angulillos.*; + public abstract class TwitterGraphTestSuite { protected Twitter g; @@ -75,11 +77,13 @@ public abstract class TwitterGraphTestSuite { // ); // } // - // /* This uses arity-specific methods to return **the** user that tweeted a tweet. */ - // public Twitter.User tweeted(Twitter.Tweet tweet) { - // - // return tweet.inOneV(g.posted); - // } + + // see #78 + /* This uses arity-specific methods to return **the** user that tweeted a tweet. */ + public Twitter.User tweeted(Twitter.Tweet tweet) { + + return tweet.inOneV(g.posted); + } // // public Stream.User> repliedToSomeTweetFrom(Twitter.User user) { //