List of usage examples for org.apache.commons.collections4.bidimap UnmodifiableBidiMap UnmodifiableBidiMap
@SuppressWarnings("unchecked") private UnmodifiableBidiMap(final BidiMap<? extends K, ? extends V> map)
From source file:de.decoit.simu.cbor.xml.dictionary.DictionaryComplexElement.java
/** * Return an immutable view of the nested elements map for testing purposes. * * @return Immutable map view//ww w . j a v a 2s. c o m */ BidiMap<String, DictionarySimpleElement> getUnmodifiableNestedElements() { return UnmodifiableBidiMap.unmodifiableBidiMap(this.nestedElements); }
From source file:de.decoit.simu.cbor.xml.dictionary.DictionaryEnumValueAttribute.java
/** * Return an immutable view of the enum values map for testing purposes. * * @return Immutable map view// ww w . ja v a 2 s . c o m */ BidiMap<String, DataItem> getUnmodifiableEnumValues() { return UnmodifiableBidiMap.unmodifiableBidiMap(this.enumValues); }
From source file:de.decoit.simu.cbor.xml.dictionary.DictionaryNamespace.java
/** * Return an immutable view of the elements map for testing purposes. * * @return Immutable map view// w w w. j a v a2s . co m */ BidiMap<String, DictionarySimpleElement> getUnmodifiableElements() { return UnmodifiableBidiMap.unmodifiableBidiMap(this.elements); }
From source file:de.decoit.simu.cbor.xml.dictionary.DictionarySimpleElement.java
/** * Return an immutable view of the attributes map for testing purposes. * * @return Immutable map view/*from ww w . ja va2s .c o m*/ */ BidiMap<String, DictionarySimpleAttribute> getUnmodifiableAttributes() { return UnmodifiableBidiMap.unmodifiableBidiMap(this.attributes); }
From source file:it.matjaz.jnumerus.RomanCharMapFactory.java
/** * Constructs an unmodifiable DualHashBidiMap with 13 entries <roman * character, its integer value>. * <p>/*from w w w . j av a 2s.co m*/ * The BidiMap correlates roman characters stored as Strings and their * integer values. Those entries are used for conversions of whole Strings * of roman numerals. The Map is unmodifiable. * <p> * The map returned by this method is a * <a href="http://commons.apache.org/proper/commons-collections/javadocs/api-release/org/apache/commons/collections4/bidimap/package-summary.html">BidiMap</a> * from the * <a href="http://commons.apache.org/proper/commons-collections/">Apache * Commons Collection 4.0</a>, which means it can be accessed by its keys * with {@code get(Object)} or by its values with {@code getKey(Object)}. * The Map is filled by inserting values from the {@link #generateCharMap() * }. * <p> * The followind table offers a representation of the content of the * generated structure: * * <pre> * key val * rom int * ------- * M 1000 * CM 900 * D 500 * CD 400 * C 100 * XC 90 * L 50 * XL 40 * X 10 * IX 9 * V 5 * IV 4 * I 1 * </pre> * * @return DualHashBidiMap<String, Integer> containing roman * characters as and the respective integer values. * @see * <a href="http://commons.apache.org/proper/commons-collections/javadocs/api-release/org/apache/commons/collections4/bidimap/package-summary.html"> * org.apache.commons.collections4.bidimap</a> */ public static BidiMap generateBidiCharMap() { DualHashBidiMap bidiMap = new DualHashBidiMap(generateCharMap()); return UnmodifiableBidiMap.unmodifiableBidiMap(bidiMap); }
From source file:de.decoit.simu.cbor.xml.dictionary.Dictionary.java
/** * Return an immutable view of the namespaces map for testing purposes. * * @return Immutable map view/*from w ww . j a v a2 s .c o m*/ */ BidiMap<String, DictionaryNamespace> getUnmodifiableNamespaces() { return UnmodifiableBidiMap.unmodifiableBidiMap(this.namespaces); }