Package com.atlassian.jira
Class JiraDataTypeImpl
java.lang.Object
com.atlassian.jira.JiraDataTypeImpl
- All Implemented Interfaces:
JiraDataType
Each data type can specify a collection of actual java types, represented via their
Class, that this type is.- Since:
- v4.0
-
Constructor Summary
ConstructorsConstructorDescriptionJiraDataTypeImpl(Class<?> type) JiraDataTypeImpl(Collection<? extends Class<?>> types) -
Method Summary
Modifier and TypeMethodDescriptionProvides a string representation of this JiraDataType's actual types.booleanCollection<Class<?>>getTypes()The actual java type's, represented via theirClass, that this type is.inthashCode()booleanmatches(JiraDataType otherType) Determines if this type matches the passed in other JiraDataType.
-
Constructor Details
-
JiraDataTypeImpl
-
JiraDataTypeImpl
-
-
Method Details
-
asStrings
Description copied from interface:JiraDataTypeProvides a string representation of this JiraDataType's actual types. A JiraDataType can declare that it is made up of distinct types and this is why we return a collection of string representations.- Specified by:
asStringsin interfaceJiraDataType- Returns:
- string representation of this JiraDataTypes's actual types.
-
matches
Description copied from interface:JiraDataTypeDetermines if this type matches the passed in other JiraDataType.This method runs through the data types and will return true if any of the types are equals to the other types.
This method should be reflexive, if a.match(b) == true then b.match(a) == true
There is a special case which is
Object. This means all and any comparison against Object.class will return true for the match method.- Specified by:
matchesin interfaceJiraDataType- Parameters:
otherType- the data type to compare to, not null.- Returns:
- true if any of this types are assignable to the other types.
-
getTypes
The actual java type's, represented via theirClass, that this type is. This is not provided on the interface, if you need it you must cast the object to this implementation type.- Returns:
- the
Class's that this data type represents.
-
equals
-
hashCode
public int hashCode()
-