List of usage examples for com.google.common.collect ImmutableList of
@SuppressWarnings("unchecked") public static <E> ImmutableList<E> of()
From source file:com.spotify.heroic.test.ValueSuppliers.java
public static ValueSuppliers empty() { return new ValueSuppliers(ImmutableList.of()); }
From source file:com.mysema.query.types.template.DateTimeTemplate.java
public static <T extends Comparable<?>> DateTimeExpression<T> create(Class<T> type, String template) { return new DateTimeTemplate<T>(type, TemplateFactory.DEFAULT.create(template), ImmutableList.of()); }
From source file:org.openqa.selenium.safari.SessionData.java
/** * @return The SessionData container for the current platform. *///w ww . j a v a2s. c om public static SessionData forCurrentPlatform() { Platform current = Platform.getCurrent(); Iterable<File> files = ImmutableList.of(); if (current.is(Platform.MAC)) { File libraryDir = new File("/Users", System.getenv("USER") + "/Library"); files = ImmutableList.of(new File(libraryDir, "Caches/com.apple.Safari/Cache.db"), new File(libraryDir, "Cookies/Cookies.binarycookies"), new File(libraryDir, "Cookies/Cookies.plist"), new File(libraryDir, "Safari/History.plist"), new File(libraryDir, "Safari/LastSession.plist"), new File(libraryDir, "Safari/LocalStorage"), new File(libraryDir, "Safari/Databases")); } if (current.is(Platform.WINDOWS)) { File appDataDir = new File(System.getenv("APPDATA"), "Apple Computer/Safari"); File localDataDir = new File(System.getenv("LOCALAPPDATA"), "Apple Computer/Safari"); files = ImmutableList.of(new File(appDataDir, "History.plist"), new File(appDataDir, "LastSession.plist"), new File(appDataDir, "Cookies/Cookies.plist"), new File(appDataDir, "Cookies/Cookies.binarycookies"), new File(localDataDir, "Cache.db"), new File(localDataDir, "Databases"), new File(localDataDir, "LocalStorage")); } return new SessionData(files); }
From source file:com.spotify.heroic.metadata.WriteMetadata.java
public static WriteMetadata of() { return new WriteMetadata(ImmutableList.of(), ImmutableList.of()); }
From source file:de.metas.ui.web.window.model.OrderedDocumentsList.java
public static final OrderedDocumentsList newEmpty(final List<DocumentQueryOrderBy> orderBys) { return new OrderedDocumentsList(ImmutableList.of(), orderBys); }
From source file:com.mysema.query.types.template.ComparableTemplate.java
public static <T extends Comparable<?>> ComparableExpression<T> create(Class<T> type, String template) { return new ComparableTemplate<T>(type, TemplateFactory.DEFAULT.create(template), ImmutableList.of()); }
From source file:com.microsoft.thrifty.schema.parser.ServiceElement.java
public static Builder builder(Location location) { return new AutoValue_ServiceElement.Builder().location(location).documentation("") .functions(ImmutableList.of()); }
From source file:com.querydsl.core.types.template.NumberTemplate.java
public static <T extends Number & Comparable<?>> NumberExpression<T> create(Class<T> type, String template) { return new NumberTemplate<T>(type, TemplateFactory.DEFAULT.create(template), ImmutableList.of()); }
From source file:com.google.template.soy.soytree.RequirecssUtils.java
/** * Parses a 'requirecss' attribute value (for a Soy file or a template). * * @param requirecssAttr The 'requirecss' attribute value to parse. * @return A list of required CSS namespaces parsed from the given attribute value. *//* w ww.ja v a2 s .c o m*/ public static ImmutableList<String> parseRequirecssAttr(@Nullable String requirecssAttr) { if (requirecssAttr == null) { return ImmutableList.of(); } String[] namespaces = requirecssAttr.trim().split("\\s*,\\s*"); for (String namespace : namespaces) { if (!BaseUtils.isDottedIdentifier(namespace)) { throw SoySyntaxException .createWithoutMetaInfo("Invalid required CSS namespace name \"" + namespace + "\"."); } } return ImmutableList.copyOf(namespaces); }
From source file:com.facebook.buck.cxx.toolchain.ArchiverProvider.java
static ArchiverProvider from(Archiver archiver) { return new ArchiverProvider() { @Override//from w ww . jav a 2 s . c om public Archiver resolve(BuildRuleResolver resolver) { return archiver; } @Override public Iterable<BuildTarget> getParseTimeDeps() { return ImmutableList.of(); } }; }