aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java
diff options
context:
space:
mode:
authorGravatar Francois-Rene Rideau <tunes@google.com>2015-03-02 19:52:39 +0000
committerGravatar Ulf Adams <ulfjack@google.com>2015-03-05 14:16:49 +0000
commitc673a82bea3457cf51de51df73759ac947feadcb (patch)
treef892986eaaa810c387b1e58c28bf6326737df217 /src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java
parentedf7bdb0e4e62c75a8ac889ebfc01519af1c20e4 (diff)
Minor cleanups in Skylark
-- MOS_MIGRATED_REVID=87535290
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java
index c30824f1af..4e25b771b0 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java
@@ -312,7 +312,7 @@ public abstract class SkylarkList implements Iterable<Object> {
/**
* @param elements the contents of the list
* @param contentType a Java class for the contents of the list
- * @return a Skylark list containing elements without a type check.
+ * @return a Skylark list containing elements without a type check
* Only use if you already know for sure all elements are of the specified type.
*/
@SuppressWarnings("unchecked")
@@ -323,11 +323,12 @@ public abstract class SkylarkList implements Iterable<Object> {
/**
* @param elements the contents of the list
* @param contentType a SkylarkType for the contents of the list
- * @return a Skylark list without a type check and without creating an immutable copy.
+ * @return a Skylark list without a type check and without creating an immutable copy
* Therefore the iterable containing elements must be immutable
* (which is not checked here so callers must be extra careful).
* This way it's possibly to create a SkylarkList without requesting the original iterator.
* This can be useful for nested set - list conversions.
+ * Only use if you already know for sure all elements are of the specified type.
*/
@SuppressWarnings("unchecked")
public static SkylarkList lazyList(Iterable<?> elements, SkylarkType contentType) {
@@ -337,11 +338,12 @@ public abstract class SkylarkList implements Iterable<Object> {
/**
* @param elements the contents of the list
* @param contentType a Java class for the contents of the list
- * @return a Skylark list without a type check and without creating an immutable copy.
+ * @return a Skylark list without a type check and without creating an immutable copy
* Therefore the iterable containing elements must be immutable
* (which is not checked here so callers must be extra careful).
* This way it's possibly to create a SkylarkList without requesting the original iterator.
* This can be useful for nested set - list conversions.
+ * Only use if you already know for sure all elements are of the specified type.
*/
@SuppressWarnings("unchecked")
public static SkylarkList lazyList(Iterable<?> elements, Class<?> contentType) {