01: /*
02: * Written by Dawid Kurzyniec, based on public domain code written by Doug Lea
03: * and publictly available documentation, and released to the public domain, as
04: * explained at http://creativecommons.org/licenses/publicdomain
05: */
06:
07: package org.drools.util.concurrent.locks;
08:
09: /**
10: * Overrides toArray() and toArray(Object[]) in AbstractCollection to provide
11: * implementations valid for concurrent collections.
12: *
13: * @author Doug Lea
14: * @author Dawid Kurzyniec
15: */
16: public abstract class AbstractCollection extends
17: java.util.AbstractCollection {
18:
19: /**
20: * Sole constructor. (For invocation by subclass constructors, typically
21: * implicit.)
22: */
23: protected AbstractCollection() {
24: super ();
25: }
26:
27: public Object[] toArray() {
28: return Utils.collectionToArray(this );
29: }
30:
31: public Object[] toArray(Object[] a) {
32: return Utils.collectionToArray(this, a);
33: }
34: }
|