Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
commons-lang-2.6.jar - Apache Commons Lang
commons-lang-2.6.jar is the JAR file for Apache Commons Lang 2.6, which provides a host of helper utilities for the java.lang API.
JAR File Size and Download Location:
File name: commons-lang-2.6.jar File size: 284220 bytes Date modified: 01/13/2011 Download: Apache Commons Lang Website
✍: FYIcenter
⏎ org/apache/commons/lang/enum/EnumUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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.apache.commons.lang.enum; import java.util.Iterator; import java.util.List; import java.util.Map; /** * <p>Utility class for accessing and manipulating {@link Enum}s.</p> * * @deprecated Replaced by {@link org.apache.commons.lang.enums.EnumUtils org.apache.commons.lang.enums.EnumUtils} * and will be removed in version 3.0. All classes in this package are deprecated and repackaged to * {@link org.apache.commons.lang.enums} since <code>enum</code> is a Java 1.5 keyword. * @see org.apache.commons.lang.enums.EnumUtils * @see Enum * @see ValuedEnum * @author Apache Software Foundation * @author Gary Gregory * @since 1.0 * @version $Id: EnumUtils.java 905636 2010-02-02 14:03:32Z niallp $ */ public class EnumUtils { /** * Public constructor. This class should not normally be instantiated. * @since 2.0 */ public EnumUtils() { super(); } /** * <p>Gets an <code>Enum</code> object by class and name.</p> * * @param enumClass the class of the <code>Enum</code> to get * @param name the name of the Enum to get, may be <code>null</code> * @return the enum object * @throws IllegalArgumentException if the enum class is <code>null</code> */ public static Enum getEnum(Class enumClass, String name) { return Enum.getEnum(enumClass, name); } /** * <p>Gets a <code>ValuedEnum</code> object by class and value.</p> * * @param enumClass the class of the <code>Enum</code> to get * @param value the value of the <code>Enum</code> to get * @return the enum object, or null if the enum does not exist * @throws IllegalArgumentException if the enum class is <code>null</code> */ public static ValuedEnum getEnum(Class enumClass, int value) { return (ValuedEnum) ValuedEnum.getEnum(enumClass, value); } /** * <p>Gets the <code>Map</code> of <code>Enum</code> objects by * name using the <code>Enum</code> class.</p> * * <p>If the requested class has no enum objects an empty * <code>Map</code> is returned. The <code>Map</code> is unmodifiable.</p> * * @param enumClass the class of the <code>Enum</code> to get * @return the enum object Map * @throws IllegalArgumentException if the enum class is <code>null</code> * @throws IllegalArgumentException if the enum class is not a subclass * of <code>Enum</code> */ public static Map getEnumMap(Class enumClass) { return Enum.getEnumMap(enumClass); } /** * <p>Gets the <code>List</code> of <code>Enum</code> objects using * the <code>Enum</code> class.</p> * * <p>The list is in the order that the objects were created * (source code order).</p> * * <p>If the requested class has no enum objects an empty * <code>List</code> is returned. The <code>List</code> is unmodifiable.</p> * * @param enumClass the class of the Enum to get * @return the enum object Map * @throws IllegalArgumentException if the enum class is <code>null</code> * @throws IllegalArgumentException if the enum class is not a subclass * of <code>Enum</code> */ public static List getEnumList(Class enumClass) { return Enum.getEnumList(enumClass); } /** * <p>Gets an <code>Iterator</code> over the <code>Enum</code> objects * in an <code>Enum</code> class.</p> * * <p>The iterator is in the order that the objects were created * (source code order).</p> * * <p>If the requested class has no enum objects an empty * <code>Iterator</code> is returned. The <code>Iterator</code> * is unmodifiable.</p> * * @param enumClass the class of the <code>Enum</code> to get * @return an <code>Iterator</code> of the <code>Enum</code> objects * @throws IllegalArgumentException if the enum class is <code>null</code> * @throws IllegalArgumentException if the enum class is not a subclass of <code>Enum</code> */ public static Iterator iterator(Class enumClass) { return Enum.getEnumList(enumClass).iterator(); } }
⏎ org/apache/commons/lang/enum/EnumUtils.java
⇒ commons-lang-1.0.1.jar - Apache Commons Lang
⇐ What Is commons-lang3-3.1.jar
2009-12-24, 75452👍, 0💬
Popular Posts:
What is the sax\Writer.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 insta...
JDK 17 jdk.hotspot.agent.jmod is the JMOD file for JDK 17 Hotspot Agent module. JDK 17 Hotspot Agent...
The JDT project provides the tool plug-ins that implement a Java IDE supporting the development of a...
JDK 17 java.xml.jmod is the JMOD file for JDK 17 XML (eXtensible Markup Language) module. JDK 17 XML...
What Is jaxb-api-2.1.6.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Java ...