mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
fcb1e5e593
- put utility classes in a package #story[1047]
56 lines
1.1 KiB
Java
56 lines
1.1 KiB
Java
package seng302.server.simulator.mark;
|
|
|
|
import seng302.utilities.GeoPoint;
|
|
|
|
/**
|
|
* An abstract class to represent general marks
|
|
* Created by Haoming Yin (hyi25) on 17/3/17.
|
|
*/
|
|
public class Mark extends GeoPoint {
|
|
|
|
private int seqID;
|
|
private String name;
|
|
private int sourceID;
|
|
|
|
public Mark(String name, double lat, double lng, int sourceID) {
|
|
super(lat, lng);
|
|
this.name = name;
|
|
this.sourceID = sourceID;
|
|
}
|
|
|
|
/**
|
|
* Prints out mark's info and its geo location, good for testing
|
|
* @return a string showing its details
|
|
*/
|
|
@Override
|
|
public String toString() {
|
|
return String.format("Mark%d: %s, source: %d, lat: %f, lng: %f", seqID, name, sourceID, getLat(), getLng());
|
|
}
|
|
|
|
public int getSeqID() {
|
|
return seqID;
|
|
}
|
|
|
|
public void setSeqID(int seqID) {
|
|
this.seqID = seqID;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public int getSourceID() {
|
|
return sourceID;
|
|
}
|
|
|
|
public void setSourceID(int sourceID) {
|
|
this.sourceID = sourceID;
|
|
}
|
|
}
|
|
|
|
|