📄 containutil.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: ContainUtil.java
package org.apache.struts2.util;
import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Map;
public class ContainUtil
{
public ContainUtil()
{
}
public static boolean contains(Object obj1, Object obj2)
{
if (obj1 == null || obj2 == null)
return false;
if (obj1 instanceof Map)
{
if (((Map)obj1).containsKey(obj2))
return true;
} else
if (obj1 instanceof Collection)
{
if (((Collection)obj1).contains(obj2) || ((Collection)obj1).contains(obj2.toString()))
return true;
} else
if (obj1.getClass().isArray())
{
for (int i = 0; i < Array.getLength(obj1); i++)
{
Object value = null;
value = Array.get(obj1, i);
if (value.equals(obj2))
return true;
}
} else
{
if (obj1.toString().equals(obj2.toString()))
return true;
if (obj1.equals(obj2))
return true;
}
return false;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -