public final class RegistryObject<T extends IForgeRegistryEntry<? super T>>
extends java.lang.Object
implements java.util.function.Supplier<T>
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| boolean | equals(java.lang.Object obj) | 
| RegistryObject<T> | filter(java.util.function.Predicate<? super T> predicate)If a mod object is present, and the mod object matches the given predicate,
 return an  RegistryObjectdescribing the value, otherwise return an
 emptyRegistryObject. | 
| <U> java.util.Optional<U> | flatMap(java.util.function.Function<? super T,java.util.Optional<U>> mapper)If a value is present, apply the provided  Optional-bearing
 mapping function to it, return that result, otherwise return an emptyOptional. | 
| T | get()Directly retrieves the wrapped Registry Object. | 
| ResourceLocation | getId() | 
| int | hashCode() | 
| void | ifPresent(java.util.function.Consumer<? super T> consumer)If a mod object is present, invoke the specified consumer with the object,
 otherwise do nothing. | 
| boolean | isPresent()Return  trueif there is a mod object present, otherwisefalse. | 
| <U> java.util.function.Supplier<U> | lazyMap(java.util.function.Function<? super T,? extends U> mapper)If a mod object is present, lazily apply the provided mapping function to it,
 returning a supplier for the transformed result. | 
| <U> java.util.Optional<U> | map(java.util.function.Function<? super T,? extends U> mapper)If a mod object is present, apply the provided mapping function to it,
 and if the result is non-null, return an  Optionaldescribing the
 result. | 
| static <T extends IForgeRegistryEntry<T>,U extends T> | of(ResourceLocation name,
  IForgeRegistry<T> registry) | 
| static <T extends IForgeRegistryEntry<T>,U extends T> | of(ResourceLocation name,
  java.util.function.Supplier<java.lang.Class<? super T>> registryType) | 
| T | orElse(T other)Return the mod object if present, otherwise return  other. | 
| T | orElseGet(java.util.function.Supplier<? extends T> other)Return the mod object if present, otherwise invoke  otherand return
 the result of that invocation. | 
| <X extends java.lang.Throwable> | orElseThrow(java.util.function.Supplier<? extends X> exceptionSupplier)Return the contained mod object, if present, otherwise throw an exception
 to be created by the provided supplier. | 
| java.util.stream.Stream<T> | stream() | 
| void | updateReference(IForgeRegistry<? extends T> registry) | 
public static <T extends IForgeRegistryEntry<T>,U extends T> RegistryObject<U> of(ResourceLocation name, java.util.function.Supplier<java.lang.Class<? super T>> registryType)
public static <T extends IForgeRegistryEntry<T>,U extends T> RegistryObject<U> of(ResourceLocation name, IForgeRegistry<T> registry)
@Nonnull public T get()
get インタフェース内 java.util.function.Supplier<T extends IForgeRegistryEntry<? super T>>public void updateReference(IForgeRegistry<? extends T> registry)
public ResourceLocation getId()
public java.util.stream.Stream<T> stream()
public boolean isPresent()
true if there is a mod object present, otherwise false.true if there is a mod object present, otherwise falsepublic void ifPresent(java.util.function.Consumer<? super T> consumer)
consumer - block to be executed if a mod object is presentjava.lang.NullPointerException - if mod object is present and consumer is
 nullpublic RegistryObject<T> filter(java.util.function.Predicate<? super T> predicate)
RegistryObject describing the value, otherwise return an
 empty RegistryObject.predicate - a predicate to apply to the mod object, if presentRegistryObject describing the value of this RegistryObject
 if a mod object is present and the mod object matches the given predicate,
 otherwise an empty RegistryObjectjava.lang.NullPointerException - if the predicate is nullpublic <U> java.util.Optional<U> map(java.util.function.Function<? super T,? extends U> mapper)
Optional describing the
 result.  Otherwise return an empty Optional.U - The type of the result of the mapping functionmapper - a mapping function to apply to the mod object, if presentOptional describing the result of applying a mapping
 function to the mod object of this RegistryObject, if a mod object is present,
 otherwise an empty Optionaljava.lang.NullPointerException - if the mapping function is nullpublic <U> java.util.Optional<U> flatMap(java.util.function.Function<? super T,java.util.Optional<U>> mapper)
Optional-bearing
 mapping function to it, return that result, otherwise return an empty
 Optional.  This method is similar to map(Function),
 but the provided mapper is one whose result is already an Optional,
 and if invoked, flatMap does not wrap it with an additional
 Optional.U - The type parameter to the Optional returned bymapper - a mapping function to apply to the mod object, if present
           the mapping functionOptional-bearing mapping
 function to the value of this Optional, if a value is present,
 otherwise an empty Optionaljava.lang.NullPointerException - if the mapping function is null or returns
 a null resultpublic <U> java.util.function.Supplier<U> lazyMap(java.util.function.Function<? super T,? extends U> mapper)
null, the supplier will return null.U - The type of the result of the mapping functionmapper - A mapping function to apply to the mod object, if presentSupplier lazily providing the result of applying a mapping
 function to the mod object of this RegistryObject, if a mod object is present,
 otherwise a supplier returning nulljava.lang.NullPointerException - if the mapping function is nullpublic T orElse(T other)
other.other - the mod object to be returned if there is no mod object present, may
 be nullotherpublic T orElseGet(java.util.function.Supplier<? extends T> other)
other and return
 the result of that invocation.other - a Supplier whose result is returned if no mod object
 is presentother.get()java.lang.NullPointerException - if mod object is not present and other is
 nullpublic <X extends java.lang.Throwable> T orElseThrow(java.util.function.Supplier<? extends X> exceptionSupplier) throws X extends java.lang.Throwable
X - Type of the exception to be thrownexceptionSupplier - The supplier which will return the exception to
 be thrownX - if there is no mod object presentjava.lang.NullPointerException - if no mod object is present and
 exceptionSupplier is nullX extends java.lang.Throwablepublic boolean equals(java.lang.Object obj)
equals クラス内 java.lang.Objectpublic int hashCode()
hashCode クラス内 java.lang.Object