pipeline.developerexamples.cloudengine.data.StarSign Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pipeline.developerexamples.cloudengine Show documentation
Show all versions of pipeline.developerexamples.cloudengine Show documentation
This example is no longer available in Maven
/* ********************************************************************
* Copyright (C) 2019 51Degrees Mobile Experts Limited.
*
* This program 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.
*
* This program 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 this program. If not, see .
* ******************************************************************** */
package pipeline.developerexamples.cloudengine.data;
import java.util.Calendar;
//! [class]
public class StarSign {
private Calendar end;
private Calendar start;
private String name;
public StarSign(String name, String start, String end) {
this.name = name;
this.start = Calendar.getInstance();
String[] startDate = start.split("/");
this.start.set(
0,
Integer.parseInt(startDate[1]) - 1,
Integer.parseInt(startDate[0]));
this.end = Calendar.getInstance();
String[] endDate = end.split("/");
this.end.set(
0,
Integer.parseInt(endDate[1]) - 1,
Integer.parseInt(endDate[0]));
}
public String getName() {
return name;
}
public Calendar getStart() {
return start;
}
public Calendar getEnd() {
return end;
}
}
//! [class]