MCPcopy Create free account
hub / github.com/Teneted/Tenet / orElseGet

Method orElseGet

src/main/java/net/minecraftforge/fml/OptionalMod.java:198–200  ·  view source on GitHub ↗

Return the mod object if present, otherwise invoke other and return the result of that invocation. @param other a Supplier whose result is returned if no mod object is present @return the mod object if present otherwise the result of other.get() @throws NullPointerException

(Supplier<? extends T> other)

Source from the content-addressed store, hash-verified

196 * null
197 */
198 public T orElseGet(Supplier<? extends T> other) {
199 return getValue() != null ? getValue() : other.get();
200 }
201
202 /**
203 * Return the contained mod object, if present, otherwise throw an exception

Callers 6

runLaterMethod · 0.45
modLauncherModListMethod · 0.45
toStreamMethod · 0.45
processModListsMethod · 0.45
ModDiscovererMethod · 0.45
ModInfoMethod · 0.45

Calls 2

getValueMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected