Class ArrayMapElementLayer<E extends MapElement>

    • Constructor Detail

      • ArrayMapElementLayer

        public ArrayMapElementLayer()
        Create a new layer.
      • ArrayMapElementLayer

        public ArrayMapElementLayer​(Class<? extends E> type)
        Create a new layer with the specified element type.
        Parameters:
        type - the type of the map elements.
      • ArrayMapElementLayer

        public ArrayMapElementLayer​(AttributeCollection attributeSource)
        Create a new layer with the specified attribute source.
        Parameters:
        attributeSource - is the provider of the layer's attributes.
      • ArrayMapElementLayer

        public ArrayMapElementLayer​(boolean isTemp)
        Create a new layer with the specified attribute source.
        Parameters:
        isTemp - indicates if this layer is temporary.
      • ArrayMapElementLayer

        public ArrayMapElementLayer​(AttributeCollection attributeSource,
                                    boolean isTemp)
        Create a new layer with the specified attribute source.
        Parameters:
        attributeSource - is the provider of the layer's attributes.
        isTemp - indicates if this layer is temporary.
      • ArrayMapElementLayer

        public ArrayMapElementLayer​(UUID id)
        Create a new layer with the specified attribute source.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        Since:
        4.0
      • ArrayMapElementLayer

        public ArrayMapElementLayer​(UUID id,
                                    AttributeCollection attributeSource)
        Create a new layer with the specified attribute source.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        attributeSource - is the provider of the layer's attributes.
        Since:
        4.0
      • ArrayMapElementLayer

        public ArrayMapElementLayer​(UUID id,
                                    boolean isTemp)
        Create a new layer with the specified attribute source.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        isTemp - indicates if this layer is temporary.
        Since:
        4.0
      • ArrayMapElementLayer

        public ArrayMapElementLayer​(UUID id,
                                    AttributeCollection attributeSource,
                                    boolean isTemp)
        Create a new layer with the specified attribute source.
        Parameters:
        id - is the unique identifier of this element, or null if unknown.
        attributeSource - is the provider of the layer's attributes.
        isTemp - indicates if this layer is temporary.
        Since:
        4.0
    • Method Detail

      • size

        @Pure
        public int size()
        Description copied from interface: GISContainer
        Replies the count of map elements inside this container.
        Returns:
        the count of map elements inside this container.
      • getMapElementAt

        @Pure
        public E getMapElementAt​(int index)
        Description copied from interface: GISElementContainer
        Replies the map element at the specified index.
        Parameters:
        index - the index.
        Returns:
        the element at the given index
      • getAllMapElements

        @Pure
        public List<E> getAllMapElements()
        Description copied from interface: GISElementContainer
        Replies the map elements as an array.
        Returns:
        all the elements.
      • addMapElements

        public boolean addMapElements​(Collection<? extends E> elements)
        Description copied from interface: GISElementContainer
        Add map elements inside this container.
        Parameters:
        elements - the new elements.
        Returns:
        true if at least one element was added, otherwise false
      • addMapElement

        public boolean addMapElement​(E element)
        Description copied from interface: GISElementContainer
        Add a map element inside this container.
        Parameters:
        element - the new element.
        Returns:
        true if the element was added successfully, otherwise false
      • removeMapElement

        public boolean removeMapElement​(MapElement element)
        Description copied from interface: GISElementContainer
        Remove a map element from this container.
        Parameters:
        element - the element to remove.
        Returns:
        true if the element was removed successfully, otherwise false
      • removeAllMapElements

        public boolean removeAllMapElements()
        Description copied from interface: GISElementContainer
        Remove all the map elements from this container.
        Returns:
        true if container has changed, otherwise false
      • getElementType

        @Pure
        public Class<? extends E> getElementType()
        Description copied from interface: InformedIterable
        Replies the class of the elements in this iterable object.
        Returns:
        the type of the elements.
      • getMapElementCount

        @Pure
        public int getMapElementCount()
        Description copied from interface: GISElementContainer
        Replies the count of map elements.
        Returns:
        the count of map elements.
      • iterator

        @Pure
        public Iterator<E> iterator​(Rectangle2afp<?,​?,​?,​?,​?,​?> bounds)
        Iterates on the elements that intersect the specified bounds.
        Parameters:
        bounds - is the rectangle inside which the replied elements must be located
        Returns:
        an iterator on the map elements.
      • iterator

        @Pure
        public Iterator<E> iterator()