Refactoring & added all query

This commit is contained in:
2021-07-27 09:15:19 +02:00
parent a3fff9c7d7
commit 0f85d4b9bc
5 changed files with 28 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ from typing import Optional, Callable
from cpl_query._extension.ordered_iterable import OrderedIterable
from cpl_query.extension.ordered_iterable_abc import OrderedIterableABC
from .._query.all_query import all_query
from .._query.any_query import any_query
from .._query.first_query import first_or_default_query, first_query
from .._query.for_each_query import for_each_query
@@ -19,6 +20,9 @@ class Iterable(IterableABC):
def any(self, func: Callable) -> bool:
return any_query(self, func)
def all(self, func: Callable) -> bool:
return all_query(self, func)
def first(self) -> any:
return first_query(self)