Class PropertyType
- java.lang.Object
-
- org.owasp.dependencycheck.xml.suppression.PropertyType
-
@ThreadSafe public class PropertyType extends java.lang.ObjectA simple PropertyType used to represent a string value that could be used as a regular expression or could be case insensitive. The equals method has been over-ridden so that the object will correctly compare to strings.- Author:
- Jeremy Long
-
-
Constructor Summary
Constructors Constructor Description PropertyType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Default implementation of equals.java.lang.StringgetValue()Gets the value of the value property.inthashCode()Default implementation of hashCode.booleanisCaseSensitive()Gets the value of the caseSensitive property.booleanisRegex()Returns whether or not the value is a regex.booleanmatches(java.lang.String text)Uses the object's properties to determine if the supplied string matches the value of this property.voidsetCaseSensitive(boolean value)Sets the value of the caseSensitive property.voidsetRegex(boolean value)Sets whether the value property is a regex.voidsetValue(java.lang.String value)Sets the value of the value property.java.lang.StringtoString()Default implementation of toString().
-
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Gets the value of the value property.- Returns:
- the value of the value property
-
setValue
public void setValue(java.lang.String value)
Sets the value of the value property.- Parameters:
value- the value of the value property
-
isRegex
public boolean isRegex()
Returns whether or not the value is a regex.- Returns:
- true if the value is a regex, otherwise false
-
setRegex
public void setRegex(boolean value)
Sets whether the value property is a regex.- Parameters:
value- true if the value is a regex, otherwise false
-
isCaseSensitive
public boolean isCaseSensitive()
Gets the value of the caseSensitive property.- Returns:
- true if the value is case sensitive
-
setCaseSensitive
public void setCaseSensitive(boolean value)
Sets the value of the caseSensitive property.- Parameters:
value- whether the value is case sensitive
-
matches
public boolean matches(java.lang.String text)
Uses the object's properties to determine if the supplied string matches the value of this property.- Parameters:
text- the String to validate- Returns:
- whether the text supplied is matched by the value of the property
-
hashCode
public int hashCode()
Default implementation of hashCode.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hash code
-
equals
public boolean equals(java.lang.Object obj)
Default implementation of equals.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to compare- Returns:
- whether the objects are equivalent
-
toString
public java.lang.String toString()
Default implementation of toString().- Overrides:
toStringin classjava.lang.Object- Returns:
- the string representation of the object
-
-