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 Link icon

    • copyrightToStringFormat Link icon

      protected String copyrightToStringFormat
      Copyright to string format.
    • holder Link icon

      protected String holder
      Copyright holder.
    • firstYear Link icon

      protected int firstYear
      Copyright first year of application.
    • lastYear Link icon

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

    • Copyright Link icon

      public Copyright()
    • Copyright Link icon

      public Copyright(Copyright copyright)
    • Copyright Link icon

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

    • newCopyright Link icon

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

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

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

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

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

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

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

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

      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 Link icon

      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 Link icon

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

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

      public String toString()
      Overrides:
      toString in class Object