public static Tags of(@Nullable Iterable<? extends Tag> tags) {
        if (tags == null || !tags.iterator().hasNext()) {
            return Tags.empty();
        } else if (tags instanceof Tags) {
            return (Tags) tags;
        } else if (tags instanceof Collection) {
            Collection<? extends Tag> tagsCollection = (Collection<? extends Tag>) tags;
            return new Tags(tagsCollection.toArray(new Tag[0]));
        } else {
            return new Tags(StreamSupport.stream(tags.spliterator(), false).toArray(Tag[]::new));
        }
    }
public static Tags of ( @ Nullable Iterable < ? extends Tag > tags ) { if ( tags == null || ! tags . iterator ( ) . hasNext ( ) ) { return Tags . empty ( ) ; } else if ( tags instanceof Tags ) { return ( Tags ) tags ; } else if ( tags instanceof Collection ) { Collection < ? extends Tag > tagsCollection = ( Collection < ? extends Tag > ) tags ; return new Tags ( tagsCollection . toArray ( new Tag [ 0 ] ) ) ; } else { return new Tags ( StreamSupport . stream ( tags . spliterator ( ) , false ) . toArray ( Tag [ ] :: new ) ) ; } }
Return a new {@code Tags} instance containing tags constructed from the specified source tags.

@param tags the tags to add
@return a new {@code Tags} instance