granularity level: instruction

		.class public final Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;
.super Ljava/lang/Object;
.source "SetBuilder.java"

.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation

.field private static final SET_CONTRIBUTIONS_CANNOT_BE_NULL:Ljava/lang/String; = "Set contributions cannot be null"
.field private final contributions:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"TT;>;"
}
.end annotation
.end field


.method private constructor <init>(I)V
	.locals 1

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	new-instance v0, Ljava/util/ArrayList;
	invoke-direct {v0, p1}, Ljava/util/ArrayList;-><init>(I)V
	iput-object v0, p0, Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;->contributions:Ljava/util/List;
	return-void
.end method

.method public static newSetBuilder(I)Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;
	.locals 1
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"<T:",
	"Ljava/lang/Object;",
	">(I)",
	"Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder<",
	"TT;>;"
	}
	.end annotation

	new-instance v0, Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;
	invoke-direct {v0, p0}, Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;-><init>(I)V
	return-object v0
.end method

.method public add(Ljava/lang/Object;)Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;
	.locals 2
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"(TT;)",
	"Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder<",
	"TT;>;"
	}
	.end annotation

	iget-object v0, p0, Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;->contributions:Ljava/util/List;
	const-string v1, "Set contributions cannot be null"
	invoke-static {p1, v1}, Lcom/google/android/datatransport/runtime/dagger/internal/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
	move-result-object p1
	invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
	return-object p0
.end method

.method public addAll(Ljava/util/Collection;)Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;
	.locals 3
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"(",
	"Ljava/util/Collection<",
	"+TT;>;)",
	"Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder<",
	"TT;>;"
	}
	.end annotation

	invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
	move-result-object v0
	:goto_0
	invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
	move-result v1
	if-eqz v1, :cond_0
	invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
	move-result-object v1
	const-string v2, "Set contributions cannot be null"
	invoke-static {v1, v2}, Lcom/google/android/datatransport/runtime/dagger/internal/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
	goto :goto_0
	:cond_0
	iget-object v0, p0, Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;->contributions:Ljava/util/List;
	invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
	return-object p0
.end method

.method public build()Ljava/util/Set;
	.locals 2
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"()",
	"Ljava/util/Set<",
	"TT;>;"
	}
	.end annotation

	iget-object v0, p0, Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;->contributions:Ljava/util/List;
	invoke-interface {v0}, Ljava/util/List;->size()I
	move-result v0
	if-eqz v0, :cond_1
	const/4 v1, 0x1
	if-eq v0, v1, :cond_0
	new-instance v0, Ljava/util/HashSet;
	iget-object v1, p0, Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;->contributions:Ljava/util/List;
	invoke-direct {v0, v1}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
	invoke-static {v0}, Ljava/util/Collections;->unmodifiableSet(Ljava/util/Set;)Ljava/util/Set;
	move-result-object v0
	return-object v0
	:cond_0
	iget-object v0, p0, Lcom/google/android/datatransport/runtime/dagger/internal/SetBuilder;->contributions:Ljava/util/List;
	const/4 v1, 0x0
	invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
	move-result-object v0
	invoke-static {v0}, Ljava/util/Collections;->singleton(Ljava/lang/Object;)Ljava/util/Set;
	move-result-object v0
	return-object v0
	:cond_1
	invoke-static {}, Ljava/util/Collections;->emptySet()Ljava/util/Set;
	move-result-object v0
	return-object v0
.end method