.class final Lcom/google/common/graph/EndpointPairIterator$Undirected; .super Lcom/google/common/graph/EndpointPairIterator; .source "EndpointPairIterator.java" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lcom/google/common/graph/EndpointPairIterator; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "Undirected" .end annotation .annotation system Ldalvik/annotation/Signature; value = { "", "Lcom/google/common/graph/EndpointPairIterator<", "TN;>;" } .end annotation # instance fields .field private visitedNodes:Ljava/util/Set; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Set<", "TN;>;" } .end annotation .annotation runtime Ljavax/annotation/CheckForNull; .end annotation .end field # direct methods .method private constructor (Lcom/google/common/graph/BaseGraph;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lcom/google/common/graph/BaseGraph<", "TN;>;)V" } .end annotation const/4 v0, 0x0 .line 2 invoke-direct {p0, p1, v0}, Lcom/google/common/graph/EndpointPairIterator;->(Lcom/google/common/graph/BaseGraph;Lcom/google/common/graph/EndpointPairIterator$1;)V .line 3 invoke-interface {p1}, Lcom/google/common/graph/BaseGraph;->nodes()Ljava/util/Set; move-result-object p1 invoke-interface {p1}, Ljava/util/Set;->size()I move-result p1 add-int/lit8 p1, p1, 0x1 invoke-static {p1}, Lcom/google/common/collect/Sets;->newHashSetWithExpectedSize(I)Ljava/util/HashSet; move-result-object p1 iput-object p1, p0, Lcom/google/common/graph/EndpointPairIterator$Undirected;->visitedNodes:Ljava/util/Set; return-void .end method .method public synthetic constructor (Lcom/google/common/graph/BaseGraph;Lcom/google/common/graph/EndpointPairIterator$1;)V .locals 0 .line 1 invoke-direct {p0, p1}, Lcom/google/common/graph/EndpointPairIterator$Undirected;->(Lcom/google/common/graph/BaseGraph;)V return-void .end method # virtual methods .method public computeNext()Lcom/google/common/graph/EndpointPair; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lcom/google/common/graph/EndpointPair<", "TN;>;" } .end annotation .annotation runtime Ljavax/annotation/CheckForNull; .end annotation .line 2 :cond_0 iget-object v0, p0, Lcom/google/common/graph/EndpointPairIterator$Undirected;->visitedNodes:Ljava/util/Set; invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object; .line 3 :cond_1 iget-object v0, p0, Lcom/google/common/graph/EndpointPairIterator;->successorIterator:Ljava/util/Iterator; invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_2 .line 4 iget-object v0, p0, Lcom/google/common/graph/EndpointPairIterator;->successorIterator:Ljava/util/Iterator; invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 .line 5 iget-object v1, p0, Lcom/google/common/graph/EndpointPairIterator$Undirected;->visitedNodes:Ljava/util/Set; invoke-interface {v1, v0}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z move-result v1 if-nez v1, :cond_1 .line 6 iget-object v1, p0, Lcom/google/common/graph/EndpointPairIterator;->node:Ljava/lang/Object; invoke-static {v1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object; invoke-static {v1, v0}, Lcom/google/common/graph/EndpointPair;->unordered(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/graph/EndpointPair; move-result-object v0 return-object v0 .line 7 :cond_2 iget-object v0, p0, Lcom/google/common/graph/EndpointPairIterator$Undirected;->visitedNodes:Ljava/util/Set; iget-object v1, p0, Lcom/google/common/graph/EndpointPairIterator;->node:Ljava/lang/Object; invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z .line 8 invoke-virtual {p0}, Lcom/google/common/graph/EndpointPairIterator;->advance()Z move-result v0 if-nez v0, :cond_0 const/4 v0, 0x0 .line 9 iput-object v0, p0, Lcom/google/common/graph/EndpointPairIterator$Undirected;->visitedNodes:Ljava/util/Set; .line 10 invoke-virtual {p0}, Lcom/google/common/collect/AbstractIterator;->endOfData()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/google/common/graph/EndpointPair; return-object v0 .end method .method public bridge synthetic computeNext()Ljava/lang/Object; .locals 1 .annotation runtime Ljavax/annotation/CheckForNull; .end annotation .line 1 invoke-virtual {p0}, Lcom/google/common/graph/EndpointPairIterator$Undirected;->computeNext()Lcom/google/common/graph/EndpointPair; move-result-object v0 return-object v0 .end method