Example usage for com.google.common.collect Lists asList

List of usage examples for com.google.common.collect Lists asList

Introduction

In this page you can find the example usage for com.google.common.collect Lists asList.

Prototype

public static <E> List<E> asList(@Nullable E first, E[] rest) 

Source Link

Document

Returns an unmodifiable list containing the specified first element and backed by the specified array of additional elements.

Usage

From source file:org.apache.hadoop.hive.ql.optimizer.calcite.HiveSubQRemoveRelBuilder.java

/** Creates a {@link org.apache.calcite.rel.core.Join}. */
public HiveSubQRemoveRelBuilder join(JoinRelType joinType, RexNode condition0, RexNode... conditions) {
    return join(joinType, Lists.asList(condition0, conditions));
}

From source file:org.apache.calcite.tools.RelBuilder.java

/** Creates a {@link org.apache.calcite.rel.core.Join}. */
public RelBuilder join(JoinRelType joinType, RexNode condition0, RexNode... conditions) {
    return join(joinType, Lists.asList(condition0, conditions));
}

From source file:org.apache.hadoop.hbase.security.access.AccessController.java

private void isSystemOrSuperUser(Configuration conf) throws IOException {
    User user = userProvider.getCurrent();
    if (user == null) {
        throw new IOException("Unable to obtain the current user, "
                + "authorization checks for internal operations will not work correctly!");
    }/*from  w  w  w.  j a v  a2  s .  co  m*/

    String currentUser = user.getShortName();
    List<String> superusers = Lists.asList(currentUser,
            conf.getStrings(AccessControlLists.SUPERUSER_CONF_KEY, new String[0]));

    User activeUser = getActiveUser();
    if (!(superusers.contains(activeUser.getShortName()))) {
        throw new AccessDeniedException(
                "User '" + (user != null ? user.getShortName() : "null") + "is not system or super user.");
    }
}