agirstatool/src/org/april/agirstatool/charts/DateCount.java

73 lines
1.6 KiB
Java

/*
* Copyright (C) 2020 Christian Pierre MOMON <christian.momon@devinsy.fr>
*
* This file is part of AgirStatool, simple key value database.
*
* AgirStatool is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* AgirStatool is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with AgirStatool. If not, see <http://www.gnu.org/licenses/>.
*/
package org.april.agirstatool.charts;
import org.apache.commons.lang3.StringUtils;
/**
* The Class Projects.
*/
public class DateCount
{
private String date;
private long count;
/**
* Instantiates a new date count.
*
* @param date
* the date
* @param count
* the count
*/
public DateCount(final String date, final long count)
{
setDate(date);
this.count = count;
}
public long getCount()
{
return this.count;
}
public String getDate()
{
return this.date;
}
public void setCount(final long count)
{
this.count = count;
}
public void setDate(final String date)
{
if (StringUtils.isBlank(date))
{
throw new IllegalArgumentException("Null parameter.");
}
else
{
this.date = date;
}
}
}