Tabnine Logo
Types.isEnum
Code IndexAdd Tabnine to your IDE (free)

How to use
isEnum
method
in
js.util.Types

Best Java code snippets using js.util.Types.isEnum (Showing top 3 results out of 315)

origin: com.js-lib/js-commons

/**
 * Test if object instance is enumeration. Returns true if given object is enumeration instance or false otherwise.
 * Returns also false if object is null.
 * 
 * @param o object instance to test, possible null.
 * @return true if instance is enumeration.
 */
public static boolean isEnum(Object o)
{
 return o != null && isEnum(o.getClass());
}
origin: com.js-lib/js-xhtml-template

  value = value.toString();
if (Types.isEnum(value)) {
  value = ((Enum<?>) value).name();
origin: com.js-lib/js-commons

/**
 * Test if type is like a primitive? Return true only if given type is a number, boolean, enumeration, character or
 * string.
 * 
 * @param t type to test.
 * @return true if this type is like a primitive.
 */
public static boolean isPrimitiveLike(Type t)
{
 if(isNumber(t)) {
  return true;
 }
 if(isBoolean(t)) {
  return true;
 }
 if(isEnum(t)) {
  return true;
 }
 if(isCharacter(t)) {
  return true;
 }
 if(isDate(t)) {
  return true;
 }
 if(t == String.class) {
  return true;
 }
 return false;
}
js.utilTypesisEnum

Javadoc

Test if object instance is enumeration. Returns true if given object is enumeration instance or false otherwise. Returns also false if object is null.

Popular methods of Types

  • isArrayLike
    Test if type is array like, that is, array or collection. Uses #isArray(Type) and #isCollection(Type
  • isMap
    Test if type is map. Returns true if type implements, directly or through inheritance, Map interface
  • isBoolean
    Test if type is a boolean primitive or boxing class.
  • isKindOf
    Determine if a given type is a kind of one of the requested types to match. Traverses typesToMatch a
  • isNumber
    Test if type is numeric. A type is considered numeric if is a Java standard class representing a num
  • isPrimitiveLike
    Test if type is like a primitive? Return true only if given type is a number, boolean, enumeration,
  • asIterable
    Convert object instance to iterable. If object instance is an array or a collection returns an itera
  • isArray
    Test if type is array. If type is a class return Class#isArray() predicate value; otherwise test if
  • isCollection
    Test if type is collection. Returns true if type implements, directly or through inheritance, Collec
  • isDate
    Test if type is a calendar date.
  • isInstanceOf
    Test if object instance is not null and extends or implements expected type. This predicate consider
  • isPrimitive
    Test if type is primitive. Primitive types are those considered so by Class#isPrimitive().
  • isInstanceOf,
  • isPrimitive,
  • isVoid,
  • asBoolean,
  • equalsAny,
  • getEmptyValue,
  • isCharacter,
  • isConcrete,
  • isEqual

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • JTable (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now