public void setCategories(final Collection<Category> categories) {
        this.categories.clear();
        if (categories != null) {
            this.categories.addAll(CollectionStream.of(categories).filter(Category::isValid).toList());
        }
    }
@return only the logs of friends
main/src/main/java/cgeo/geocaching/models/Geocache.java