/** Returns a synchronized prefix map backed by the given prefix map. * * @param prefixMap the prefix map to be wrapped in a synchronized map. * @return a synchronized view of the specified prefix map. */ public static <T extends CharSequence> PrefixMap<T> synchronize(final PrefixMap<T> prefixMap) { return new SynchronizedPrefixMap<>(prefixMap); } }
/** Returns a synchronized string map backed by the given string map. * * @param stringMap the string map to be wrapped in a synchronized map. * @return a synchronized view of the specified string map. */ public static <T extends CharSequence> StringMap<T> synchronize(final StringMap<T> stringMap) { return stringMap instanceof PrefixMap ? new SynchronizedPrefixMap<>((PrefixMap<T>)stringMap) : new SynchronizedStringMap<>(stringMap); }
/** Returns a synchronized prefix map backed by the given prefix map. * * @param prefixMap the prefix map to be wrapped in a synchronized map. * @return a synchronized view of the specified prefix map. */ public static <T extends CharSequence> PrefixMap<T> synchronize( final PrefixMap<T> prefixMap ) { return new SynchronizedPrefixMap<T>( prefixMap ); } }
/** Returns a synchronized prefix map backed by the given prefix map. * * @param prefixMap the prefix map to be wrapped in a synchronized map. * @return a synchronized view of the specified prefix map. */ public static <T extends CharSequence> PrefixMap<T> synchronize( final PrefixMap<T> prefixMap ) { return new SynchronizedPrefixMap<T>( prefixMap ); } }
/** Returns a synchronized string map backed by the given string map. * * @param stringMap the string map to be wrapped in a synchronized map. * @return a synchronized view of the specified string map. */ public static <T extends CharSequence> StringMap<T> synchronize( final StringMap<T> stringMap ) { return stringMap instanceof PrefixMap ? new SynchronizedPrefixMap<T>( (PrefixMap<T>)stringMap ) : new SynchronizedStringMap<T>( stringMap ); }
/** Returns a synchronized string map backed by the given string map. * * @param stringMap the string map to be wrapped in a synchronized map. * @return a synchronized view of the specified string map. */ public static <T extends CharSequence> StringMap<T> synchronize( final StringMap<T> stringMap ) { return stringMap instanceof PrefixMap ? new SynchronizedPrefixMap<T>( (PrefixMap<T>)stringMap ) : new SynchronizedStringMap<T>( stringMap ); }