@Immutable @PublicApi public final class JiraDataTypeImpl extends Object implements JiraDataType
Class
, that this type is.Constructor and Description |
---|
JiraDataTypeImpl(Class<?> type) |
JiraDataTypeImpl(Collection<? extends Class<?>> types) |
Modifier and Type | Method and Description |
---|---|
Collection<String> |
asStrings()
Provides a string representation of this JiraDataType's actual types.
|
boolean |
equals(Object o) |
Collection<Class<?>> |
getTypes()
The actual java type's, represented via their
Class , that this type is. |
int |
hashCode() |
boolean |
matches(JiraDataType otherType)
Determines if this type matches the passed in other JiraDataType.
|
public JiraDataTypeImpl(Class<?> type)
public JiraDataTypeImpl(Collection<? extends Class<?>> types)
public Collection<String> asStrings()
JiraDataType
asStrings
in interface JiraDataType
public boolean matches(JiraDataType otherType)
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.
matches
in interface JiraDataType
otherType
- the data type to compare to, not null.public Collection<Class<?>> getTypes()
Class
, that this type is.
This is not provided on the interface, if you need it you must cast the object to this implementation type.Class
's that this data type represents.Copyright © 2002-2021 Atlassian. All Rights Reserved.