Package elki.result

Class CollectionResult<O>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Collection<O> col
      The collection represented.
      private java.util.Collection<java.lang.String> header
      Meta information (printed into the header)
    • Constructor Summary

      Constructors 
      Constructor Description
      CollectionResult​(java.util.Collection<O> col)
      Constructor
      CollectionResult​(java.util.Collection<O> col, java.util.Collection<java.lang.String> header)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addHeader​(java.lang.String s)
      Add header information
      java.util.Collection<java.lang.String> getHeader()
      Get header information
      java.util.Iterator<O> iterator()
      Implementation of the IterableResult interface, using the backing collection.
      int size()
      Get the collection size.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • col

        private java.util.Collection<O> col
        The collection represented.
      • header

        private java.util.Collection<java.lang.String> header
        Meta information (printed into the header)
    • Constructor Detail

      • CollectionResult

        public CollectionResult​(java.util.Collection<O> col,
                                java.util.Collection<java.lang.String> header)
        Constructor
        Parameters:
        col - Collection represented
        header - Auxiliary information for result headers
      • CollectionResult

        public CollectionResult​(java.util.Collection<O> col)
        Constructor
        Parameters:
        col - Collection represented
    • Method Detail

      • addHeader

        public void addHeader​(java.lang.String s)
        Add header information
        Parameters:
        s - Header information string
      • getHeader

        public java.util.Collection<java.lang.String> getHeader()
        Get header information
        Returns:
        header information of the result
      • iterator

        public java.util.Iterator<O> iterator()
        Implementation of the IterableResult interface, using the backing collection.
        Specified by:
        iterator in interface java.lang.Iterable<O>
        Specified by:
        iterator in interface IterableResult<O>
        Returns:
        iterator
      • size

        public int size()
        Get the collection size.
        Returns:
        Collection size