boolean (LibraryDescriptor lib) { Set<LibraryDescriptor> available = myLibrariesSet; if (available == null) { available = new HashSet<>(myLibraries); myLibrariesSet = available; } return available.contains(lib); }