Code example for ImmutableMultiset

Methods: iteratorsize

0
 
    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),