- Enclosing interface:
public static class ImportOrganizer.OrganizedImports extends Object
Provides support for building a list of imports from groups and formatting it as a block of imports.
Constructors Constructor Description
asImportBlockpublic String asImportBlock()Get the organized imports as a block of imports, with blank links between the separate groups.
addGroups@CanIgnoreReturnValue public <K> ImportOrganizer.OrganizedImports addGroups(Map<K,? extends Collection<ImportOrganizer.Import>> groups, Iterable<K> keys)Add groups of already sorted imports.
If there are any other imports in the list then this will add a newline separator before any groups are added. It will also add a newline separate between each group.
groups- the imports in the group.
keys- the keys to add, in order, if a key is not in the groups then it is ignored.
- this for chaining.