/** * Returns an unmodifiable view of the specified series. Attempts to call a * modification method will throw an UnsupportedOperationException. * * @param series * The series for which an unmodifiable view should be returned. * @return The unmodifiable view of the specified series. */ @SuppressWarnings({ "unchecked", "rawtypes" }) public static Series<? extends NamedValue> unmodifiableSeries( final Series<? extends NamedValue> series) { return new Series(series.entryClass, java.util.Collections.unmodifiableList(series.getDelegate())); }
/** * Returns a view of the portion of this list between the specified * fromIndex, inclusive, and toIndex, exclusive. * * @param fromIndex * The start position. * @param toIndex * The end position (exclusive). * @return The sub-list. */ @Override public Series<E> subList(int fromIndex, int toIndex) { return createSeries(getDelegate().subList(fromIndex, toIndex)); }
/** * Returns an unmodifiable view of the specified series. Attempts to call a * modification method will throw an UnsupportedOperationException. * * @param series * The series for which an unmodifiable view should be returned. * @return The unmodifiable view of the specified series. */ @SuppressWarnings({ "unchecked", "rawtypes" }) public static Series<? extends NamedValue> unmodifiableSeries( final Series<? extends NamedValue> series) { return new Series(series.entryClass, java.util.Collections.unmodifiableList(series.getDelegate())); }
/** * Returns a view of the portion of this list between the specified * fromIndex, inclusive, and toIndex, exclusive. * * @param fromIndex * The start position. * @param toIndex * The end position (exclusive). * @return The sub-list. */ @Override public Series<T> subList(int fromIndex, int toIndex) { return new Series<T>(this.entryClass, getDelegate().subList(fromIndex, toIndex)); }
/** * Returns a view of the portion of this list between the specified * fromIndex, inclusive, and toIndex, exclusive. * * @param fromIndex * The start position. * @param toIndex * The end position (exclusive). * @return The sub-list. */ @Override public Series<T> subList(int fromIndex, int toIndex) { return new Series<T>(this.entryClass, getDelegate().subList(fromIndex, toIndex)); }