Guava Sets.SetView - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava Sets.SetView class.

This code example shows how to use the following methods:isEmpty
    } 
 
    public Map<String, Class<?>> defineClasses(Map<String, byte[]> newClasses)
    { 
        SetView<String> conflicts = Sets.intersection(pendingClasses.keySet(), newClasses.keySet());
        Preconditions.checkArgument(conflicts.isEmpty(), "The classes %s have already been defined", conflicts);
 
        pendingClasses.putAll(newClasses);
        try { 
            Map<String, Class<?>> classes = new HashMap<>();
            for (String className : newClasses.keySet()) {
                try { 
                    Class<?> clazz = loadClass(className);
                    classes.put(className, clazz);
                } 
                catch (ClassNotFoundException e) {
                    // this should never happen 
                    throw Throwables.propagate(e);
                } 
            } 
4
CodeRank
This code example shows how to use the following methods:isEmpty
    } 
    if (a == null || b == null) {
      return false; 
    } 
    SetView<?> intersection = Sets.intersection(a, b);
    return intersection.isEmpty();
  } 
 
} 
4
CodeRank