1 /* 2 // $Id: //open/mondrian/src/main/mondrian/util/UtilCompatible.java#1 $ 3 // This software is subject to the terms of the Common Public License 4 // Agreement, available at the following URL: 5 // http://www.opensource.org/licenses/cpl.html. 6 // Copyright (C) 2007-2007 Julian Hyde 7 // All Rights Reserved. 8 // You must accept the terms of that agreement to use this software. 9 */ 10 package mondrian.util; 11 12 import java.util.Set; 13 14 /** 15 * Interface containing methods which are implemented differently in different 16 * versions of the JDK. 17 * 18 * <p>The methods should not be called directly, only via the corresponding 19 * static methods in {@link mondrian.olap.Util}, namely:<ul> 20 * <li>{@link mondrian.olap.Util#enumSetOf(Enum, Enum[])}</li> 21 * <li>{@link mondrian.olap.Util#enumSetNoneOf(Class)}</li> 22 * <li>{@link mondrian.olap.Util#enumSetAllOf(Class)}</li> 23 * </ul></p> 24 * 25 * <p>This interface could in principle be extended to allow native 26 * implementations of methods, or to serve as a factory for entire classes 27 * which have different implementations in different environments.</p> 28 * 29 * @author jhyde 30 * @version $Id: //open/mondrian/src/main/mondrian/util/UtilCompatible.java#1 $ 31 * @since Feb 5, 2007 32 */ 33 public interface UtilCompatible { 34 <E extends Enum<E>> Set<E> enumSetOf(E first, E... rest); 35 <E extends Enum<E>> Set<E> enumSetNoneOf(Class<E> elementType); 36 <E extends Enum<E>> Set<E> enumSetAllOf(Class<E> elementType); 37 } 38 39 // End UtilCompatible.java 40