123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- .class public final Lokhttp3/internal/connection/RouteSelector$Selection;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/internal/connection/RouteSelector;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0x19
- name = "Selection"
- .end annotation
- # instance fields
- .field private nextRouteIndex:I
- .field private final routes:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Lokhttp3/Route;",
- ">;"
- }
- .end annotation
- .end field
- # direct methods
- .method constructor <init>(Ljava/util/List;)V
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/util/List<",
- "Lokhttp3/Route;",
- ">;)V"
- }
- .end annotation
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- const/4 v0, 0x0
- iput v0, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->nextRouteIndex:I
- iput-object p1, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->routes:Ljava/util/List;
- return-void
- .end method
- # virtual methods
- .method public getAll()Ljava/util/List;
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/List<",
- "Lokhttp3/Route;",
- ">;"
- }
- .end annotation
- new-instance v0, Ljava/util/ArrayList;
- iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->routes:Ljava/util/List;
- invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
- return-object v0
- .end method
- .method public hasNext()Z
- .locals 2
- iget v0, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->nextRouteIndex:I
- iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->routes:Ljava/util/List;
- invoke-interface {v1}, Ljava/util/List;->size()I
- move-result v1
- if-ge v0, v1, :cond_0
- const/4 v0, 0x1
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return v0
- .end method
- .method public next()Lokhttp3/Route;
- .locals 3
- invoke-virtual {p0}, Lokhttp3/internal/connection/RouteSelector$Selection;->hasNext()Z
- move-result v0
- if-eqz v0, :cond_0
- iget-object v0, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->routes:Ljava/util/List;
- iget v1, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->nextRouteIndex:I
- add-int/lit8 v2, v1, 0x1
- iput v2, p0, Lokhttp3/internal/connection/RouteSelector$Selection;->nextRouteIndex:I
- invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v0
- check-cast v0, Lokhttp3/Route;
- return-object v0
- :cond_0
- new-instance v0, Ljava/util/NoSuchElementException;
- invoke-direct {v0}, Ljava/util/NoSuchElementException;-><init>()V
- throw v0
- .end method
|