Guava ImmutableMultiset - 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 ImmutableMultiset class.

This code example shows how to use the following methods:iterator, size
 
    private static Variable computeFrame( 
            ImmutableMultiset<KItem> collectionPatterns,
            ImmutableMultiset<Term> collectionFunctions,
            ImmutableMultiset<Variable> collectionVariables) {
        if (collectionPatterns.isEmpty() && collectionFunctions.isEmpty() && collectionVariables.size() == 1) {
            return collectionVariables.iterator().next();
        } else { 
            return null; 
        } 
    } 
 
    /** 
     * Returns an unmodifiable view of the union of the patterns, functions and variables multisets. 
     * 
     * @see org.kframework.kil.CollectionBuiltin#baseTerms 
     */ 
    public Multiset<Term> baseTerms() {
        return Multisets.union(
                Multisets.union(collectionPatterns, collectionFunctions),
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:asList, size
    } 
 
    public String optv(int i)
    { 
        ImmutableMultiset<String> keys = _options.keys();
        return (i < keys.size()) ? keys.asList().get(i) : null;
    } 
 
    public void shift() 
    { 
        if (!_arguments.isEmpty()) {
            _arguments = _arguments.subList(1, _arguments.size());
        } 
    } 
 
    public void shift(int n)
    { 
        while (n-- > 0) {
            shift(); 
        } 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Guava ImmutableMultiset Methods: