org.apache.commons.collections.set.UnmodifiableSet Java Examples

The following examples show how to use org.apache.commons.collections.set.UnmodifiableSet. 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
Source File: BeanMap.java    From Penetration_Testing_POC with Apache License 2.0 5 votes vote down vote up
/**
 * Gets a Set of MapEntry objects that are the mappings for this BeanMap.
 * <p>
 * Each MapEntry can be set but not removed.
 * 
 * @return the unmodifiable set of mappings
 */
public Set entrySet() {
    return UnmodifiableSet.decorate(new AbstractSet() {
        public Iterator iterator() {
            return entryIterator();
        }
        public int size() {
          return BeanMap.this.readMethods.size();
        }
    });
}
 
Example #2
Source File: AbstractMapBag.java    From Penetration_Testing_POC with Apache License 2.0 5 votes vote down vote up
/**
 * Returns an unmodifiable view of the underlying map's key set.
 *
 * @return the set of unique elements in this bag
 */
public Set uniqueSet() {
    if (uniqueSet == null) {
        uniqueSet = UnmodifiableSet.decorate(map.keySet());
    }
    return uniqueSet;
}
 
Example #3
Source File: UnmodifiableSortedBidiMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set keySet() {
    Set set = super.keySet();
    return UnmodifiableSet.decorate(set);
}
 
Example #4
Source File: UnmodifiableMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set keySet() {
    Set set = super.keySet();
    return UnmodifiableSet.decorate(set);
}
 
Example #5
Source File: UnmodifiableBidiMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set keySet() {
    Set set = super.keySet();
    return UnmodifiableSet.decorate(set);
}
 
Example #6
Source File: UnmodifiableOrderedBidiMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set keySet() {
    Set set = super.keySet();
    return UnmodifiableSet.decorate(set);
}
 
Example #7
Source File: UnmodifiableBag.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set uniqueSet() {
    Set set = getBag().uniqueSet();
    return UnmodifiableSet.decorate(set);
}
 
Example #8
Source File: UnmodifiableSortedBag.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set uniqueSet() {
    Set set = getBag().uniqueSet();
    return UnmodifiableSet.decorate(set);
}
 
Example #9
Source File: UnmodifiableOrderedMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set keySet() {
    Set set = super.keySet();
    return UnmodifiableSet.decorate(set);
}
 
Example #10
Source File: FixedSizeSortedMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set keySet() {
    Set set = map.keySet();
    return UnmodifiableSet.decorate(set);
}
 
Example #11
Source File: FixedSizeSortedMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set entrySet() {
    Set set = map.entrySet();
    return UnmodifiableSet.decorate(set);
}
 
Example #12
Source File: FixedSizeMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set keySet() {
    Set set = map.keySet();
    return UnmodifiableSet.decorate(set);
}
 
Example #13
Source File: FixedSizeMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set entrySet() {
    Set set = map.entrySet();
    // unmodifiable set will still allow modification via Map.Entry objects
    return UnmodifiableSet.decorate(set);
}
 
Example #14
Source File: UnmodifiableSortedMap.java    From Penetration_Testing_POC with Apache License 2.0 4 votes vote down vote up
public Set keySet() {
    Set set = super.keySet();
    return UnmodifiableSet.decorate(set);
}
 
Example #15
Source File: SetUniqueList.java    From Penetration_Testing_POC with Apache License 2.0 2 votes vote down vote up
/**
 * Gets an unmodifiable view as a Set.
 * 
 * @return an unmodifiable set view
 */
public Set asSet() {
    return UnmodifiableSet.decorate(set);
}
 
Example #16
Source File: BeanMap.java    From Penetration_Testing_POC with Apache License 2.0 2 votes vote down vote up
/**
 * Get the keys for this BeanMap.
 * <p>
 * Write-only properties are <b>not</b> included in the returned set of
 * property names, although it is possible to set their value and to get 
 * their type.
 * 
 * @return BeanMap keys.  The Set returned by this method is not
 *        modifiable.
 */
public Set keySet() {
    return UnmodifiableSet.decorate(readMethods.keySet());
}
 
Example #17
Source File: SetUtils.java    From Penetration_Testing_POC with Apache License 2.0 2 votes vote down vote up
/**
 * Returns an unmodifiable set backed by the given set.
 * <p>
 * This method uses the implementation in the decorators subpackage.
 *
 * @param set  the set to make unmodifiable, must not be null
 * @return an unmodifiable set backed by the given set
 * @throws IllegalArgumentException  if the set is null
 */
public static Set unmodifiableSet(Set set) {
    return UnmodifiableSet.decorate(set);
}
 
Example #18
Source File: DefaultMapBag.java    From Penetration_Testing_POC with Apache License 2.0 2 votes vote down vote up
/**
 * Returns an unmodifiable view of the underlying map's key set.
 *
 * @return the set of unique elements in this bag
 */
public Set uniqueSet() {
    return UnmodifiableSet.decorate(_map.keySet());
}