Skip to content

Commit

Permalink
Adding headers and auto-javadoc to msi.gama.core
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed Jan 29, 2022
1 parent 2df167b commit aa944e5
Show file tree
Hide file tree
Showing 557 changed files with 20,732 additions and 1,918 deletions.
11 changes: 7 additions & 4 deletions msi.gama.core/src/msi/gama/common/Activator.java
@@ -1,12 +1,12 @@
/*******************************************************************************************************
*
* msi.gama.common.Activator.java, in plugin msi.gama.core, is part of the source code of the GAMA modeling and
* simulation platform (v. 1.8.1)
* Activator.java, in msi.gama.core, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2020 UMI 209 UMMISCO IRD/SU & Partners
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
*
********************************************************************************************************/
package msi.gama.common;

Expand All @@ -17,6 +17,9 @@
import msi.gaml.compilation.kernel.GamaBundleLoader;
import msi.gaml.operators.Dates;

/**
* The Class Activator.
*/
public class Activator implements BundleActivator {

@Override
Expand Down
46 changes: 43 additions & 3 deletions msi.gama.core/src/msi/gama/common/GamlFileExtension.java
@@ -1,38 +1,78 @@
/*******************************************************************************************************
*
* msi.gama.common.GamlFileExtension.java, in plugin msi.gama.core,
* is part of the source code of the GAMA modeling and simulation platform (v. 1.8.1)
* GamlFileExtension.java, in msi.gama.core, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2020 UMI 209 UMMISCO IRD/SU & Partners
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.common;

/**
* The Class GamlFileExtension.
*/
public class GamlFileExtension {

/** The Constant GAML_FILE. */
public final static String GAML_FILE = ".gaml";

/** The Constant EXPERIMENT_FILE. */
public final static String EXPERIMENT_FILE = ".experiment";

/** The Constant MODEL_FILE. */
public final static String MODEL_FILE = ".model";

/** The Constant SPECIES_FILE. */
public final static String SPECIES_FILE = ".species";

/**
* Checks if is gaml.
*
* @param fileName the file name
* @return true, if is gaml
*/
public static final boolean isGaml(final String fileName) {
return fileName != null && fileName.endsWith(GAML_FILE);
}

/**
* Checks if is experiment.
*
* @param fileName the file name
* @return true, if is experiment
*/
public static final boolean isExperiment(final String fileName) {
return fileName != null && fileName.endsWith(EXPERIMENT_FILE);
}

/**
* Checks if is model.
*
* @param fileName the file name
* @return true, if is model
*/
public static final boolean isModel(final String fileName) {
return fileName != null && fileName.endsWith(MODEL_FILE);
}

/**
* Checks if is species.
*
* @param fileName the file name
* @return true, if is species
*/
public static final boolean isSpecies(final String fileName) {
return fileName != null && fileName.endsWith(SPECIES_FILE);
}

/**
* Checks if is any.
*
* @param fileName the file name
* @return true, if is any
*/
public static final boolean isAny(final String fileName) {
return isGaml(fileName) || isExperiment(fileName) || isModel(fileName) || isSpecies(fileName);
}
Expand Down
27 changes: 24 additions & 3 deletions msi.gama.core/src/msi/gama/common/StatusMessage.java
@@ -1,9 +1,9 @@
/*******************************************************************************************************
*
* msi.gama.common.StatusMessage.java, in plugin msi.gama.core,
* is part of the source code of the GAMA modeling and simulation platform (v. 1.8.1)
* StatusMessage.java, in msi.gama.core, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2020 UMI 209 UMMISCO IRD/SU & Partners
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
Expand All @@ -14,17 +14,38 @@
import msi.gama.common.interfaces.IStatusMessage;
import msi.gama.util.GamaColor;

/**
* The Class StatusMessage.
*/
public class StatusMessage implements IStatusMessage {

/** The message. */
String message = "";

/** The code. */
protected int code = IGui.INFORM;

/** The icon. */
protected String icon;

/**
* Instantiates a new status message.
*
* @param msg the msg
* @param s the s
*/
public StatusMessage(final String msg, final int s) {
message = msg;
code = s;
}

/**
* Instantiates a new status message.
*
* @param msg the msg
* @param s the s
* @param icon the icon
*/
public StatusMessage(final String msg, final int s, final String icon) {
message = msg;
this.icon = icon;
Expand Down
32 changes: 29 additions & 3 deletions msi.gama.core/src/msi/gama/common/SubTaskMessage.java
@@ -1,9 +1,9 @@
/*******************************************************************************************************
*
* msi.gama.common.SubTaskMessage.java, in plugin msi.gama.core,
* is part of the source code of the GAMA modeling and simulation platform (v. 1.8.1)
* SubTaskMessage.java, in msi.gama.core, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2020 UMI 209 UMMISCO IRD/SU & Partners
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
Expand All @@ -23,16 +23,32 @@
*/
public class SubTaskMessage implements IStatusMessage {

/** The completion. */
Double completion;

/** The name. */
String name;

/** The begin or end. */
Boolean beginOrEnd;

/**
* Instantiates a new sub task message.
*
* @param name the name
* @param begin the begin
*/
public SubTaskMessage(final String name, final boolean begin) {
this.name = name;
completion = null;
this.beginOrEnd = begin;
}

/**
* Instantiates a new sub task message.
*
* @param completion the completion
*/
public SubTaskMessage(final Double completion) {
this.completion = completion;
this.beginOrEnd = null;
Expand All @@ -58,10 +74,20 @@ public int getCode() {
return IGui.NEUTRAL;
}

/**
* Gets the completion.
*
* @return the completion
*/
public Double getCompletion() {
return completion;
}

/**
* Gets the begin or end.
*
* @return the begin or end
*/
public Boolean getBeginOrEnd() {
return beginOrEnd;
}
Expand Down
7 changes: 4 additions & 3 deletions msi.gama.core/src/msi/gama/common/UserStatusMessage.java
@@ -1,9 +1,9 @@
/*******************************************************************************************************
*
* msi.gama.common.UserStatusMessage.java, in plugin msi.gama.core,
* is part of the source code of the GAMA modeling and simulation platform (v. 1.8.1)
* UserStatusMessage.java, in msi.gama.core, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2020 UMI 209 UMMISCO IRD/SU & Partners
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
Expand All @@ -22,6 +22,7 @@
*/
public class UserStatusMessage extends StatusMessage {

/** The color. */
GamaColor color;

/**
Expand Down
18 changes: 14 additions & 4 deletions msi.gama.core/src/msi/gama/common/geometry/AxisAngle.java
@@ -1,12 +1,12 @@
/*******************************************************************************************************
*
* msi.gama.common.geometry.AxisAngle.java, in plugin msi.gama.core, is part of the source code of the GAMA modeling and
* simulation platform (v. 1.8.1)
* AxisAngle.java, in msi.gama.core, is part of the source code of the
* GAMA modeling and simulation platform (v.1.8.2).
*
* (c) 2007-2020 UMI 209 UMMISCO IRD/SU & Partners
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
*
********************************************************************************************************/

package msi.gama.common.geometry;
Expand Down Expand Up @@ -52,6 +52,11 @@ public AxisAngle(final GamaPoint axis, final double angle) {
this.angle = angle;
}

/**
* Instantiates a new axis angle.
*
* @param angle the angle
*/
public AxisAngle(final Double angle) {
this.angle = angle == null ? 0 : angle.doubleValue();
}
Expand Down Expand Up @@ -223,6 +228,11 @@ public final void setZ(final double z) {
axis.z = z;
}

/**
* Gets the Axis around which the rotation is done.
*
* @return the Axis around which the rotation is done
*/
public GamaPoint getAxis() {
return axis;
}
Expand Down

0 comments on commit aa944e5

Please sign in to comment.