Example usage for com.google.common.collect Iterables toString

List of usage examples for com.google.common.collect Iterables toString

Introduction

In this page you can find the example usage for com.google.common.collect Iterables toString.

Prototype

public static String toString(Iterable<?> iterable) 

Source Link

Document

Returns a string representation of iterable , with the format [e1, e2, ..., en] (that is, identical to java.util.Arrays Arrays .toString(Iterables.toArray(iterable)) ).

Usage

From source file:minium.internal.Modules.java

public static Module<?> combine(final Iterable<? extends Module<?>> modules) {
    return new Module<Builder<?>>() {
        @Override/*from   w  w w.j  a va  2s .  c  o m*/
        @SuppressWarnings({ "unchecked", "rawtypes" })
        public void configure(Builder<?> builder) {
            for (Module module : modules) {
                module.configure(builder);
            }
        }

        @Override
        public String toString() {
            return format("Module%s", Iterables.toString(modules));
        }
    };
}

From source file:org.mule.raml.ApiModelLoader.java

private static ApiModel wrapApiModel(RamlModelResult ramlModelResult) throws RuntimeException {
    if (ramlModelResult.hasErrors()) {
        throw new RuntimeException("Invalid RAML descriptor " + Iterables.toString(
                transform(ramlModelResult.getValidationResults(), new Function<ValidationResult, String>() {
                    @Nullable//  w  ww.jav  a  2s.c  o m
                    @Override
                    public String apply(ValidationResult input) {
                        return input.getMessage();
                    }
                })));
    }
    if (ramlModelResult.isVersion08()) {
        return new ApiModelImpl(ramlModelResult.getApiV08());
    } else {
        return new org.mule.raml.impl.v10.model.ApiModelImpl(ramlModelResult.getApiV10());
    }
}

From source file:com.facebook.buck.rules.ActionGraph.java

@Override
public String toString() {
    return Iterables.toString(nodes);
}

From source file:org.sitemap4j.sitemap.url.UnknownChangeFrequency.java

public UnknownChangeFrequency(final String frequencyAsString, final Set<String> availableFrequencies) {
    super(String.format("Unknown frequency %s, available frequency: %s", frequencyAsString,
            Iterables.toString(availableFrequencies)));
}

From source file:voldemort.utils.DefaultIterable.java

@Override
public String toString() {
    return Iterables.toString(this);
}

From source file:com.palantir.lock.SortedLockCollection.java

@Override
public String toString() {
    return "SortedLockCollection " + Iterables.toString(entries());
}

From source file:org.onos.yangtools.yang.data.api.schema.tree.StoreTreeNodes.java

public static <T extends StoreTreeNode<T>> T findNodeChecked(final T tree, final YangInstanceIdentifier path) {
    T current = tree;//  ww  w .  j a va  2 s.  com

    int i = 1;
    for (PathArgument pathArg : path.getPathArguments()) {
        Optional<T> potential = current.getChild(pathArg);
        if (!potential.isPresent()) {
            throw new IllegalArgumentException(String.format("Child %s is not present in tree.",
                    Iterables.toString(Iterables.limit(path.getPathArguments(), i))));
        }
        current = potential.get();
        ++i;
    }
    return current;
}

From source file:edu.sdsc.scigraph.neo4j.GraphDump.java

public static void dumpNode(Node node) {
    System.out.println(String.format("%d (%s)", node.getId(), Iterables.toString(node.getLabels())));
    dumpProperties(node);/* w ww .j a  v a  2s.c  om*/
}

From source file:org.impressivecode.depress.mg.po.ChangeData.java

@Override
public String toString() {
    return String.format("ChangeData [className=%s, involvedEngineers=%s]", className,
            Iterables.toString(involvedEngineers));
}

From source file:org.impressivecode.depress.mg.ipa.IssuesMetricType.java

@Override
public String toString() {
    return String.format("NoIDataType [className=%s, issues=%s]", className, Iterables.toString(issues));
}