- public interface Log {
- public void log(Object ... o);
-
- public final static Log NULL = new Log() {
- @Override
- public void log(Object ... o) {
- }
- };
- }
- /**
- * The "Pooled<T>" class is the transient class that wraps the actual Object
- * T for API use/ It gives the ability to return ("done()", or "toss()") the
- * Object to the Pool when processing is finished.
- *
- * For Safety, i.e. to avoid memory leaks and invalid Object States, there
- * is a "finalize" method. It is strictly for when coder forgets to return
- * the object, or perhaps hasn't covered the case during Exceptions or
- * Runtime Exceptions with finally (preferred). This should not be
- * considered normal procedure, as finalize() is called at an undetermined
- * time during garbage collection, and is thus rather useless for a Pool.
- * However, we don't want Coding Mistakes to put the whole program in an
- * invalid state, so if something happened such that "done()" or "toss()"
- * were not called, the resource is still cleaned up as well as possible.
- *
- * @author Jonathan
- *
- * @param <T>
- */
- public static class Pooled<T> {
- public final T content;
- private Pool<T> pool;
+ public interface Log {
+ public void log(Object ... o);
+
+ public final static Log NULL = new Log() {
+ @Override
+ public void log(Object ... o) {
+ }
+ };
+ }
+ /**
+ * The "Pooled<T>" class is the transient class that wraps the actual Object
+ * T for API use/ It gives the ability to return ("done()", or "toss()") the
+ * Object to the Pool when processing is finished.
+ *
+ * For Safety, i.e. to avoid memory leaks and invalid Object States, there
+ * is a "finalize" method. It is strictly for when coder forgets to return
+ * the object, or perhaps hasn't covered the case during Exceptions or
+ * Runtime Exceptions with finally (preferred). This should not be
+ * considered normal procedure, as finalize() is called at an undetermined
+ * time during garbage collection, and is thus rather useless for a Pool.
+ * However, we don't want Coding Mistakes to put the whole program in an
+ * invalid state, so if something happened such that "done()" or "toss()"
+ * were not called, the resource is still cleaned up as well as possible.
+ *
+ * @author Jonathan
+ *
+ * @param <T>
+ */
+ public static class Pooled<T> {
+ public final T content;
+ private Pool<T> pool;