Java AbstractMap Usage getClassType(Object obj)

Here you can find the source of getClassType(Object obj)

Description

get Class Type

License

Open Source License

Declaration

public static int getClassType(Object obj) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int getClassType(Object obj) {

        Class<?> collection = java.util.AbstractCollection.class;
        Class<?> map = java.util.AbstractMap.class;

        if (collection.isInstance(obj)) {
            return 1;
        } else if (map.isInstance(obj)) {
            return 2;
        } else {//from  w w  w.  j  av a2s.  c o m
            return 0;
        }

    }
}

Related

  1. buildClause(String key, String... values)
  2. countLinesColumns(String text, int initialLinesCnt, int initialColumnsCnt)
  3. decodeIconUrl(String path)
  4. getSymmetricPropertyValueDifference( Properties propertyFileOne, Properties propertyFileTwo)
  5. parseEntityURI(final String uri)
  6. parseExportedVariable(String exportedVariable)
  7. parseSocketAddress(String address)