org.apache.ivy.core.module.id
Class ModuleId

java.lang.Object
  extended by org.apache.ivy.core.module.id.ModuleId
All Implemented Interfaces:
java.lang.Comparable

public class ModuleId
extends java.lang.Object
implements java.lang.Comparable


Constructor Summary
ModuleId(java.lang.String organisation, java.lang.String name)
          Constructor.
 
Method Summary
 int compareTo(java.lang.Object obj)
          
static ModuleId decode(java.lang.String encoded)
          Returns a ModuleId
 java.lang.String encodeToString()
          Returns the encoded String representing this ModuleId.
 boolean equals(java.lang.Object obj)
          
 java.lang.String getName()
          Returns the name of the module.
 java.lang.String getOrganisation()
          Returns the name of the organisation.
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleId

public ModuleId(java.lang.String organisation,
                java.lang.String name)
Constructor.

Parameters:
organisation - The organisation which creates the module.
name - The name of the module.
Method Detail

getName

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

Returns:
The name of the module.

getOrganisation

public java.lang.String getOrganisation()
Returns the name of the organisation.

Returns:
The name of the organisation.

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object obj)

Specified by:
compareTo in interface java.lang.Comparable

encodeToString

public java.lang.String encodeToString()
Returns the encoded String representing this ModuleId.

Returns:
The ModuleId encoded as String.

decode

public static ModuleId decode(java.lang.String encoded)
Returns a ModuleId

Parameters:
encoded -
Returns:
The new ModuleId.
Throws:
java.lang.IllegalArgumentException - If the given String could not be decoded.