List of usage examples for java.util Collections unmodifiableList
public static <T> List<T> unmodifiableList(List<? extends T> list)
From source file:com.autentia.wuija.widget.notification.EventProcessor.java
/** * Devuelve una lista no modificable de todos los {@link WidgetListener} registrados. * // w ww . j ava2 s.c o m * @return lista no modificable de todos los {@link WidgetListener} registrados. */ public List<WidgetListener> getListeners() { return Collections.unmodifiableList(listeners); }
From source file:com.digitalbridge.domain.geo.GeoJsonPolygon.java
/** {@inheritDoc} */ @Override public List<GeoJsonLineString> getCoordinates() { return Collections.unmodifiableList(this.coordinates); }
From source file:test.parsing.CollectingReaderEventListener.java
public List<?> getAliases(String beanName) { List<?> aliases = (List<?>) this.aliasMap.get(beanName); return aliases == null ? null : Collections.unmodifiableList(aliases); }
From source file:com.doculibre.constellio.feedprotocol.model.impl.FeedImpl.java
public FeedImpl(String datasource, String feedtype, List<FeedGroup> groups) throws ParseFeedException { if (StringUtils.isBlank(datasource)) { throw new ParseFeedException("Blank datasource"); }/*from ww w . j a v a2 s . c om*/ Matcher matcher = Pattern.compile(REGEX_VALIDATION, Pattern.CASE_INSENSITIVE).matcher(datasource); if (!matcher.find()) { throw new ParseFeedException("Invalid name format (" + REGEX_VALIDATION + ") for datasource"); } this.datasource = datasource; if (StringUtils.isBlank(feedtype)) { throw new ParseFeedException("Blank feedType"); } else if (feedtype.equals(FULL)) { this.feedtype = FEEDTYPE.FULL; } else if (feedtype.equals(INCREMENTAL)) { this.feedtype = FEEDTYPE.INCREMENTAL; } else if (feedtype.equals(METADATA_AND_URL)) { this.feedtype = FEEDTYPE.METADATA_AND_URL; } else { throw new ParseFeedException("Invalid feedType: " + feedtype); } if (CollectionUtils.isEmpty(groups)) { throw new ParseFeedException("Groups is empty"); } List<FeedGroup> groupsTemp = new ArrayList<FeedGroup>(); groupsTemp.addAll(groups); this.groups = Collections.unmodifiableList(groupsTemp); }
From source file:ru.jts_dev.gameserver.parser.impl.SettingsHolder.java
public final List<CharacterStat> getRecommendedStats() { return Collections.unmodifiableList(recommendedStats); }
From source file:org.sunnycode.schema.Attribute.java
@JsonCreator public Attribute(@JsonProperty("name") String name, @JsonProperty("type") Type type, @JsonProperty("values") List<Object> values, @JsonProperty("nullable") Boolean nullable) { if (name == null) { throw new IllegalArgumentException("Attribute 'name' must not be null"); }//ww w. jav a 2 s . co m if (type == null) { throw new IllegalArgumentException("Attribute 'type' must be specified"); } this.name = name; this.type = type; this.nullable = (nullable == null) || nullable; if (values != null) { List<String> newVals = new ArrayList<String>(); for (Object object : values) { newVals.add(object.toString()); } this.values = Collections.unmodifiableList(newVals); } else { this.values = null; } }
From source file:fr.ritaly.dungeonmaster.actuator.SequentialActuator.java
public List<Actuator> getActuators() { // Defensive recopy return Collections.unmodifiableList(actuators); }
From source file:net.sf.gazpachoquest.dto.QuestionnaireDefinitionDTO.java
public List<SectionDTO> getSections() { return Collections.unmodifiableList(sections); }
From source file:com.cognifide.qa.bb.scope.frame.FramePath.java
/** * @return Frame path as a list of FrameDescriptors. */ public List<FrameDescriptor> getFrames() { return Collections.unmodifiableList(frames); }
From source file:com.cloudbees.workflow.rest.external.StageNodeExt.java
/** Return full list of child node IDs */ @JsonIgnore // Just in case public List<String> getAllChildNodeIds() { return Collections.unmodifiableList(allChildNodeIds); }