Java Code Examples for java.util.Collections#checkedCollection()

The following examples show how to use java.util.Collections#checkedCollection() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
protected Collection<String> getObject() {
    List<String> list = Collections.singletonList("string");
    return Collections.checkedCollection(list, String.class);
}
 
Example 2
protected Collection<String> getAnotherObject() {
    List<String> list = Collections.emptyList();
    return Collections.checkedCollection(list, String.class);
}
 
Example 3
protected Collection<String> getObject() {
    List<String> list = Collections.singletonList("string");
    return Collections.checkedCollection(list, String.class);
}
 
Example 4
protected Collection<String> getAnotherObject() {
    List<String> list = Collections.emptyList();
    return Collections.checkedCollection(list, String.class);
}
 
Example 5
protected Collection<String> getObject() {
    List<String> list = Collections.singletonList("string");
    return Collections.checkedCollection(list, String.class);
}
 
Example 6
protected Collection<String> getAnotherObject() {
    List<String> list = Collections.emptyList();
    return Collections.checkedCollection(list, String.class);
}
 
Example 7
protected Collection<String> getAnotherObject() {
    List<String> list = Collections.emptyList();
    return Collections.checkedCollection(list, String.class);
}
 
Example 8
protected Collection<String> getAnotherObject() {
    List<String> list = Collections.emptyList();
    return Collections.checkedCollection(list, String.class);
}
 
Example 9
protected Collection<String> getObject() {
    List<String> list = Collections.singletonList("string");
    return Collections.checkedCollection(list, String.class);
}
 
Example 10
protected Collection<String> getAnotherObject() {
    List<String> list = Collections.emptyList();
    return Collections.checkedCollection(list, String.class);
}
 
Example 11
protected Collection<String> getObject() {
    List<String> list = Collections.singletonList("string");
    return Collections.checkedCollection(list, String.class);
}
 
Example 12
protected Collection<String> getAnotherObject() {
    List<String> list = Collections.emptyList();
    return Collections.checkedCollection(list, String.class);
}
 
Example 13
protected Collection<String> getObject() {
    List<String> list = Collections.singletonList("string");
    return Collections.checkedCollection(list, String.class);
}
 
Example 14
protected Collection<String> getAnotherObject() {
    List<String> list = Collections.emptyList();
    return Collections.checkedCollection(list, String.class);
}
 
Example 15
protected Collection<String> getObject() {
    List<String> list = Collections.singletonList("string");
    return Collections.checkedCollection(list, String.class);
}
 
Example 16
Source Project: j2objc   File: Collections2Test.java    License: Apache License 2.0 4 votes vote down vote up
public void test_checkedCollectionSerializationCompatability() throws Exception {
    Collection<String> c = Collections.emptySet();
    c = Collections.checkedCollection(c, String.class);
    SerializationTester.assertCompabilityEquals(c, "serialization/org/apache/harmony/tests/java/util/Collections_CheckedCollection.golden.ser");
}
 
Example 17
protected Collection<String> getObject() {
    List<String> list = Collections.singletonList("string");
    return Collections.checkedCollection(list, String.class);
}
 
Example 18
protected Collection<String> getAnotherObject() {
    List<String> list = Collections.emptyList();
    return Collections.checkedCollection(list, String.class);
}
 
Example 19
protected Collection<String> getObject() {
    List<String> list = Collections.singletonList("string");
    return Collections.checkedCollection(list, String.class);
}
 
Example 20
protected Collection<String> getAnotherObject() {
    List<String> list = Collections.emptyList();
    return Collections.checkedCollection(list, String.class);
}