// Path: retired/regions/src/main/java/org/javamoney/regions/Region.java
// public interface Region {
// 
// 	/**
// 	 * Get the region's type.
// 	 * 
// 	 * @return the region's type, never {@code null}.
// 	 */
// 	public RegionType getRegionType();
// 
// 	/**
// 	 * Access the region's code. The code is unique in combination with the
// 	 * region type.
// 	 * 
// 	 * @return the region's type, never {@code null}.
// 	 */
// 	public String getRegionCode();
// 
// 	/**
// 	 * Get the region's numeric code. If not defined -1 is returned.
// 	 * 
// 	 * @return the numeric region code, or {@code -1}.
// 	 */
// 	public int getNumericRegionCode();
// 
// 	/**
// 	 * Return the time zones valid for this region (in the long form, e.g.
// 	 * Europe/Berlin). If the region has subregions, by default, the timezones
// 	 * returned should be the transitive closure of all timezones of all child
// 	 * regions. Nevertheless there might be use cases were the child regions
// 	 * must not transitively define the parents timezones, so transitivity is
// 	 * not enforced by this JSR.<br/>
// 	 * Additionally all ids returned should be known by {@link java.util.TimeZone}.
// 	 * 
// 	 * @return the timezone ids of this region, never {@code null}.
// 	 */
// 	public Collection<String> getTimezoneIds();
// 
// 	/**
// 	 * Return according {@link java.util.Locale}, if possible.
// 	 * 
// 	 * @return the corresponding {@link java.util.Locale} for that {@link org.javamoney.regions.Region}, may
// 	 *         also return {@code null}.
// 	 */
// 	public Locale getLocale();
// 
// }
// 
// Path: retired/regions/src/main/java/org/javamoney/regions/spi/ExtendedRegionDataProviderSpi.java
// public interface ExtendedRegionDataProviderSpi {
// 
// 	/**
// 	 * Get the extended data types, that can be accessed from this
// 	 * {@link Region} by calling {@link #getRegionData(Class)}.
// 	 * 
// 	 * @param region
// 	 *            the region for which addition data is requested.
// 	 * @return the collection of supported region data, may be {@code empty} but
// 	 *         never {@code null}.
// 	 */
// 	public Collection<Class> getExtendedRegionDataTypes(Region region);
// 
// 	/**
// 	 * Access the additional region data, using its type.
// 	 * <p>
// 	 * Note different to the API this method does never throw an
// 	 * {@link IllegalArgumentException} when the required type is not supported,
// 	 * but simply should return {@code null}.
// 	 * 
// 	 * @param region
// 	 *            the region for which addition data is requested.
// 	 * @param type
// 	 *            The region data type, not {@code null}.
// 	 * @return the corresponding data item, or {@code null} if the type passed
// 	 *         is not supported.
// 	 */
// 	public <T> T getExtendedRegionData(Region region, Class<T> type);
// 
// }


import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.javamoney.regions.Region;
import org.javamoney.regions.spi.ExtendedRegionDataProviderSpi;
/*
 * Copyright (c) 2012, 2013, Credit Suisse (Anatole Tresch), Werner Keil.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.javamoney.regions.internal.data;



/**
 * Implementation for {@link Region} based on ICU4J's
 * {@link com.ibm.icu.util.Region}.
 * 
 * @author Anatole Tresch
 * 
 */
public class IcuRegionExtRegionDataProvider implements
		ExtendedRegionDataProviderSpi {

	private static final List<Class> REGION_DATATYPES = Arrays
			.asList(new Class[] { IcuRegion.class });

	/*
	 * (non-Javadoc)
	 * 
	 * @see javax.money.ext.Region#getRegionDataTypes()
	 */
	@Override
// Path: retired/regions/src/main/java/org/javamoney/regions/Region.java
// public interface Region {
// 
// 	/**
// 	 * Get the region's type.
// 	 * 
// 	 * @return the region's type, never {@code null}.
// 	 */
// 	public RegionType getRegionType();
// 
// 	/**
// 	 * Access the region's code. The code is unique in combination with the
// 	 * region type.
// 	 * 
// 	 * @return the region's type, never {@code null}.
// 	 */
// 	public String getRegionCode();
// 
// 	/**
// 	 * Get the region's numeric code. If not defined -1 is returned.
// 	 * 
// 	 * @return the numeric region code, or {@code -1}.
// 	 */
// 	public int getNumericRegionCode();
// 
// 	/**
// 	 * Return the time zones valid for this region (in the long form, e.g.
// 	 * Europe/Berlin). If the region has subregions, by default, the timezones
// 	 * returned should be the transitive closure of all timezones of all child
// 	 * regions. Nevertheless there might be use cases were the child regions
// 	 * must not transitively define the parents timezones, so transitivity is
// 	 * not enforced by this JSR.<br/>
// 	 * Additionally all ids returned should be known by {@link java.util.TimeZone}.
// 	 * 
// 	 * @return the timezone ids of this region, never {@code null}.
// 	 */
// 	public Collection<String> getTimezoneIds();
// 
// 	/**
// 	 * Return according {@link java.util.Locale}, if possible.
// 	 * 
// 	 * @return the corresponding {@link java.util.Locale} for that {@link org.javamoney.regions.Region}, may
// 	 *         also return {@code null}.
// 	 */
// 	public Locale getLocale();
// 
// }
// 
// Path: retired/regions/src/main/java/org/javamoney/regions/spi/ExtendedRegionDataProviderSpi.java
// public interface ExtendedRegionDataProviderSpi {
// 
// 	/**
// 	 * Get the extended data types, that can be accessed from this
// 	 * {@link Region} by calling {@link #getRegionData(Class)}.
// 	 * 
// 	 * @param region
// 	 *            the region for which addition data is requested.
// 	 * @return the collection of supported region data, may be {@code empty} but
// 	 *         never {@code null}.
// 	 */
// 	public Collection<Class> getExtendedRegionDataTypes(Region region);
// 
// 	/**
// 	 * Access the additional region data, using its type.
// 	 * <p>
// 	 * Note different to the API this method does never throw an
// 	 * {@link IllegalArgumentException} when the required type is not supported,
// 	 * but simply should return {@code null}.
// 	 * 
// 	 * @param region
// 	 *            the region for which addition data is requested.
// 	 * @param type
// 	 *            The region data type, not {@code null}.
// 	 * @return the corresponding data item, or {@code null} if the type passed
// 	 *         is not supported.
// 	 */
// 	public <T> T getExtendedRegionData(Region region, Class<T> type);
// 
// }


// Path: retired/regions/src/main/java/org/javamoney/regions/internal/data/IcuRegionExtRegionDataProvider.java
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.javamoney.regions.Region;
import org.javamoney.regions.spi.ExtendedRegionDataProviderSpi;

/*
 * Copyright (c) 2012, 2013, Credit Suisse (Anatole Tresch), Werner Keil.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.javamoney.regions.internal.data;



/**
 * Implementation for {@link Region} based on ICU4J's
 * {@link com.ibm.icu.util.Region}.
 * 
 * @author Anatole Tresch
 * 
 */
public class IcuRegionExtRegionDataProvider implements
		ExtendedRegionDataProviderSpi {

	private static final List<Class> REGION_DATATYPES = Arrays
			.asList(new Class[] { IcuRegion.class });

	/*
	 * (non-Javadoc)
	 * 
	 * @see javax.money.ext.Region#getRegionDataTypes()
	 */
	@Override
	public Collection<Class> getExtendedRegionDataTypes(Region region) {