SaveSnippets
Community
Pricing
Sign In
Get Started
Community
Public Snippets
1
Code shared by the SaveSnippets community — browse, copy, and get inspired.
All Languages
Bash
Go
HTML
Java
JavaScript
Kotlin
PHP
Python
Rust
SQL
TypeScript
#partitioning-by
Clear
Tags
#php
#kotlin
#bash
#go
#sql
#rust
#typescript
#html
#java
#python
#files
#utils
#strings
#http
#concurrency
#async
#json
#arrays
#security
#types
#crypto
#database
#dates
#format
Java
Collectors.partitioningBy — Split by Predicate
Special case of groupingBy when the key is boolean — returns a `Map<Boolean, List<T>>` for the "true" and "false" buckets. Slightly more efficient than groupingBy.
#java
#streams
#collectors
#partitioning-by