Java Code Examples for java.util.Collections.emptySortedSet()

The following are Jave code examples for showing how to use emptySortedSet() of the java.util.Collections class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: n4js   File: SpecInfo.java   View Source Code Vote up 5 votes
/**
 * Returns set of {@link SpecTestInfo}s related to member.
 *
 * @return maybe empty set, never null
 */
public SortedSet<SpecTestInfo> getTestsForMember(TMember member) {
	SortedSet<SpecTestInfo> testsForMember = relatedMemberTests.get(member);
	if (testsForMember == null) {
		return Collections.emptySortedSet();
	}
	return testsForMember;
}
 
Example 2
Project: openjdk-jdk10   File: ClassTree.java   View Source Code Vote up 5 votes
private SortedSet<TypeElement> directSubClasses0(TypeElement typeElement, boolean isEnum) {
    if (isEnum) {
        return get(subEnums, typeElement);
    } else if (utils.isAnnotationType(typeElement)) {
        return get(subAnnotationTypes, typeElement);
    } else if (utils.isInterface(typeElement)) {
        return get(subInterfaces, typeElement);
    } else if (utils.isClass(typeElement)) {
        return get(subClasses, typeElement);
    } else {
        return Collections.emptySortedSet();
    }
}