private int ppid = -1;
private Host host = null;
- /** The arguments of the method function of the process. */
- public ArrayList<String> args;
+ /** The arguments of the method function of the process. */
+ private ArrayList<String> args;
/** Default constructor */
*
*/
public Process(Host host, String name, String[]args, double startTime, double killTime) {
- this();
- this.host = host;
- if (host == null)
- throw new NullPointerException("Process name cannot be NULL");
- if (name == null)
- throw new NullPointerException("Process name cannot be NULL");
- this.name = name;
-
- this.args = new ArrayList<>();
- if (null != args)
- this.args.addAll(Arrays.asList(args));
-
+ this(host, name, args);
this.startTime = startTime;
this.killTime = killTime;
}
*
* @return The count of the running processes
*/
- public native static int getCount();
+ public static native int getCount();
}