public class License extends java.lang.Object implements ILicense
License class represents a software license. A license has required body text
which may be the full text or an annotation. An optional URL field can be specified
which links to full text. Licenses can be easily compared using their digests.| Constructor and Description |
|---|
License(java.net.URI location,
java.lang.String body,
java.lang.String uuid)
Creates a new license object which is identified by users using the
body field. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns whether this license is equal to the given object.
|
java.lang.String |
getBody()
Returns the license body.
|
java.net.URI |
getLocation()
Returns the location of a document containing the full license.
|
java.lang.String |
getUUID()
Returns the message digest of the license body.
|
int |
hashCode() |
public License(java.net.URI location,
java.lang.String body,
java.lang.String uuid)
body field.
The body should contain either the full text of the license or an summary for a license
fully specified in the given location.location - the location of a document containing the full license, or nullbody - the license body, cannot be nulljava.lang.IllegalArgumentException - when the body is nullpublic java.net.URI getLocation()
getLocation in interface ILicensenullpublic java.lang.String getBody()
public java.lang.String getUUID()
public boolean equals(java.lang.Object obj)
ILicensepublic int hashCode()
hashCode in class java.lang.Object