Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package io.dropwizard.jdbi;
 
 
 public class ImmutableSetContainerFactory implements ContainerFactory<ImmutableSet<?>> {
     @Override
     public boolean accepts(Class<?> type) {
        return ImmutableSet.class.isAssignableFrom(type);
    }
    @Override
        return new ImmutableSetContainerBuilder();
    }
    private static class ImmutableSetContainerBuilder implements ContainerBuilder<ImmutableSet<?>> {
        private final ImmutableSet.Builder<Objectbuilder = ImmutableSet.builder();
        @Override
        public ContainerBuilder<ImmutableSet<?>> add(Object it) {
            .add(it);
            return this;
        }
        @Override
        public ImmutableSet<?> build() {
            return .build();
        }
    }
New to GrepCode? Check out our FAQ X