Documentation of 'org.jquantlib.lang.iterators.Iterables' Java class
Iterables
org.jquantlib.lang.iterators

Class Iterables



  • public class Iterables
    extends java.lang.Object
    This class contains a static factory methods intended to create Iterable objects backed by different data structures.

    The documentation for the methods contained in this class includes briefs description of the implementations. Such descriptions should be regarded as implementation notes, rather than parts of the specification. Implementors should feel free to substitute other algorithms, so long as the specification itself is adhered to. (For example, the algorithm used by a certain method can be changed, but must satisfy the requirements stated in the documentation.)

    • Constructor Summary

      Constructors 
      Constructor and Description
      Iterables() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static <T> java.lang.Iterable<T> unmodifiableIterable(java.util.Enumeration<T> en)
      Returns an unmodifiable view of the specified Enumeration.
      static <T> java.lang.Iterable<T> unmodifiableIterable(java.util.Iterator<T> it)
      Returns an unmodifiable view of the specified Iterator.
      static <T> java.lang.Iterable<T> unmodifiableIterable(java.util.List<T> list)
      Returns an unmodifiable view of the specified List.
      static <T> java.lang.Iterable<T> unmodifiableIterable(java.util.Set<T> set)
      Returns an unmodifiable view of the specified Set.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Iterables

        public Iterables()
    • Method Detail

      • unmodifiableIterable

        public static <T> java.lang.Iterable<T> unmodifiableIterable(java.util.Enumeration<T> en)
        Returns an unmodifiable view of the specified Enumeration.

        This method allows modules to provide users with "read-only" access to internal enumerations. Query operations on the returned list "read through" to the specified Enumeration, and attempts to modify the returned Enumeration, whether direct or via its iterator, result in an UnsupportedOperationException.

        Type Parameters:
        T - is the type of elements in the specified Enumeration
        Parameters:
        en - is an Enumeration
        Returns:
        an Iterable
      • unmodifiableIterable

        public static <T> java.lang.Iterable<T> unmodifiableIterable(java.util.Iterator<T> it)
        Returns an unmodifiable view of the specified Iterator.

        This method allows modules to provide users with "read-only" access to internal iterators. Query operations on the returned list "read through" to the specified Iterator, and attempts to modify the returned Iterator, result in an UnsupportedOperationException.

        Type Parameters:
        T - is the type of elements in the specified Iterator
        Parameters:
        en - is an Iterator
        Returns:
        an Iterable
      • unmodifiableIterable

        public static <T> java.lang.Iterable<T> unmodifiableIterable(java.util.List<T> list)
        Returns an unmodifiable view of the specified List.

        This method allows modules to provide users with "read-only" access to internal enumerations. Query operations on the returned list "read through" to the specified List, and attempts to modify the returned List, whether direct or via its iterator, result in an UnsupportedOperationException.

        Type Parameters:
        T - is the type of elements in the specified List
        Parameters:
        en - is an List
        Returns:
        an Iterable
      • unmodifiableIterable

        public static <T> java.lang.Iterable<T> unmodifiableIterable(java.util.Set<T> set)
        Returns an unmodifiable view of the specified Set.

        This method allows modules to provide users with "read-only" access to internal enumerations. Query operations on the returned list "read through" to the specified Set, and attempts to modify the returned Set, whether direct or via its iterator, result in an UnsupportedOperationException.

        Type Parameters:
        T - is the type of elements in the specified Set
        Parameters:
        en - is an Set
        Returns:
        an Iterable

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.