Class SingleEntryItemCollection.SingleEntryIItemIterable

    • Field Detail

      • itemList

        private final java.util.List<IItem> itemList
    • Constructor Detail

      • SingleEntryIItemIterable

        public SingleEntryIItemIterable​(IItem item)
    • Method Detail

      • iterator

        public java.util.Iterator<IItem> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<IItem>
      • hasItems

        public boolean hasItems()
        Specified by:
        hasItems in interface IItemIterable
        Returns:
        true if the iterable contains items, false otherwise
      • getItemCount

        public long getItemCount()
        Specified by:
        getItemCount in interface IItemIterable
        Returns:
        the number of items in the iterable
      • apply

        public IItemIterable apply​(IPredicate<IItem> predicate)
        Description copied from interface: IItemIterable
        Creates a new item iterable with all items in this iterable that pass through the filter. The iterable may be eagerly or lazily evaluated.
        Specified by:
        apply in interface IItemIterable
        Parameters:
        predicate - the predicate to use when selecting items for the new collection
        Returns:
        A new collection of items