MCPcopy Create free account
hub / github.com/Frontrooms/3.0-GC / setSubtract

Method setSubtract

src/main/java/emu/grasscutter/utils/Utils.java:322–330  ·  view source on GitHub ↗

Return a copy of minuend without any elements found in subtrahend. @param minuend The array we want elements from @param subtrahend The array whose elements we don't want @return The array with only the elements we want, in the order that minuend had them

(int[] minuend, int[] subtrahend)

Source from the content-addressed store, hash-verified

320 * @return The array with only the elements we want, in the order that minuend had them
321 */
322 public static int[] setSubtract(int[] minuend, int[] subtrahend) {
323 IntList temp = new IntArrayList();
324 for (int i : minuend) {
325 if (!intInArray(i, subtrahend)) {
326 temp.add(i);
327 }
328 }
329 return temp.toIntArray();
330 }
331
332 /**
333 * Gets the language code from a given locale.

Callers 2

BannerPoolsMethod · 0.95
removeFromAllPoolsMethod · 0.95

Calls 2

intInArrayMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected