|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ivy.core.module.id.ModuleId
public class ModuleId
Identifies a module, without revision information
Field Summary | |
---|---|
static java.util.regex.Pattern |
MID_PATTERN
Pattern to use to matched mid text representation. |
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.util.Map |
getAttributes()
Returns a Map of all attributes of this module id. |
java.lang.String |
getName()
Returns the name of the module. |
java.lang.String |
getOrganisation()
Returns the name of the organisation. |
int |
hashCode()
|
static ModuleId |
intern(ModuleId moduleId)
Returns an intern instance of a ModuleId equals to the given ModuleId if any, or the given ModuleId. |
static ModuleId |
newInstance(java.lang.String org,
java.lang.String name)
Returns a ModuleId for the given organization and module name. |
static ModuleId |
parse(java.lang.String mid)
Parses the module id text representation and returns it as a ModuleId instance. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.regex.Pattern MID_PATTERN
parse(String)
Constructor Detail |
---|
public ModuleId(java.lang.String organisation, java.lang.String name)
organisation
- The organisation which creates the module.name
- The name of the module.Method Detail |
---|
public static ModuleId newInstance(java.lang.String org, java.lang.String name)
org
- the module's organization, can be null
name
- the module's name, must not be null
public static ModuleId intern(ModuleId moduleId)
This is useful to reduce the number of instances of ModuleId kept in memory, and thus reduce memory footprint.
moduleId
- the module id to return
public java.lang.String getName()
public java.lang.String getOrganisation()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
public java.lang.String encodeToString()
public java.util.Map getAttributes()
public static ModuleId decode(java.lang.String encoded)
encoded
-
java.lang.IllegalArgumentException
- If the given String could not be decoded.public static ModuleId parse(java.lang.String mid)
ModuleId
instance.
mid
- the module id text representation to parse
java.lang.IllegalArgumentException
- if the given text representation cannot be parsed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |