public class StreamEntitiesMethod extends java.lang.Object implements EntityMethod
StreamEntities
,
StreamEntitiesFunction
Constructor and Description |
---|
StreamEntitiesMethod(java.lang.Class<? extends Entity> type,
java.util.Set<java.util.function.Supplier<java.util.UUID>> idSuppliers,
boolean ofType)
Creates a stream entities method.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.Class<? extends Entity>> |
getDependencies()
Optional referenced entity dependencies (empty by default).
|
java.util.Set<java.util.function.Supplier<java.util.UUID>> |
getIDSuppliers()
Gets entity ID suppliers.
|
java.lang.Class<? extends Entity> |
getType()
Gets the entity type.
|
java.lang.Object |
invoke(java.lang.Object proxy,
Entity entity,
java.lang.Object[] args)
This will invoke the desired functionality for this method using the proxy, entity and
supplied arguments.
|
boolean |
isOfType()
Whether it is type filtering.
|
public StreamEntitiesMethod(java.lang.Class<? extends Entity> type, java.util.Set<java.util.function.Supplier<java.util.UUID>> idSuppliers, boolean ofType)
type
- Entity type.idSuppliers
- Entity ID suppliers for filtering.ofType
- Whether filtering of type.public java.util.Set<java.lang.Class<? extends Entity>> getDependencies()
EntityMethod
getDependencies
in interface EntityMethod
public java.util.Set<java.util.function.Supplier<java.util.UUID>> getIDSuppliers()
public java.lang.Class<? extends Entity> getType()
public java.lang.Object invoke(java.lang.Object proxy, Entity entity, java.lang.Object[] args) throws java.lang.Throwable
EntityMethod
invoke
in interface EntityMethod
proxy
- Possible proxy of entity type.entity
- Entity this proxy is for.args
- Supplied arguments to the original method.java.lang.Throwable
- If the invocation caused an exception.public boolean isOfType()