Class SymbolicValue.SymArray
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.symbols.SymbolicValue.SymArray
-
- All Implemented Interfaces:
SymbolicValue
- Enclosing interface:
- SymbolicValue
public static final class SymbolicValue.SymArray extends Object implements SymbolicValue
An array of values.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sourceforge.pmd.lang.java.symbols.SymbolicValue
SymbolicValue.SymAnnot, SymbolicValue.SymArray, SymbolicValue.SymClass, SymbolicValue.SymEnum, SymbolicValue.SymValue
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsValue(Object value)
Return true if this array contains the given object.boolean
equals(Object o)
Returns true if this value is equal to the other one.static SymbolicValue.SymArray
forElements(List<SymbolicValue> values)
Returns a SymArray for a list of symbolic values.int
hashCode()
int
length()
String
toString()
boolean
valueEquals(Object o)
Returns true if this symbolic value represents the same value as the given object.
-
-
-
Method Detail
-
forElements
public static SymbolicValue.SymArray forElements(List<SymbolicValue> values)
Returns a SymArray for a list of symbolic values.- Parameters:
values
- The elements- Throws:
NullPointerException
- if the parameter is null
-
length
public int length()
-
containsValue
public boolean containsValue(Object value)
Return true if this array contains the given object. If the object is aSymbolicValue
, it usesequals(Object)
, otherwise it usesvalueEquals(Object)
to compare elements.
-
valueEquals
public boolean valueEquals(Object o)
Description copied from interface:SymbolicValue
Returns true if this symbolic value represents the same value as the given object. If the parameter is null, returns false.- Specified by:
valueEquals
in interfaceSymbolicValue
-
equals
public boolean equals(Object o)
Description copied from interface:SymbolicValue
Returns true if this value is equal to the other one. The parameter must be aSymbolicValue
of the same type. UseSymbolicValue.valueEquals(Object)
to compare to a java object.- Specified by:
equals
in interfaceSymbolicValue
- Overrides:
equals
in classObject
-
-