Skip to content

Commit

Permalink
Make incidentEdgeOrder() public for [Value]Graph
Browse files Browse the repository at this point in the history
RELNOTES=`graph`: Allow setting a stable incident edge order by calling the newly added method `[Value]Graph.Builder.incidentEdgeOrder(ElementOrder.stable())`.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=288715042
  • Loading branch information
nymanjens authored and netdpb committed Jan 9, 2020
1 parent cde576e commit 7016402
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 12 deletions.
3 changes: 1 addition & 2 deletions android/guava/src/com/google/common/graph/ElementOrder.java
Expand Up @@ -116,8 +116,7 @@ public static <S> ElementOrder<S> unordered() {
* </ul>
* </ul>
*/
// TODO(b/142723300): Make this method public
static <S> ElementOrder<S> stable() {
public static <S> ElementOrder<S> stable() {
return new ElementOrder<S>(Type.STABLE, null);
}

Expand Down
3 changes: 1 addition & 2 deletions android/guava/src/com/google/common/graph/GraphBuilder.java
Expand Up @@ -155,8 +155,7 @@ public <N1 extends N> GraphBuilder<N1> nodeOrder(ElementOrder<N1> nodeOrder) {
* @throws IllegalArgumentException if {@code incidentEdgeOrder} is not either {@code
* ElementOrder.unordered()} or {@code ElementOrder.stable()}.
*/
// TODO(b/142723300): Make this method public
<N1 extends N> GraphBuilder<N1> incidentEdgeOrder(ElementOrder<N1> incidentEdgeOrder) {
public <N1 extends N> GraphBuilder<N1> incidentEdgeOrder(ElementOrder<N1> incidentEdgeOrder) {
checkArgument(
incidentEdgeOrder.type() == ElementOrder.Type.UNORDERED
|| incidentEdgeOrder.type() == ElementOrder.Type.STABLE,
Expand Down
Expand Up @@ -159,8 +159,8 @@ public <N1 extends N> ValueGraphBuilder<N1, V> nodeOrder(ElementOrder<N1> nodeOr
* @throws IllegalArgumentException if {@code incidentEdgeOrder} is not either {@code
* ElementOrder.unordered()} or {@code ElementOrder.stable()}.
*/
// TODO(b/142723300): Make this method public
<N1 extends N> ValueGraphBuilder<N1, V> incidentEdgeOrder(ElementOrder<N1> incidentEdgeOrder) {
public <N1 extends N> ValueGraphBuilder<N1, V> incidentEdgeOrder(
ElementOrder<N1> incidentEdgeOrder) {
checkArgument(
incidentEdgeOrder.type() == ElementOrder.Type.UNORDERED
|| incidentEdgeOrder.type() == ElementOrder.Type.STABLE,
Expand Down
3 changes: 1 addition & 2 deletions guava/src/com/google/common/graph/ElementOrder.java
Expand Up @@ -115,8 +115,7 @@ public static <S> ElementOrder<S> unordered() {
* </ul>
* </ul>
*/
// TODO(b/142723300): Make this method public
static <S> ElementOrder<S> stable() {
public static <S> ElementOrder<S> stable() {
return new ElementOrder<S>(Type.STABLE, null);
}

Expand Down
3 changes: 1 addition & 2 deletions guava/src/com/google/common/graph/GraphBuilder.java
Expand Up @@ -155,8 +155,7 @@ public <N1 extends N> GraphBuilder<N1> nodeOrder(ElementOrder<N1> nodeOrder) {
* @throws IllegalArgumentException if {@code incidentEdgeOrder} is not either {@code
* ElementOrder.unordered()} or {@code ElementOrder.stable()}.
*/
// TODO(b/142723300): Make this method public
<N1 extends N> GraphBuilder<N1> incidentEdgeOrder(ElementOrder<N1> incidentEdgeOrder) {
public <N1 extends N> GraphBuilder<N1> incidentEdgeOrder(ElementOrder<N1> incidentEdgeOrder) {
checkArgument(
incidentEdgeOrder.type() == ElementOrder.Type.UNORDERED
|| incidentEdgeOrder.type() == ElementOrder.Type.STABLE,
Expand Down
4 changes: 2 additions & 2 deletions guava/src/com/google/common/graph/ValueGraphBuilder.java
Expand Up @@ -159,8 +159,8 @@ public <N1 extends N> ValueGraphBuilder<N1, V> nodeOrder(ElementOrder<N1> nodeOr
* @throws IllegalArgumentException if {@code incidentEdgeOrder} is not either {@code
* ElementOrder.unordered()} or {@code ElementOrder.stable()}.
*/
// TODO(b/142723300): Make this method public
<N1 extends N> ValueGraphBuilder<N1, V> incidentEdgeOrder(ElementOrder<N1> incidentEdgeOrder) {
public <N1 extends N> ValueGraphBuilder<N1, V> incidentEdgeOrder(
ElementOrder<N1> incidentEdgeOrder) {
checkArgument(
incidentEdgeOrder.type() == ElementOrder.Type.UNORDERED
|| incidentEdgeOrder.type() == ElementOrder.Type.STABLE,
Expand Down

0 comments on commit 7016402

Please sign in to comment.