Example usage for java.util Collections singletonList

List of usage examples for java.util Collections singletonList

Introduction

In this page you can find the example usage for java.util Collections singletonList.

Prototype

public static <T> List<T> singletonList(T o) 

Source Link

Document

Returns an immutable list containing only the specified object.

Usage

From source file:com.thoughtworks.go.domain.BuildCommand.java

public static BuildCommand test(String flag, String left, BuildCommand subCommand) {
    return new BuildCommand("test", map("flag", flag, "left", left))
            .setSubCommands(Collections.singletonList(subCommand));
}

From source file:io.undertow.server.security.GenericHeaderAuthenticationTestCase.java

static AuthenticationMechanism getTestMechanism() {
    return new GenericHeaderAuthenticationMechanism(NAME, Collections.singletonList(new HttpString("user")),
            Collections.singletonList("sessionid"), identityManager);
}

From source file:alfio.model.result.Result.java

public static <T> Result<T> error(ErrorCode errorDescriptor) {
    return error(Collections.singletonList(errorDescriptor));
}

From source file:Main.java

@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
private static List<Camera.Area> buildMiddleArea(int areaPer1000) {
    return Collections
            .singletonList(new Camera.Area(new Rect(-areaPer1000, -areaPer1000, areaPer1000, areaPer1000), 1));
}

From source file:com.betfair.cougar.marshalling.impl.SimpleGeoLocationDetails.java

public SimpleGeoLocationDetails(String resolvedAddress) {
    this.resolvedAddress = Collections.singletonList(resolvedAddress);
}

From source file:com.hp.autonomy.aci.content.fieldtext.WILD.java

/**
 * Constructs a new single field WILD fieldtext
 * @param field The field name/*w w w.ja va  2 s. co m*/
 * @param values The field values
 */
public WILD(final String field, final String[] values) {
    this(Collections.singletonList(field), values);
}

From source file:com.hp.autonomy.aci.content.fieldtext.NOTWILD.java

/**
 * Constructs a new single field NOTWILD fieldtext
 * @param field The field name//from   w  ww.ja v a 2  s  .  c o  m
 * @param values The field values
 */
public NOTWILD(final String field, final String[] values) {
    this(Collections.singletonList(field), values);
}

From source file:com.hp.autonomy.aci.content.fieldtext.STRING.java

/**
 * Constructs a new single field STRING fieldtext
 * @param field The field name//from  w  ww . ja va  2s  .c  o  m
 * @param values The field values
 */
public STRING(final String field, final String[] values) {
    this(Collections.singletonList(field), values);
}

From source file:com.hp.autonomy.aci.content.fieldtext.MATCH.java

/**
 * Creates a new single field MATCH fieldtext
 * @param field The name of the field/*from w w  w .  j a v a  2  s .  c o m*/
 * @param values The field values
 */
public MATCH(final String field, final String[] values) {
    this(Collections.singletonList(field), values);
}

From source file:com.hp.autonomy.aci.content.fieldtext.NOTSTRING.java

/**
 * Constructs a new single field NOTSTRING fieldtext
 * @param field The field name// w  w  w .  j  a  va  2s.  c o  m
 * @param values The field values
 */
public NOTSTRING(final String field, final String[] values) {
    this(Collections.singletonList(field), values);
}