IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.framework
Class PatternIdentity

java.lang.Object
  extended bycom.ibm.xtools.patterns.framework.PatternIdentity
All Implemented Interfaces:
Comparable, IPatternIdentity

public class PatternIdentity
extends Object
implements IPatternIdentity

This class 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's identity and the pattern definition's 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(Object o)
           
 boolean equals(Object object)
           
 String getPatternId()
          Returns the ID of the pattern descriptor.
 AbstractPatternLibrary getPatternLibrary()
          Returns the pattern library identified by this pattern identity.
 String getPatternVersion()
          Returns the version of the pattern descriptor.
 int hashCode()
          (non-Javadoc)
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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's identity and the pattern definition's 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 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

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
Method Detail

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

equals

public boolean equals(Object object)

getPatternId

public String getPatternId()
Description copied from interface: IPatternIdentity
Returns the ID of the pattern descriptor.

Use the getPatternVersion method to retrieve the version of the pattern descriptor.

Specified by:
getPatternId in interface IPatternIdentity
Returns:
Returns the ID of the pattern descriptor.

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()
Description copied from interface: IPatternIdentity
Returns the version of the pattern descriptor.

Use the getPatternId method to retrieve the ID of the pattern descriptor.

Specified by:
getPatternVersion in interface IPatternIdentity
Returns:
Returns the version of the pattern descriptor.

hashCode

public int hashCode()
(non-Javadoc)

See Also:
Object.hashCode()

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.