| Java API Reference | Class Hierarchy | All Classes | All Fields and Methods |
com.ibm.xtools.patterns.framework
+-- 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 | |
|---|---|
| int | compareTo(IPatternIdentity patternIdentity) Compares parameter identities. |
| boolean | equals(Object object) Compares for equality through the default implementation of java.lang.Object.equals(Object). |
| String | getPatternId() Returns the pattern Id. |
| AbstractPatternLibrary | getPatternLibrary() Returns the pattern library identified by this pattern identity. |
| String | getPatternVersion() Returns the version of the pattern. |
| int | hashCode() Provides the value. |
Constructor detail
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. |
public PatternIdentity(String patternIdentifier, String patternVersion)
Constructs a pattern identity that has no owning library.
Parameters:
| patternIdentifier | - The pattern identifier. |
| patternVersion | - The pattern version. |
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
public int compareTo(IPatternIdentity patternIdentity)
Compares parameter identities.
Parameters:
| patternIdentity | - The identity of the parameter. |
Returns:
An integer representing the compared values. |
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. |
public String getPatternId()
Returns the pattern Id.
Returns:
The Id of the pattern. |
public AbstractPatternLibrary getPatternLibrary()
Returns the pattern library identified by this pattern identity.
Returns:
The pattern library identifier by this pattern identity. |