Package org.codehaus.mojo.license.model
Class Copyright
java.lang.Object
org.codehaus.mojo.license.model.Copyright
Model of a copyright.
Created on 1/8/14.
- Since:
- 1.6
- Author:
- tchemit dev@tchemit.fr
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Copyright to string format.protected static final String
Default copyright to string format.protected int
Copyright first year of application.protected String
Copyright holder.protected Integer
Copyright last year of application (can be null if copyright is only on one year). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getText()
Produces a string representation of the copyright.getYears()
Produces a string representation of the copyright year range.int
hashCode()
static Copyright
newCopyright
(Integer inceptionYear, Integer lastYear, String holder) static Copyright
newCopyright
(Integer inceptionYear, String holder) static Copyright
newCopyright
(String copyrightToStringFormat, Integer inceptionYear, Integer lastYear, String holder) static Copyright
newCopyright
(String copyrightToStringFormat, Integer inceptionYear, String holder) toString()
-
Field Details
-
DEFAULT_COPYRIGHT_TO_STRING_FORMAT
Default copyright to string format.- See Also:
-
copyrightToStringFormat
Copyright to string format. -
holder
Copyright holder. -
firstYear
protected int firstYearCopyright first year of application. -
lastYear
Copyright last year of application (can be null if copyright is only on one year).
-
-
Constructor Details
-
Copyright
public Copyright() -
Copyright
-
Copyright
-
-
Method Details
-
newCopyright
-
newCopyright
-
newCopyright
-
newCopyright
-
getCopyrightToStringFormat
- Returns:
- the copyright to string format
-
getHolder
- Returns:
- the copyright holder
-
getFirstYear
- Returns:
- the first year of the copyright
-
getLastYear
- Returns:
- the last year of the copyright (if copyright affects only one
year, can be equals to the
getFirstYear()
).
-
getYears
Produces a string representation of the copyright year range. If copyright acts on one year :2010
If copyright acts on more than one year :2010 - 2012
- Returns:
- the String representation of the copyright year range.
-
getText
Produces a string representation of the copyright. If copyright acts on one year :Copyright (C) 2010 Holder
If copyright acts on more than one year :Copyright (C) 2010 - 2012 Holder
- Returns:
- the String representation of the copyright
-
equals
-
hashCode
public int hashCode() -
toString
-