Package org.apache.struts2.util
Class ContainUtil
java.lang.Object
org.apache.struts2.util.ContainUtil
ContainUtil
will check if object 1 contains object 2.
Object 1 may be an Object, array, Collection, or a Map-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ContainUtil
public ContainUtil()
-
-
Method Details
-
contains
Determine ifobj2
exists inobj1
.Type Of obj1 Comparison type null always return false Map Map containsKey(obj2) Collection Collection contains(obj2) Array there's an array element (e) where e.equals(obj2) Object obj1.equals(obj2) - Parameters:
obj1
- first objectobj2
- second object- Returns:
- true if first object contains second object or if the are equals, otherwise false
-