// Path: src/main/java/jalse/attributes/NamedAttributeType.java
// public final class NamedAttributeType<T> {
// 
//     private final String name;
//     private final AttributeType<T> type;
// 
//     /**
//      * Creates a new named attribute type.
//      *
//      * @param name
//      *            Attribute type name.
//      * @param type
//      *            Attribute type.
//      */
//     public NamedAttributeType(final String name, final AttributeType<T> type) {
// 	this.name = requireNotEmpty(name);
// 	this.type = Objects.requireNonNull(type);
//     }
// 
//     @Override
//     public boolean equals(final Object obj) {
// 	if (obj == this) {
// 	    return true;
// 	}
// 
// 	if (!(obj instanceof NamedAttributeType<?>)) {
// 	    return false;
// 	}
// 
// 	final NamedAttributeType<?> other = (NamedAttributeType<?>) obj;
// 	return name.equals(other.name) && type.equals(other.type);
//     }
// 
//     /**
//      * Gets the attribute type name.
//      *
//      * @return Name.
//      */
//     public String getName() {
// 	return name;
//     }
// 
//     /**
//      * Gets the attribute type.
//      *
//      * @return Attribute type.
//      */
//     public AttributeType<T> getType() {
// 	return type;
//     }
// 
//     @Override
//     public int hashCode() {
// 	final int prime = 31;
// 	int result = 1;
// 	result = prime * result + name.hashCode();
// 	result = prime * result + type.hashCode();
// 	return result;
//     }
// 
//     @Override
//     public String toString() {
// 	return "NamedAttributeType [" + name + ":" + type.getValueType().getTypeName() + "]";
//     }
// }


import java.util.HashSet;
import java.util.Iterator;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import jalse.attributes.AttributeListener;
import jalse.attributes.NamedAttributeType;
import jalse.entities.EntityVisitor.EntityVisitResult;
     *            Supplier of the entity listener to be added to created entities.
     * @param depth
     *            The recursion limit of the listener.
     * @return Recursive entity listener with specified recursion limit.
     */
    public static EntityListener newRecursiveEntityListener(final Supplier<EntityListener> supplier, final int depth) {
	if (depth <= 0) {
	    throw new IllegalArgumentException();
	}
	return new RecursiveEntityListener(supplier, depth);
    }

    /**
     * Checks to see if the entity has not been tagged with the type.
     *
     * @param type
     *            Entity type to check for.
     * @return Predicate of {@code true} if the entity is not of the type or {@code false} if it is.
     */
    public static Predicate<Entity> notMarkedAsType(final Class<? extends Entity> type) {
	return isMarkedAsType(type).negate();
    }

    /**
     * Gets a random entity from the container (if there is one).
     *
     * @param container
     *            Source container.
     * @return Random entity (if found).
     */
// Path: src/main/java/jalse/attributes/NamedAttributeType.java
// public final class NamedAttributeType<T> {
// 
//     private final String name;
//     private final AttributeType<T> type;
// 
//     /**
//      * Creates a new named attribute type.
//      *
//      * @param name
//      *            Attribute type name.
//      * @param type
//      *            Attribute type.
//      */
//     public NamedAttributeType(final String name, final AttributeType<T> type) {
// 	this.name = requireNotEmpty(name);
// 	this.type = Objects.requireNonNull(type);
//     }
// 
//     @Override
//     public boolean equals(final Object obj) {
// 	if (obj == this) {
// 	    return true;
// 	}
// 
// 	if (!(obj instanceof NamedAttributeType<?>)) {
// 	    return false;
// 	}
// 
// 	final NamedAttributeType<?> other = (NamedAttributeType<?>) obj;
// 	return name.equals(other.name) && type.equals(other.type);
//     }
// 
//     /**
//      * Gets the attribute type name.
//      *
//      * @return Name.
//      */
//     public String getName() {
// 	return name;
//     }
// 
//     /**
//      * Gets the attribute type.
//      *
//      * @return Attribute type.
//      */
//     public AttributeType<T> getType() {
// 	return type;
//     }
// 
//     @Override
//     public int hashCode() {
// 	final int prime = 31;
// 	int result = 1;
// 	result = prime * result + name.hashCode();
// 	result = prime * result + type.hashCode();
// 	return result;
//     }
// 
//     @Override
//     public String toString() {
// 	return "NamedAttributeType [" + name + ":" + type.getValueType().getTypeName() + "]";
//     }
// }


// Path: src/main/java/jalse/entities/Entities.java
import java.util.HashSet;
import java.util.Iterator;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import jalse.attributes.AttributeListener;
import jalse.attributes.NamedAttributeType;
import jalse.entities.EntityVisitor.EntityVisitResult;

     *            Supplier of the entity listener to be added to created entities.
     * @param depth
     *            The recursion limit of the listener.
     * @return Recursive entity listener with specified recursion limit.
     */
    public static EntityListener newRecursiveEntityListener(final Supplier<EntityListener> supplier, final int depth) {
	if (depth <= 0) {
	    throw new IllegalArgumentException();
	}
	return new RecursiveEntityListener(supplier, depth);
    }

    /**
     * Checks to see if the entity has not been tagged with the type.
     *
     * @param type
     *            Entity type to check for.
     * @return Predicate of {@code true} if the entity is not of the type or {@code false} if it is.
     */
    public static Predicate<Entity> notMarkedAsType(final Class<? extends Entity> type) {
	return isMarkedAsType(type).negate();
    }

    /**
     * Gets a random entity from the container (if there is one).
     *
     * @param container
     *            Source container.
     * @return Random entity (if found).
     */
    public static Optional<Entity> randomEntity(final EntityContainer container) {