Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add size method in Rules API #283

Closed
Desislav-Petrov opened this issue May 26, 2020 · 1 comment
Closed

Add size method in Rules API #283

Desislav-Petrov opened this issue May 26, 2020 · 1 comment
Labels
Milestone

Comments

@Desislav-Petrov
Copy link
Contributor

Hi,

As a part of the Rules class interface it will be useufl to have a size/count method which will return how many rules are loaded, I'm happy to do a PR if people agree with the feature.

Thanks,
Des

@fmbenhassine fmbenhassine added this to the 4.1.0 milestone May 31, 2020
@fmbenhassine fmbenhassine changed the title Rules size/count method Add size method in Rules API May 31, 2020
fmbenhassine pushed a commit that referenced this issue May 31, 2020
@fmbenhassine
Copy link
Member

This makes sense to me. In fact, I see no straightforward way to get the rules count with the current API as of v4.0. To get the rules count, one needs to iterate over Rules#iterator and count the rules or do something like StreamSupport.stream(rules.spliterator(), false).count(); which are both not convenient.

I merged #284 for this.

@Desislav-Petrov Thank you for raising this issue and for contributing the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants