public class Copyright extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
COPYRIGHT_TO_STRING_FORMAT
Copyright to string format.
|
protected int |
firstYear
Copyright first year of application.
|
protected String |
holder
Copyright holder.
|
protected Integer |
lastYear
Copyright last year of application (can be null if copyright is
only on one year).
|
| Constructor and Description |
|---|
Copyright() |
Copyright(Copyright copyright) |
Copyright(int firstYear,
Integer lastYear,
String holder) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Integer |
getFirstYear() |
String |
getHolder() |
Integer |
getLastYear() |
String |
getText()
Produces a string representation of the copyright.
|
String |
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) |
String |
toString() |
protected static final String COPYRIGHT_TO_STRING_FORMAT
protected String holder
protected int firstYear
protected Integer lastYear
public Copyright()
public Copyright(Copyright copyright)
public static Copyright newCopyright(Integer inceptionYear, Integer lastYear, String holder)
public String getHolder()
public Integer getFirstYear()
public Integer getLastYear()
getFirstYear()).public String getYears()
2010If copyright acts on more than one year :
2010 - 2012
public String getText()
Copyright (C) 2010 HolderIf copyright acts on more than one year :
Copyright (C) 2010 - 2012 Holder
Copyright © 2010–2019 MojoHaus. All rights reserved.