Qwylt

java.lang.module
Class ModuleIdentity

java.lang.Object
  extended by java.lang.module.ModuleIdentity

public class ModuleIdentity
extends java.lang.Object

A module name and version pair.

Since:
Feb 5, 2009
Author:
Bryan Atsatt

Constructor Summary
ModuleIdentity(java.lang.String name, Version version)
          Constructs an instance.
 
Method Summary
 boolean equals(ModuleIdentity id)
          Test if the specified identity is equal to this instance.
 boolean equals(java.lang.Object other)
          Test if the specified object is equal to this instance.
 java.lang.String getName()
          Returns the name.
 Version getVersion()
          Returns the version.
 int hashCode()
          Returns the hash code for this instance.
 ModuleQuery toQuery()
          Returns a query representation of this instance.
 java.lang.String toString()
          Returns a string representation of this instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleIdentity

public ModuleIdentity(java.lang.String name,
                      Version version)
Constructs an instance.

Parameters:
name - The name.
version - The version.
Method Detail

getName

public java.lang.String getName()
Returns the name.

Returns:
The name.

getVersion

public Version getVersion()
Returns the version.

Returns:
The version.

equals

public boolean equals(ModuleIdentity id)
Test if the specified identity is equal to this instance.

Parameters:
id - The identity to compare to.
Returns:
true if id is equivalent to this instance; otherwise, returns false.

equals

public boolean equals(java.lang.Object other)
Test if the specified object is equal to this instance.

Overrides:
equals in class java.lang.Object
Parameters:
other - The object to compare to.
Returns:
true if other is equivalent to this instance; otherwise, returns false.

hashCode

public int hashCode()
Returns the hash code for this instance.

Overrides:
hashCode in class java.lang.Object
Returns:
The identity hash code for this instance.

toString

public java.lang.String toString()
Returns a string representation of this instance.

Overrides:
toString in class java.lang.Object
Returns:
The string.

toQuery

public ModuleQuery toQuery()
Returns a query representation of this instance.

Returns:
The query.

Qwylt

Send comments or questions to Bryan Atsatt