@Immutable @PublicApi public final class

JiraDataTypeImpl

extends Object
implements JiraDataType
java.lang.Object
   ↳ com.atlassian.jira.JiraDataTypeImpl

@PublicApi

This class is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Each data type can specify a collection of actual java types, represented via their Class, that this type is.

Summary

Public Constructors
JiraDataTypeImpl(Class<?> type)
JiraDataTypeImpl(Collection<? extends Class<?>> types)
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.JiraDataType

Public Constructors

public JiraDataTypeImpl (Class<?> type)

public JiraDataTypeImpl (Collection<? extends Class<?>> types)

Public Methods

public Collection<String> asStrings ()

Provides 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.

Returns
  • string representation of this JiraDataTypes's actual types.

public boolean equals (Object o)

public Collection<Class<?>> getTypes ()

The actual java type's, represented via their 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.

Returns
  • the Class's that this data type represents.

public int hashCode ()

public boolean matches (JiraDataType otherType)

Determines 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.

Parameters
otherType the data type to compare to, not null.
Returns
  • true if any of this types are assignable to the other types.