jalse.entities.annotations.StreamEntities Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JALSE Show documentation
Show all versions of JALSE Show documentation
Java Artificial Life Simulation Engine
package jalse.entities.annotations;
import jalse.entities.Entity;
import jalse.entities.EntityContainer;
import jalse.entities.functions.StreamEntitiesFunction;
import jalse.entities.methods.StreamEntitiesMethod;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* An {@link Entity} type annotation for:
*
* - {@link EntityContainer#streamEntities()}
* - {@link EntityContainer#streamEntitiesOfType(Class)}
* - {@link EntityContainer#streamEntitiesAsType(Class)}
*
* The method is selected based on whether type filtering is enabled ({@link #ofType()}).
*
* See {@link StreamEntitiesFunction} for acceptable method signatures.
*
* @author Elliot Ford
*
* @see StreamEntitiesMethod
*
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface StreamEntities {
/**
* Default type filtering ({@code true}).
*/
public static final boolean DEFAULT_OF_TYPE = true;
/**
* Whether filtering of type is performed.
*
* @return Filter of type.
*
* @see StreamEntities#DEFAULT_OF_TYPE
*/
boolean ofType() default DEFAULT_OF_TYPE;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy