// Path: src/main/java/jalse/misc/ListenerSet.java
// public class ListenerSet<T> extends LinkedHashSet<T>implements InvocationHandler {
// 
//     private static final long serialVersionUID = 1437345792255852480L;
// 
//     private final T proxy;
// 
//     /**
//      * Creates a new instance of listener set for the supplied listener type.
//      *
//      * @param clazz
//      *            Listener type to store.
//      */
//     public ListenerSet(final Class<? super T> clazz) {
// 	this(clazz, null);
//     }
// 
//     /**
//      * Creates a new instance of listener set for the supplied listener type.
//      *
//      * @param clazz
//      *            Listener type to store.
//      * @param listeners
//      *            Starting listeners.
//      */
//     @SuppressWarnings("unchecked")
//     public ListenerSet(final Class<? super T> clazz, final Set<? extends T> listeners) {
// 	proxy = (T) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] { clazz }, this);
// 	if (listeners != null) {
// 	    addAll(listeners);
// 	}
//     }
// 
//     @Override
//     public boolean add(final T e) {
// 	return super.add(Objects.requireNonNull(e));
//     }
// 
//     /**
//      * Gets the group proxy for easy invocation of methods upon the group.
//      *
//      * @return Listener group proxy.
//      */
//     public T getProxy() {
// 	return proxy;
//     }
// 
//     @Override
//     public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
// 	for (final T t : this) {
// 	    method.invoke(t, args);
// 	}
// 	return null;
//     }
// 
//     @Override
//     public boolean remove(final Object o) {
// 	return super.remove(Objects.requireNonNull(o));
//     }
// }


import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.stream.Stream;
import jalse.misc.ListenerSet;
	}

	/**
	 * Sets an attribute value.
	 *
	 * @param name
	 *            Attribute name.
	 * @param type
	 *            Attribute type.
	 * @param value
	 *            Value to set.
	 * @return This builder.
	 */
	public <T> Builder setAttribute(final String name, final AttributeType<T> type, final T value) {
	    return setAttribute(new NamedAttributeType<>(name, type), value);
	}

	/**
	 * Sets the delegate attribute container.
	 *
	 * @param builderDelegateContainer
	 *            Delegate container to set.
	 * @return This builder.
	 */
	public Builder setDelegateContainer(final AttributeContainer builderDelegateContainer) {
	    this.builderDelegateContainer = Objects.requireNonNull(builderDelegateContainer);
	    return this;
	}
    }

// Path: src/main/java/jalse/misc/ListenerSet.java
// public class ListenerSet<T> extends LinkedHashSet<T>implements InvocationHandler {
// 
//     private static final long serialVersionUID = 1437345792255852480L;
// 
//     private final T proxy;
// 
//     /**
//      * Creates a new instance of listener set for the supplied listener type.
//      *
//      * @param clazz
//      *            Listener type to store.
//      */
//     public ListenerSet(final Class<? super T> clazz) {
// 	this(clazz, null);
//     }
// 
//     /**
//      * Creates a new instance of listener set for the supplied listener type.
//      *
//      * @param clazz
//      *            Listener type to store.
//      * @param listeners
//      *            Starting listeners.
//      */
//     @SuppressWarnings("unchecked")
//     public ListenerSet(final Class<? super T> clazz, final Set<? extends T> listeners) {
// 	proxy = (T) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] { clazz }, this);
// 	if (listeners != null) {
// 	    addAll(listeners);
// 	}
//     }
// 
//     @Override
//     public boolean add(final T e) {
// 	return super.add(Objects.requireNonNull(e));
//     }
// 
//     /**
//      * Gets the group proxy for easy invocation of methods upon the group.
//      *
//      * @return Listener group proxy.
//      */
//     public T getProxy() {
// 	return proxy;
//     }
// 
//     @Override
//     public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
// 	for (final T t : this) {
// 	    method.invoke(t, args);
// 	}
// 	return null;
//     }
// 
//     @Override
//     public boolean remove(final Object o) {
// 	return super.remove(Objects.requireNonNull(o));
//     }
// }


// Path: src/main/java/jalse/attributes/DefaultAttributeContainer.java
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.stream.Stream;
import jalse.misc.ListenerSet;

	}

	/**
	 * Sets an attribute value.
	 *
	 * @param name
	 *            Attribute name.
	 * @param type
	 *            Attribute type.
	 * @param value
	 *            Value to set.
	 * @return This builder.
	 */
	public <T> Builder setAttribute(final String name, final AttributeType<T> type, final T value) {
	    return setAttribute(new NamedAttributeType<>(name, type), value);
	}

	/**
	 * Sets the delegate attribute container.
	 *
	 * @param builderDelegateContainer
	 *            Delegate container to set.
	 * @return This builder.
	 */
	public Builder setDelegateContainer(final AttributeContainer builderDelegateContainer) {
	    this.builderDelegateContainer = Objects.requireNonNull(builderDelegateContainer);
	    return this;
	}
    }

    private final Map<NamedAttributeType<?>, ListenerSet<?>> listeners;