Example usage for com.google.common.collect ImmutableSet of

List of usage examples for com.google.common.collect ImmutableSet of

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableSet of.

Prototype

static <E> Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6) 

Source Link

Document

Returns an unmodifiable set containing six elements.

Usage

From source file:org.eclipse.emf.eson.ui.highlighting.EFactoryTokenTypeToStringMapper.java

public EFactoryTokenTypeToStringMapper() {
    super();// w  w  w  .ja  v  a2s  .c om
    KEYCHARS = ImmutableSet.of("'['", "']'", "'{'", "'}'", "':'", "'='");
}

From source file:org.atlasapi.persistence.content.query.QueryConcernsTypeDecider.java

public static boolean concernsItemOrBelow(final ContentQuery query) {
    return concernsType(query, ImmutableSet.of(Item.class, Episode.class, Version.class, Location.class,
            Broadcast.class, Encoding.class));
}

From source file:blusunrize.immersiveengineering.common.datafixers.IEDataFixers.java

public static void register() {
    CompoundDataFixer fixer = FMLCommonHandler.instance().getDataFixer();
    ModFixs fixs = fixer.init(ImmersiveEngineering.MODID, ImmersiveEngineering.DATA_FIXER_VERSION);
    fixs.registerFix(ITEM_INSTANCE, new DataFixerHammerCutterDamage());
    fixer.registerVanillaWalker(ITEM_INSTANCE, new IEItemFixWalker());

    fixer.registerVanillaWalker(BLOCK_ENTITY, new ItemStackData(TileEntityMetalPress.class, "mold"));
    fixer.registerVanillaWalker(BLOCK_ENTITY, new ItemStackData(TileEntityChargingStation.class, "inventory"));
    fixer.registerVanillaWalker(BLOCK_ENTITY, new ItemStackDataLists(TileEntityCrusher.class, "inputs"));
    fixer.registerVanillaWalker(BLOCK_ENTITY, new AssemblerPatternWalker());
    fixer.registerVanillaWalker(BLOCK_ENTITY, new BottlingQueueWalker());
    try {/*w ww  . j ava2  s. c o  m*/
        Set<Class<? extends TileEntity>> specialCases = ImmutableSet.of(TileEntityTurretChem.class,
                TileEntityExcavator.class, TileEntityMetalPress.class, TileEntityDieselGenerator.class,
                TileEntityCrusher.class, TileEntityChargingStation.class);
        Method isInWorld = TileEntityMultiblockMetal.class.getMethod("isInWorldProcessingMachine");

        for (Class<? extends TileEntity> cl : IEContent.registeredIETiles) {
            if (TileEntityMultiblockMetal.class.isAssignableFrom(cl)) {
                Object te = cl.newInstance();
                if ((boolean) isInWorld.invoke(te))
                    fixer.registerVanillaWalker(BLOCK_ENTITY, new MultiblockProcessWalker(cl));
            }
            if (IIEInventory.class.isAssignableFrom(cl) && !specialCases.contains(cl))
                fixer.registerVanillaWalker(BLOCK_ENTITY, new ItemStackDataLists(cl, "inventory"));
        }
    } catch (NoSuchMethodException | IllegalAccessException | InstantiationException
            | InvocationTargetException e) {
        throw new RuntimeException(e);
    }
}

From source file:com.linecorp.armeria.common.http.HttpSessionProtocolProvider.java

@Override
protected Set<Entry> entries() {
    return ImmutableSet.of(new Entry("http", false, false, HTTP_PORT),
            new Entry("https", true, false, HTTPS_PORT), new Entry("h1c", false, false, HTTP_PORT),
            new Entry("h1", true, false, HTTPS_PORT), new Entry("h2c", false, true, HTTP_PORT),
            new Entry("h2", true, true, HTTPS_PORT));
}

From source file:com.google.idea.blaze.cpp.CPrefetchFileSource.java

@Override
public Set<String> prefetchSrcFileExtensions() {
    return ImmutableSet.of("c", "cc", "cpp", "h", "hh", "hpp");
}

From source file:com.github.jsdossier.markdown.TableBlockHtmlRenderer.java

@Override
public Set<Class<? extends Node>> getNodeTypes() {
    return ImmutableSet.of(TableBlock.class, TableCaptionNode.class, TableHeadNode.class, TableBodyNode.class,
            TableRowNode.class, TableCellNode.class);
}

From source file:co.cask.cdap.metrics.query.BaseMetricsHandler.java

protected BaseMetricsHandler(Authenticator authenticator) {
    super(authenticator);

    this.existingServices = ImmutableSet.of(Constants.Service.METRICS, Constants.Service.APP_FABRIC_HTTP,
            Constants.Service.DATASET_EXECUTOR, Constants.Service.DATASET_MANAGER, Constants.Service.STREAMS,
            Constants.Service.GATEWAY);
}

From source file:com.facebook.presto.sql.planner.iterative.rule.DesugarLambdaExpression.java

@Override
public Set<Rule<?>> rules() {
    return ImmutableSet.of(new ProjectExpressionRewrite(DesugarLambdaExpression::rewrite),
            new AggregationExpressionRewrite(DesugarLambdaExpression::rewrite),
            new FilterExpressionRewrite(DesugarLambdaExpression::rewrite),
            new TableScanExpressionRewrite(DesugarLambdaExpression::rewrite),
            new JoinExpressionRewrite(DesugarLambdaExpression::rewrite),
            new ValuesExpressionRewrite(DesugarLambdaExpression::rewrite));
}