![JAR search and dependency download from the Maven repository](/logo.png)
jedi.example.StormtrooperClosureFactory Maven / Gradle / Ivy
package jedi.example;
public class StormtrooperClosureFactory implements IStormtrooperClosureFactory {
/**
* @see jedi.example.Stormtrooper#attack
*/
public jedi.functional.Command attackCommand(final jedi.example.RebelBase base) {
class Closure implements java.io.Serializable, jedi.functional.Command {
public void execute(final jedi.example.Stormtrooper $receiver) {
try {
$receiver.attack(base);
}
catch (RuntimeException ex) {
throw ex;
}
catch (Exception ex) {
throw new jedi.JediException(ex);
}
}
public int hashCode() {
return (17) * 37 + (base == null ? 0 : base.hashCode());
}
public boolean equals(Object obj) {
if (obj == this) { return true; }
if (!(obj instanceof Closure)) { return false; }
return ((Closure) obj).equalsParameters(base);
}
private boolean equalsParameters(final jedi.example.RebelBase $base) {
return ($base == null ? base == null : $base.equals(base));
}
}
return new Closure();
}
/**
* @see jedi.example.Stormtrooper#attack
*/
public jedi.functional.Command attackProxyCommand(final jedi.example.Stormtrooper $receiver) {
class Closure implements java.io.Serializable, jedi.functional.Command {
public void execute(final jedi.example.RebelBase base) {
try {
$receiver.attack(base);
}
catch (RuntimeException ex) {
throw ex;
}
catch (Exception ex) {
throw new jedi.JediException(ex);
}
}
public int hashCode() {
return (17) * 37 + ($receiver == null ? 0 : $receiver.hashCode());
}
public boolean equals(Object obj) {
if (obj == this) { return true; }
if (!(obj instanceof Closure)) { return false; }
return ((Closure) obj).equalsParameters($receiver);
}
private boolean equalsParameters(final jedi.example.Stormtrooper $$receiver) {
return ($$receiver == null ? $receiver == null : $$receiver.equals($receiver));
}
}
return new Closure();
}
/**
* @see jedi.example.Stormtrooper#getDistance
*/
public jedi.functional.Functor getDistanceFunctor(final jedi.example.RebelBase base) {
class Closure implements java.io.Serializable, jedi.functional.Functor {
public java.lang.Integer execute(final jedi.example.Stormtrooper $receiver) {
try {
return $receiver.getDistance(base);
}
catch (RuntimeException ex) {
throw ex;
}
catch (Exception ex) {
throw new jedi.JediException(ex);
}
}
public int hashCode() {
return (17) * 37 + (base == null ? 0 : base.hashCode());
}
public boolean equals(Object obj) {
if (obj == this) { return true; }
if (!(obj instanceof Closure)) { return false; }
return ((Closure) obj).equalsParameters(base);
}
private boolean equalsParameters(final jedi.example.RebelBase $base) {
return ($base == null ? base == null : $base.equals(base));
}
}
return new Closure();
}
/**
* @see jedi.example.Stormtrooper#getDistance
*/
public jedi.functional.Functor getDistanceProxyFunctor(final jedi.example.Stormtrooper $receiver) {
class Closure implements java.io.Serializable, jedi.functional.Functor {
public java.lang.Integer execute(final jedi.example.RebelBase base) {
try {
return $receiver.getDistance(base);
}
catch (RuntimeException ex) {
throw ex;
}
catch (Exception ex) {
throw new jedi.JediException(ex);
}
}
public int hashCode() {
return (17) * 37 + ($receiver == null ? 0 : $receiver.hashCode());
}
public boolean equals(Object obj) {
if (obj == this) { return true; }
if (!(obj instanceof Closure)) { return false; }
return ((Closure) obj).equalsParameters($receiver);
}
private boolean equalsParameters(final jedi.example.Stormtrooper $$receiver) {
return ($$receiver == null ? $receiver == null : $$receiver.equals($receiver));
}
}
return new Closure();
}
/**
* @see jedi.example.Stormtrooper#isWithinRange
*/
public jedi.functional.Filter isWithinRangeFilter(final jedi.example.RebelBase base) {
class Closure implements java.io.Serializable, jedi.functional.Filter {
public java.lang.Boolean execute(final jedi.example.Stormtrooper $receiver) {
try {
return $receiver.isWithinRange(base);
}
catch (RuntimeException ex) {
throw ex;
}
catch (Exception ex) {
throw new jedi.JediException(ex);
}
}
public int hashCode() {
return (17) * 37 + (base == null ? 0 : base.hashCode());
}
public boolean equals(Object obj) {
if (obj == this) { return true; }
if (!(obj instanceof Closure)) { return false; }
return ((Closure) obj).equalsParameters(base);
}
private boolean equalsParameters(final jedi.example.RebelBase $base) {
return ($base == null ? base == null : $base.equals(base));
}
}
return new Closure();
}
/**
* @see jedi.example.Stormtrooper#isWithinRange
*/
public jedi.functional.Filter isWithinRangeProxyFilter(final jedi.example.Stormtrooper $receiver) {
class Closure implements java.io.Serializable, jedi.functional.Filter {
public java.lang.Boolean execute(final jedi.example.RebelBase base) {
try {
return $receiver.isWithinRange(base);
}
catch (RuntimeException ex) {
throw ex;
}
catch (Exception ex) {
throw new jedi.JediException(ex);
}
}
public int hashCode() {
return (17) * 37 + ($receiver == null ? 0 : $receiver.hashCode());
}
public boolean equals(Object obj) {
if (obj == this) { return true; }
if (!(obj instanceof Closure)) { return false; }
return ((Closure) obj).equalsParameters($receiver);
}
private boolean equalsParameters(final jedi.example.Stormtrooper $$receiver) {
return ($$receiver == null ? $receiver == null : $$receiver.equals($receiver));
}
}
return new Closure();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy