Class IsA
- java.lang.Object
-
- uk.gov.gchq.koryphe.predicate.KoryphePredicate<Object>
-
- uk.gov.gchq.koryphe.impl.predicate.IsA
-
public class IsA extends KoryphePredicate<Object>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getType()
int
hashCode()
void
setType(String type)
boolean
test(Object input)
Tests whether the argument supplied is an instance of the control class.String
toString()
-
-
-
Constructor Detail
-
IsA
public IsA()
Default constructor - used for serialisation.
-
IsA
public IsA(Class<?> type)
Create anIsA
validate that tests for instances of a given controlClass
.- Parameters:
type
- Control class.
-
IsA
public IsA(String type)
Create anIsA
validate that tests for instances of a given control class name.- Parameters:
type
- Name of the control class.
-
-
Method Detail
-
setType
public void setType(String type)
- Parameters:
type
- Name of the control class.
-
getType
public String getType()
- Returns:
- Name of the control class.
-
test
public boolean test(Object input)
Tests whether the argument supplied is an instance of the control class.- Parameters:
input
-Object
to test.- Returns:
- true if input is null or non-null and can be cast to the control class, otherwise false.
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classKoryphePredicate<Object>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classKoryphePredicate<Object>
-
-