List of usage examples for com.google.common.collect Sets immutableEnumSet
@GwtCompatible(serializable = true) public static <E extends Enum<E>> ImmutableSet<E> immutableEnumSet(E anElement, E... otherElements)
From source file:org.caleydo.view.domino.api.model.EDirection.java
public static ImmutableSet<EDirection> primaries() { return Sets.immutableEnumSet(WEST, NORTH); }
From source file:org.caleydo.view.domino.api.model.EDirection.java
/** * @return a set of all directions within in the given dimension *///from ww w . j a v a 2 s .c o m public static ImmutableSet<EDirection> get(EDimension dim) { if (dim.isHorizontal()) return Sets.immutableEnumSet(WEST, EAST); else return Sets.immutableEnumSet(NORTH, SOUTH); }
From source file:org.caleydo.view.tourguide.internal.mode.VariableDataMode.java
@Override public boolean apply(IDataDomain dataDomain) { return (dataDomain instanceof ATableBasedDataDomain && !((ATableBasedDataDomain) dataDomain).getTable().isDataHomogeneous()) && InhomogenousDataDomainQuery.hasOne(dataDomain, Sets.immutableEnumSet(EDataClass.NATURAL_NUMBER, EDataClass.REAL_NUMBER)); }
From source file:org.caleydo.core.data.datadomain.DataSupportDefinitions.java
public static final Predicate<TablePerspective> dataClass(final EDataClass clazz, final EDataClass... clazzes) { final Set<EDataClass> type = Sets.immutableEnumSet(clazz, clazzes); return new Predicate<TablePerspective>() { @Override// w w w .jav a 2 s . c o m public boolean apply(TablePerspective in) { if (in == null) return false; if (homogenousTables.apply(in)) { return type.contains( in.getDataDomain().getDataSetDescription().getDataDescription().getDataClass()); } return type.contains(getSingleColumnDataClass(in)); } }; }
From source file:co.mitro.recordio.RecordReader.java
public synchronized byte[] read() throws IOException { return read(Sets.immutableEnumSet(RecordType.TYPE.DATA_COMPRESSED, RecordType.TYPE.DATA_UNCOMPRESSED)); }
From source file:org.jasig.portal.url.SuffixedPortletParameter.java
private SuffixedPortletParameter(String parameterPrefix, UrlType validUrlType, UrlType... validUrlTypes) { this.parameterPrefix = parameterPrefix; this.validUrlTypes = Sets.immutableEnumSet(validUrlType, validUrlTypes); }
From source file:org.caleydo.view.tourguide.internal.mode.VariableDataMode.java
protected ADataDomainQuery createFor(IDataDomain dd) { return new InhomogenousDataDomainQuery((ATableBasedDataDomain) dd, Sets.immutableEnumSet(EDataClass.NATURAL_NUMBER, EDataClass.REAL_NUMBER)); }
From source file:com.android.build.gradle.internal.transforms.ProguardConfigurable.java
@NonNull @Override/*from w ww. j a v a 2s. c o m*/ public Set<Scope> getScopes() { if (variantType == VariantType.LIBRARY) { return Sets.immutableEnumSet(Scope.PROJECT, Scope.PROJECT_LOCAL_DEPS); } return TransformManager.SCOPE_FULL_PROJECT; }
From source file:com.google.devtools.kythe.doc.MarkedSourceRenderer.java
/** * Extract and render the simple qualified name from {@link signature}. * * @param makeLink if provided, this function will be used to generate link URIs from semantic * node tickets. It may return null if there is no available URI. * @param signature the {@link MarkedSource} to render from. * @param includeIdentifier if true, include the identifier on the qualified name. * @return SafeHtml.EMPTY if there is no such initializer. *//*w ww . j a va 2s .c om*/ public static SafeHtml renderSimpleQualifiedName(Function<String, SafeUrl> makeLink, MarkedSource signature, boolean includeIdentifier) { return new RenderSimpleIdentifierState(makeLink).render(signature, includeIdentifier ? Sets.immutableEnumSet(MarkedSource.Kind.IDENTIFIER, MarkedSource.Kind.CONTEXT) : Sets.immutableEnumSet(MarkedSource.Kind.CONTEXT), 0); }
From source file:com.google.devtools.kythe.doc.MarkedSourceRenderer.java
/** * Extract and render the simple qualified name from {@link signature} as plaintext. * * @param signature the {@link MarkedSource} to render from. * @param includeIdentifier if true, include the identifier on the qualified name. * @return "" if there is no such name./* ww w . j a v a 2 s .c o m*/ */ public static String renderSimpleQualifiedNameText(MarkedSource signature, boolean includeIdentifier) { return new RenderSimpleIdentifierState(null).renderText(signature, includeIdentifier ? Sets.immutableEnumSet(MarkedSource.Kind.IDENTIFIER, MarkedSource.Kind.CONTEXT) : Sets.immutableEnumSet(MarkedSource.Kind.CONTEXT), 0); }