Commit a4dea5ee authored by Julian Zobel's avatar Julian Zobel
Browse files

Added standard functions to Attraction Points to contain own pause times

parent 5fb8c103
......@@ -35,6 +35,16 @@ public interface AttractionPoint extends Location {
*/
public String getName();
/**
* Clones the current attraction point and manipulates the new AP's name.
* The location of the new AP can then be manipulated through the
* {@link Location} API.
*
* @param newName
* @return
*/
public AttractionPoint clone(String newName);
/**
* A weight (should be normalized between 0 and 1), can be used for example
* in the social movement model. This refers to the "importance" of an
......@@ -42,7 +52,9 @@ public interface AttractionPoint extends Location {
*
* @return weight between 0 and 1
*/
public double getWeight();
public default double getWeight() {
throw new UnsupportedOperationException("Default: Not implemented");
}
/**
* A radius (optional), basically the radius of influence of the given
......@@ -50,7 +62,9 @@ public interface AttractionPoint extends Location {
*
* @return radius in meters
*/
public double getRadius();
public default double getRadius() {
throw new UnsupportedOperationException("Default: Not implemented");
}
/**
* A weight (should be normalized between 0 and 1), can be used for example
......@@ -59,7 +73,13 @@ public interface AttractionPoint extends Location {
*
* @param weight
*/
public void setWeight(double weight);
public default void setWeight(double weight) {
throw new UnsupportedOperationException("Default: Not implemented");
};
public default boolean hasWeight() {
return false;
}
/**
* A radius (optional), basically the radius of influence of the given
......@@ -67,16 +87,41 @@ public interface AttractionPoint extends Location {
*
* @param radius
*/
public void setRadius(double radius);
public default void setRadius(double radius) {
throw new UnsupportedOperationException("Default: Not implemented");
}
public default boolean hasRadius() {
return false;
}
/**
* Clones the current attraction point and manipulates the new AP's name.
* The location of the new AP can then be manipulated through the
* {@link Location} API.
* The pause time minimum, i.e., the minimum time a node will stay around
* this attraction point.
*
* @param newName
* @return
*/
public AttractionPoint clone(String newName);
public default long getPauseTimeMin() {
throw new UnsupportedOperationException("Default: Not implemented");
}
/**
* The pause time maximum, i.e., the maximum time a node will stay around
* this attraction point.
*
* @return
*/
public default long getPauseTimeMax() {
throw new UnsupportedOperationException("Default: Not implemented");
}
public default void setPauseTime(long pauseTimeMin, long pauseTimeMax) {
throw new UnsupportedOperationException("Default: Not implemented");
}
public default boolean hasPauseTime() {
return false;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment