public synchronized Layer[] getLayers() { if (allLayers == null) { return new Layer[0]; } else { Layer[] layers = new Layer[allLayers.length]; System.arraycopy(allLayers, 0, layers, 0, allLayers.length); return layers; }
protected Layer[] getLayers(Properties p) { return getLayers(null, p);
    public synchronized Layer[] getLayers() {	if (allLayers == null) {	    return new Layer[0];     	} else {	    Layer[] layers = new Layer[allLayers.length];	    System.arraycopy(allLayers, 0, layers, 0, allLayers.length);	    return layers;	}    }