Java API ReferenceClass Hierarchy | All Classes | All Fields and Methods

com.ibm.xtools.patterns.framework

Class PatternIdentity

+-- Object
      +-- PatternIdentity

public Class PatternIdentity
extends Object

Identifies a pattern through the owning pattern library, the pattern definition's pattern identity and the given pattern definition version.

The equals method is defined appropriately so that these composite pattern identities can be tested for equivalence.


Constructor summary
PatternIdentity(AbstractPatternLibrary patternLibrary, String uniqueIdentifier, String versionIdentifier)

Constructs a pattern identity which is a composite identity that includes the pattern library identity and the pattern definition identity.

PatternIdentity(String patternIdentifier, String patternVersion)

Constructs a pattern identity that has no owning library.

PatternIdentity(String libraryIdentifier, String libraryVersion, String patternIdentifier, String patternVersion)

Constructs a pattern identity that has no owning library specified by object but by name and version instead.

Method summary
intcompareTo(IPatternIdentity patternIdentity)

Compares parameter identities.

booleanequals(Object object)

Compares for equality through the default implementation of java.lang.Object.equals(Object).

StringgetPatternId()

Returns the pattern Id.

AbstractPatternLibrarygetPatternLibrary()

Returns the pattern library identified by this pattern identity.

StringgetPatternVersion()

Returns the version of the pattern.

inthashCode()

Provides the value.

Constructor detail

PatternIdentity

public PatternIdentity(AbstractPatternLibrary patternLibrary, String uniqueIdentifier, String versionIdentifier)

Constructs a pattern identity which is a composite identity that includes the pattern library identity and the pattern definition identity.

Parameters:

patternLibrary
- The pattern library for the pattern definition.
uniqueIdentifier
- The unique identifier for the pattern definition.
versionIdentifier
- The version identifier for the pattern definition.

PatternIdentity

public PatternIdentity(String patternIdentifier, String patternVersion)

Constructs a pattern identity that has no owning library.

Parameters:

patternIdentifier
- The pattern identifier.
patternVersion
- The pattern version.

PatternIdentity

public PatternIdentity(String libraryIdentifier, String libraryVersion, String patternIdentifier, String patternVersion)

Constructs a pattern identity that has no owning library specified by object but by name and version instead.

Parameters:

libraryIdentifier
- The identifier for the library.
libraryVersion
- The library version.
patternIdentifier
- The pattern identifier.
patternVersion
- The pattern version.

Method detail

compareTo

public int compareTo(IPatternIdentity patternIdentity)

Compares parameter identities.

Parameters:

patternIdentity
- The identity of the parameter.

Returns:

An integer representing the compared values.

equals

public boolean equals(Object object)

Compares for equality through the default implementation of java.lang.Object.equals(Object).

Parameters:

object
- The object to be compared.

Returns:

A boolean value of true if the object is equal. Otherwise, it returns a value of false.

getPatternId

public String getPatternId()

Returns the pattern Id.

Returns:

The Id of the pattern.

getPatternLibrary

public AbstractPatternLibrary getPatternLibrary()

Returns the pattern library identified by this pattern identity.

Returns:

The pattern library identifier by this pattern identity.

getPatternVersion

public String getPatternVersion()

Returns the version of the pattern.

Returns:

The pattern version.

hashCode

public int hashCode()

Provides the value.

Returns:

Returns an integer representing the value.


Feedback