Class Copyright

java.lang.Object
org.codehaus.mojo.license.model.Copyright

public class Copyright extends Object
Model of a copyright. Created on 1/8/14.
Since:
1.6
Author:
tchemit dev@tchemit.fr
  • Field Details

    • copyrightToStringFormat

      protected String copyrightToStringFormat
      Copyright to string format.
    • holder

      protected String holder
      Copyright holder.
    • firstYear

      protected int firstYear
      Copyright first year of application.
    • lastYear

      protected Integer lastYear
      Copyright last year of application (can be null if copyright is only on one year).
  • Constructor Details

    • Copyright

      public Copyright()
    • Copyright

      public Copyright(Copyright copyright)
    • Copyright

      public Copyright(String copyrightToStringFormat, int firstYear, Integer lastYear, String holder)
  • Method Details

    • newCopyright

      public static Copyright newCopyright(String copyrightToStringFormat, Integer inceptionYear, Integer lastYear, String holder)
    • newCopyright

      public static Copyright newCopyright(Integer inceptionYear, Integer lastYear, String holder)
    • newCopyright

      public static Copyright newCopyright(String copyrightToStringFormat, Integer inceptionYear, String holder)
    • newCopyright

      public static Copyright newCopyright(Integer inceptionYear, String holder)
    • getCopyrightToStringFormat

      public String getCopyrightToStringFormat()
      Returns:
      the copyright to string format
    • getHolder

      public String getHolder()
      Returns:
      the copyright holder
    • getFirstYear

      public Integer getFirstYear()
      Returns:
      the first year of the copyright
    • getLastYear

      public Integer getLastYear()
      Returns:
      the last year of the copyright (if copyright affects only one year, can be equals to the getFirstYear()).
    • getYears

      public String 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

      public String 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object