List of usage examples for java.util Collections unmodifiableList
public static <T> List<T> unmodifiableList(List<? extends T> list)
From source file:com.stehno.sanctuary.core.MessageSet.java
public List<MessageItem> getErrors() { return Collections.unmodifiableList(errors); }
From source file:com.create.validation.PropertyValidationErrorsProvider.java
List<String> getPropertyValidationErrorsByNestedPath(String nestedPath) { final List<String> propertyValidationErrors = propertyValidationErrorsGroupedByNestedPath .getOrDefault(nestedPath, Collections.emptyList()); return Collections.unmodifiableList(propertyValidationErrors); }
From source file:com.kazuki43zoo.jpetstore.config.ApplicationConfig.java
@Bean protected List<String> clCreditCardTypes() { List<String> cardList = new ArrayList<>(); cardList.add("Visa"); cardList.add("MasterCard"); cardList.add("American Express"); return Collections.unmodifiableList(cardList); }
From source file:org.shredzone.cilla.web.plugin.manager.ImageProcessingManager.java
/** * Sets up the manager.//from ww w.jav a2 s . c o m */ @PostConstruct protected void setup() { factories = Collections.unmodifiableList(applicationContext.getBeansOfType(ImageProcessingFactory.class) .values().stream().sorted(new PriorityComparator<>(ImageProcessingFactory.class)) .collect(Collectors.toList())); }
From source file:net.daboross.bukkitdev.skywars.api.events.GameEndEvent.java
public GameEndEvent(SkyWars plugin, SkyGame game, List<Player> players) { Validate.notNull(game, "Game cannot be null"); Validate.noNullElements(players, "No players can be null"); this.plugin = plugin; this.game = game; this.alivePlayers = Collections.unmodifiableList(players); }
From source file:com.doculibre.constellio.feedprotocol.model.impl.FeedMetadataImpl.java
public FeedMetadataImpl(List<FeedMeta> metas) throws ParseFeedException { if (CollectionUtils.isEmpty(metas)) { throw new ParseFeedException("Metas is empty"); }/*from w w w.j a v a 2 s .c o m*/ List<FeedMeta> metasTemp = new ArrayList<FeedMeta>(); metasTemp.addAll(metas); this.metas = Collections.unmodifiableList(metas); }
From source file:org.cloudfoundry.client.lib.archive.DirectoryApplicationArchive.java
public DirectoryApplicationArchive(File directory) { Assert.notNull(directory, "Directory must not be null"); Assert.isTrue(directory.isDirectory(), "File must reference a directory"); this.directory = directory; List<Entry> entries = new ArrayList<Entry>(); collectEntries(entries, directory);//from w ww .j ava 2 s. co m this.entries = Collections.unmodifiableList(entries); }
From source file:be.ceau.chart.data.Data.java
/** * @return unmodifiable list of all labels, never {@code null} */ public List<String> getLabels() { return Collections.unmodifiableList(labels); }
From source file:cz.fi.muni.pa036.airticketbooking.dao.impl.CityDaoImpl.java
@Override public List<City> getAll() { try {/*from ww w . ja v a 2 s . com*/ Query q = em.createQuery("FROM City"); List<City> objectTemp = q.getResultList(); return Collections.unmodifiableList(objectTemp); } catch (PersistenceException | IllegalArgumentException ex) { throw new DataAccessException(ex.getMessage(), ex) { }; } }
From source file:org.powertac.wpgenco.WindForecast.java
public List<Double> getWindSpeeds() { return Collections.unmodifiableList(windSpeeds); }