Class MultiCascade

  • All Implemented Interfaces:
    StyleKeys

    public class MultiCascade
    extends java.lang.Object
    implements StyleKeys
    Several layers / cascades, e.g. one for the main Line and one for each overlay. The range is (0,Infinity) at first and it shrinks in the process when StyleSources apply zoom level dependent properties.
    • Field Detail

      • layers

        private final java.util.Map<java.lang.String,​Cascade> layers
      • range

        public Range range
        The scale range this cascade is valid for
    • Constructor Detail

      • MultiCascade

        public MultiCascade()
        Constructs a new MultiCascade.
    • Method Detail

      • getOrCreateCascade

        public Cascade getOrCreateCascade​(java.lang.String layer)
        Return the cascade with the given name. If it doesn't exist, create a new layer with that name and return it. The new layer will be a clone of the "*" layer, if it exists.
        Parameters:
        layer - layer
        Returns:
        cascade
      • getCascade

        public Cascade getCascade​(java.lang.String layer)
        Read-only version of getOrCreateCascade(java.lang.String). For convenience, it returns an empty cascade for non-existing layers. However this empty (read-only) cascade is not added to this MultiCascade object.
        Parameters:
        layer - layer
        Returns:
        cascade
      • getLayers

        public java.util.Collection<java.util.Map.Entry<java.lang.String,​Cascade>> getLayers()
        Gets all cascades for the known layers
        Returns:
        The cascades for the layers
      • hasLayer

        public boolean hasLayer​(java.lang.String layer)
        Check whether this cascade has a given layer
        Parameters:
        layer - The layer to check for
        Returns:
        true if it has that layer