MCPcopy
hub / github.com/google/dagger / Successful

Class Successful

dagger-producers/main/java/dagger/producers/Produced.java:81–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 private static final class Successful<T> extends Produced<T> {
82 @NullableDecl private final T value;
83
84 private Successful(@NullableDecl T value) {
85 this.value = value;
86 }
87
88 @Override
89 @NullableDecl
90 public T get() {
91 return value;
92 }
93
94 @Override
95 public boolean equals(Object o) {
96 if (o == this) {
97 return true;
98 } else if (o instanceof Successful) {
99 Successful<?> that = (Successful<?>) o;
100 return Objects.equal(this.value, that.value);
101 } else {
102 return false;
103 }
104 }
105
106 @Override
107 public int hashCode() {
108 return value == null ? 0 : value.hashCode();
109 }
110
111 @Override
112 public String toString() {
113 return "Produced[" + value + "]";
114 }
115 }
116
117 private static final class Failed<T> extends Produced<T> {
118 private final Throwable throwable;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected