public static class ImageLayers.Builder<T extends Layer> extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ImageLayers.Builder<T> |
add(T layer)
Adds a layer.
|
<U extends T> |
addAll(ImageLayers<U> layers)
Adds all layers in
layers. |
ImageLayers<T> |
build() |
ImageLayers.Builder<T> |
removeDuplicates()
Remove any duplicate layers, keeping the last occurrence of the layer.
|
public ImageLayers.Builder<T> add(T layer) throws LayerPropertyNotFoundException
Note that only subclasses of Layer that implement equals/hashCode will be
guaranteed to not be duplicated.
layer - the layer to addLayerPropertyNotFoundException - if adding the layer failspublic <U extends T> ImageLayers.Builder<T> addAll(ImageLayers<U> layers) throws LayerPropertyNotFoundException
layers.U - child type of Layerlayers - the layers to addLayerPropertyNotFoundException - if adding a layer failspublic ImageLayers.Builder<T> removeDuplicates()
public ImageLayers<T> build()
Copyright © 2019. All rights reserved.