
util.parallel.ParallelOp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xfvrp Show documentation
Show all versions of xfvrp Show documentation
Solver for realistic vehicle routing problems
package util.parallel;
/**
* Copyright (c) 2012-present Holger Schneider
* All rights reserved.
*
* This source code is licensed under the MIT License (MIT) found in the
* LICENSE file in the root directory of this source tree.
*
*
* @author hschneid
*
* @param
*/
public abstract class ParallelOp implements Runnable, Cloneable {
private E o;
public ParallelOp() {}
/**
*
* @param o
*/
public abstract void run(E o);
/*
* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
@Override
public void run() {
try {
if(o != null)
run(o);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
*
* @param o
*/
void set(E o) {
this.o = o;
}
/**
*
* @return
* @throws CloneNotSupportedException
*/
@SuppressWarnings("unchecked")
public ParallelOp copy() throws CloneNotSupportedException {
return (ParallelOp) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy