diff --git a/bundles/org.eclipse.passage.loc.billing.core/src/org/eclipse/passage/loc/internal/billing/core/UserLicenses.java b/bundles/org.eclipse.passage.loc.billing.core/src/org/eclipse/passage/loc/internal/billing/core/UserLicenses.java index 84be2c137..5a3c0f5f3 100644 --- a/bundles/org.eclipse.passage.loc.billing.core/src/org/eclipse/passage/loc/internal/billing/core/UserLicenses.java +++ b/bundles/org.eclipse.passage.loc.billing.core/src/org/eclipse/passage/loc/internal/billing/core/UserLicenses.java @@ -22,6 +22,12 @@ import org.eclipse.passage.lic.users.UserDescriptor; import org.eclipse.passage.lic.users.UserLicenseDescriptor; +/** + * Root class of the package. Contains methods that return license descriptors + * filtered by some parameters. + * + * @since 0.1 + */ public final class UserLicenses { /** @@ -97,10 +103,8 @@ public boolean test(UserLicenseDescriptor descriptor) { * @return Linked list of licenses */ private final List getLicenses(Predicate condition) { - return users.stream() - .map(UserDescriptor::getUserLicenses) - .flatMap(iterable -> StreamSupport.stream(iterable.spliterator(), false)) - .filter(condition) + return users.stream().map(UserDescriptor::getUserLicenses) + .flatMap(iterable -> StreamSupport.stream(iterable.spliterator(), false)).filter(condition) .collect(Collectors.toList()); } @@ -111,13 +115,10 @@ private final List getLicenses(Predicate getLicensesNumbers() { - List licenses = getAllLicenses().stream() - .map(ProductVersionLicense::new) + List licenses = getAllLicenses().stream().map(ProductVersionLicense::new) .collect(Collectors.toList()); - return licenses.stream() - .collect(Collectors.toMap(license -> license, - license -> Collections.frequency(licenses, license), - (l1, l2) -> l1)); + return licenses.stream().collect(Collectors.toMap(license -> license, + license -> Collections.frequency(licenses, license), (l1, l2) -> l1)); } }