List of usage examples for java.util Collections unmodifiableList
public static <T> List<T> unmodifiableList(List<? extends T> list)
From source file:hudson.plugins.unityasset.scm.UnityChangelogSet.java
public Iterator<UnityChangelog> iterator() { return Collections.unmodifiableList(logs).iterator(); }
From source file:fr.ritaly.dungeonmaster.item.Scroll.java
/** * Returns the scroll's text as a list.//from w ww .j a v a2 s. c o m * * @return a list of strings. Never returns null. */ public List<String> getText() { return Collections.unmodifiableList(text); }
From source file:net.dv8tion.jda.bot.utils.cache.impl.ShardCacheViewImpl.java
@Override public List<JDA> asList() { return Collections.unmodifiableList(new ArrayList<>(elements.valueCollection())); }
From source file:gov.nih.nci.caarray.validation.ValidationResult.java
/** * Returns the messages ordered by file, type and location. * //www . j a v a 2 s .c o m * @return the messages. */ public List<ValidationMessage> getMessages() { final List<ValidationMessage> messages = new ArrayList<ValidationMessage>(); for (final FileValidationResult fileValidationResult : getFileValidationResults()) { messages.addAll(fileValidationResult.getMessages()); } return Collections.unmodifiableList(messages); }
From source file:Main.java
/** * Internal methods to generate fuzzing payloads that will applied<br> * // w w w . j av a 2s . c o m * @return Fuzzing payloads as a form of a list of string */ private static List<String> defineFuzzingPayloads() { if (PAYLOADS_CACHE.isEmpty()) { // Empty value PAYLOADS_CACHE.add(""); // Quote to test SQLi PAYLOADS_CACHE.add("'"); // Quote X2 to test SQLi PAYLOADS_CACHE.add("''"); // Double quote to test SQLi PAYLOADS_CACHE.add("\""); // Expression to test SQLi (test presence of SQLite DB) PAYLOADS_CACHE.add("and sqlite3_sleep(60000) --"); // Pipe and Semi-colon/comma to test command injection PAYLOADS_CACHE.add("|"); PAYLOADS_CACHE.add(";"); PAYLOADS_CACHE.add(","); // String with a special length in order to test Buffer Overflow PAYLOADS_CACHE.add(generateFixedLengthString(8)); PAYLOADS_CACHE.add(generateFixedLengthString(16)); PAYLOADS_CACHE.add(generateFixedLengthString(32)); PAYLOADS_CACHE.add(generateFixedLengthString(64)); PAYLOADS_CACHE.add(generateFixedLengthString(128)); PAYLOADS_CACHE.add(generateFixedLengthString(256)); PAYLOADS_CACHE.add(generateFixedLengthString(512)); PAYLOADS_CACHE.add(generateFixedLengthString(1024)); PAYLOADS_CACHE.add(generateFixedLengthString(2048)); PAYLOADS_CACHE.add(generateFixedLengthString(4096)); PAYLOADS_CACHE.add(generateFixedLengthString(8192)); // Non alphanumeric characters to test unexpected behavior // See ASCII table: // http://www.asciitable.com/index/asciifull.gif // http://4toc.com/fb/FBHelp/gfx/AppF_ASCIITable.png for (int i = 0; i <= 47; i++) { PAYLOADS_CACHE.add(String.valueOf((char) i)); } PAYLOADS_CACHE.add(":"); for (int i = 60; i <= 64; i++) { PAYLOADS_CACHE.add(String.valueOf((char) i)); } for (int i = 91; i <= 96; i++) { PAYLOADS_CACHE.add(String.valueOf((char) i)); } for (int i = 123; i <= 255; i++) { PAYLOADS_CACHE.add(String.valueOf((char) i)); } // Alphanumeric to test unexpected behavior for (int i = 65; i <= 90; i++) { PAYLOADS_CACHE.add(String.valueOf((char) i)); } for (int i = 0; i <= 9; i++) { PAYLOADS_CACHE.add(Integer.toString(i)); } } return Collections.unmodifiableList(PAYLOADS_CACHE); }
From source file:ee.ria.xroad.common.RequestProps.java
/** * @return request content as a read-only list */ public List<RequestTag> getContent() { return Collections.unmodifiableList(content); }
From source file:candr.yoclip.ParseResult.java
/** * The creation of the parse result guarantees the bean and errors list members are not null. * * @param bean The class instance passed into the parse operation. * @throws java.lang.IllegalArgumentException if the bean instance is {@code null}. *//*from www.java 2 s .com*/ public ParseResult(final T bean) { if (null == bean) { throw new IllegalArgumentException("The bean parameter cannot be null"); } this.bean = bean; errors = new LinkedList<ParsedOption<T>>(); immutableErrors = Collections.unmodifiableList(errors); }
From source file:com.petclinic.entity.postgres.Vet.java
@XmlElement public List<Specialty> getSpecialties() { List<Specialty> sortedSpecs = new ArrayList<>(getSpecialtiesInternal()); PropertyComparator.sort(sortedSpecs, new MutableSortDefinition("name", true, true)); return Collections.unmodifiableList(sortedSpecs); }
From source file:com.aeells.hibernate.model.Parent.java
public List<Child> getChildren() { return Collections.unmodifiableList(this.children); }
From source file:jodtemplate.pptx.Presentation.java
public List<Slide> getSlides() { return Collections.unmodifiableList(new ArrayList<>(slides)); }