Example usage for com.google.common.collect ImmutableSortedSet.Builder ImmutableSortedSet.Builder

List of usage examples for com.google.common.collect ImmutableSortedSet.Builder ImmutableSortedSet.Builder

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableSortedSet.Builder ImmutableSortedSet.Builder.

Prototype

public Builder(Comparator<? super E> comparator) 

Source Link

Usage

From source file:org.gradle.model.internal.manage.schema.extract.ModelPropertyExtractionContext.java

public Set<ModelType<?>> getDeclaredBy() {
    ImmutableSortedSet.Builder<ModelType<?>> declaredBy = new ImmutableSortedSet.Builder<ModelType<?>>(
            Ordering.usingToString());//from   w  ww.  j  a va 2 s.c  om
    for (PropertyAccessorExtractionContext accessor : accessors.values()) {
        for (Method method : accessor.getDeclaringMethods()) {
            declaredBy.add(ModelType.declaringType(method));
        }
    }
    return declaredBy.build();
}