maidh91 / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Suggestion: Constraints.forPredicate() #402

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Constraint<E> forPredicate (Predicate<? super E> pred);

Also:

MapConstraints<K, V> create (Constraint<? super K> keyConstraint, Constraint<? 
super V> valueConstraint);

MapConstraint<K, V> createForKeyPredicate(Predicate<? super K> pred);

... and so on.

All of these are easy to implement on our own, and that would force us to throw 
a more specific Exception (rather than the probable IllegalArgumentException 
for all of the above), so feel free to shoot these down.

I just thought I'd throw out a bunch of suggestions.

Original issue reported on code.google.com by ray.j.gr...@gmail.com on 16 Aug 2010 at 6:55

GoogleCodeExporter commented 9 years ago

Original comment by boppenh...@google.com on 30 Aug 2010 at 5:30

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09