Class LibraryIdentifier
java.lang.Object
i5.las2peer.classLoaders.libraries.LibraryIdentifier
a basic class managing a library identifier of the format name-number where number fits the format of
LibraryVersion
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLibraryIdentifier
(String name) generate a new LibraryIdentifier from its string representationLibraryIdentifier
(String name, LibraryVersion version) generate a new library identifierLibraryIdentifier
(String name, String version) generate a new identifier -
Method Summary
Modifier and TypeMethodDescriptionboolean
compares this identifier to another oneboolean
compares this identifier against other objects if a string is given, the string representation of this identifier is compared to the given stringstatic LibraryIdentifier
fromFilename
(String filename) getName()
int
hashCode()
since equals is overridden, we should implement an own hashCode.toString()
-
Field Details
-
MANIFEST_LIBRARY_NAME_ATTRIBUTE
- See Also:
-
MANIFEST_LIBRARY_VERSION_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
LibraryIdentifier
generate a new LibraryIdentifier from its string representation- Parameters:
name
- A canonical library name- Throws:
IllegalArgumentException
- If the version information is not correctly formatted
-
LibraryIdentifier
generate a new identifier- Parameters:
name
- A canonical library nameversion
- A library version- Throws:
IllegalArgumentException
- If the version information is not correctly formatted
-
LibraryIdentifier
generate a new library identifier- Parameters:
name
- A canonical library nameversion
- A library version
-
-
Method Details
-
fromFilename
-
getVersion
- Returns:
- version of this library
-
getName
- Returns:
- name of the library
-
toString
-
equals
compares this identifier to another one- Parameters:
i
- A library identifier- Returns:
- true, if the given identifier is the same as this
-
equals
compares this identifier against other objects if a string is given, the string representation of this identifier is compared to the given string -
hashCode
public int hashCode()since equals is overridden, we should implement an own hashCode.
-