MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / iterator

Method iterator

src/main/java/net/optifine/NextTickHashSet.java:139–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137 }
138
139 public Iterator iterator()
140 {
141 if (this.minX == Integer.MIN_VALUE)
142 {
143 return super.iterator();
144 }
145 else if (this.size() <= 0)
146 {
147 return Iterators.emptyIterator();
148 }
149 else
150 {
151 int i = this.minX >> 4;
152 int j = this.minZ >> 4;
153 int k = this.maxX >> 4;
154 int l = this.maxZ >> 4;
155 List list = new ArrayList();
156
157 for (int i1 = i; i1 <= k; ++i1)
158 {
159 for (int j1 = j; j1 <= l; ++j1)
160 {
161 Set set = this.getSubSet(i1, j1, false);
162
163 if (set != null)
164 {
165 list.add(set.iterator());
166 }
167 }
168 }
169
170 if (list.size() <= 0)
171 {
172 return Iterators.emptyIterator();
173 }
174 else if (list.size() == 1)
175 {
176 return (Iterator)list.get(0);
177 }
178 else
179 {
180 return Iterators.concat(list.iterator());
181 }
182 }
183 }
184
185 public void setIteratorLimits(int minX, int minZ, int maxX, int maxZ)
186 {

Callers

nothing calls this directly

Calls 5

getSubSetMethod · 0.95
concatMethod · 0.80
getMethod · 0.65
sizeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected