List of usage examples for com.google.common.collect ImmutableSet toArray
<T> T[] toArray(T[] a);
From source file:org.fcrepo.transform.sparql.JQLQueryVisitor.java
/** * Get the columns for the JCR query//from w ww . jav a 2 s .c om * @return */ private Column[] getColumns() { final ImmutableSet<Column> build = this.columns.build(); return build.toArray(new Column[build.size()]); }
From source file:com.facebook.buck.io.filesystem.impl.FakeProjectFilesystem.java
@Override public void copy(Path source, Path target, CopySourceMode sourceMode) { Path normalizedSourcePath = MorePaths.normalize(source); Path normalizedTargetPath = MorePaths.normalize(target); switch (sourceMode) { case FILE:// w w w. j a v a 2 s . co m ImmutableSet<FileAttribute<?>> attrs = fileAttributes.get(normalizedSourcePath); writeBytesToPath(fileContents.get(normalizedSourcePath), normalizedTargetPath, attrs.toArray(new FileAttribute[0])); break; case DIRECTORY_CONTENTS_ONLY: case DIRECTORY_AND_CONTENTS: throw new UnsupportedOperationException(); } }