Package org.apache.rat.license
Interface ILicense
- All Superinterfaces:
Comparable<ILicense>
,IHeaderMatcher
- All Known Implementing Classes:
SimpleLicense
,UnknownLicense
The definition of a License.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A builder for ILicense instances. -
Method Summary
Modifier and TypeMethodDescriptionstatic ILicense.Builder
builder()
Gets a builder for licenses.default int
static boolean
A default implementation of equals.default String
Gets the name of the family that this license if part of.Gets the license family.Get the header matcher for this license.getName()
Returns the name of this license.getNote()
Gets the note associated with the license.static int
A default implementation of a License hashMethods inherited from interface org.apache.rat.analysis.IHeaderMatcher
getDescription, getId, matches, reset
-
Method Details
-
getLicenseFamily
ILicenseFamily getLicenseFamily()Gets the license family.- Returns:
- the ILicenseFamily implementation for this license.
-
getNote
String getNote()Gets the note associated with the license.- Returns:
- the note associated with this license. May be null or empty.
-
getName
String getName()Returns the name of this license. If no name was specified then the name of the family is returned.- Returns:
- the name of this license.
-
getFamilyName
Gets the name of the family that this license if part of.- Returns:
- the name of the license family that this license is part of.
-
getMatcher
IHeaderMatcher getMatcher()Get the header matcher for this license.- Returns:
- the header matcher for this license.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ILicense>
-
hash
A default implementation of a License hash- Parameters:
license
- the license to hash- Returns:
- the license hash value
-
equals
A default implementation of equals.- Parameters:
license1
- The license to check for equality.o
- the object to check for equality to.- Returns:
- true if the object is equal to the license1.
-
builder
Gets a builder for licenses.- Returns:
- An ILicense.Builder instance.
-