Class FixedSizeList

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<Object>
org.apache.sis.internal.storage.csv.FixedSizeList
All Implemented Interfaces:
Iterable<Object>, Collection<Object>, List<Object>

final class FixedSizeList extends AbstractList<Object>
Wraps an array of fixed size. Attempts to add a new element fail when the list reached its maximal capacity. Clearing the array does not set the references to null, since we need to remember the values of previous passes. This implementation is designed for compliance with the part of Moving Features specification saying that "if the value equals the previous value, the text for the value can be omitted".
Since:
0.8
Version:
0.8
  • Field Details

    • values

      private final Object[] values
      The array where to store the values. Elements in this array are usually not null even if this list is empty.
    • size

      private int size
      Number of elements added in the values array.
  • Constructor Details

    • FixedSizeList

      FixedSizeList(Object[] values)
      Creates a new list wrapping the given array of values.
  • Method Details