@SuppressWarnings("serial")
public class Action extends AbstractBase<String> implements Actor<Author, Event<Author,Content> , Content> {
@Override
public String getId() {
return null;
}
/**
* @param args
*/
public static void main(String[] args) {
}
@Override
public Content doAct(Event<Author,Content> role, Author type, Content merde) {
return role.transform(type,merde);
}
}
package org.nanotek.cms.domain;
import org.nanotek.cms.domain.Transformer;
/**
* lol o veio chegando diminui a luz ... ;-)
* ainda quero meus textos... ;-)
* @author josecanova
*
* @param <I> Anything you want to.
* @param <O> Anything you want to.
* For all action.... there is a reaction of ....
*/
@SuppressWarnings("serial")
public abstract class Event<I,O> extends AbstractBase<String> implements Transformer<I,O>{
private String id;
/**
* @param args
*/
public static void main(String[] args) {
System.exit(0);
}
@Override
public String getId() {
return id;
}
}
package org.nanotek.cms.domain;
/**
* A functional interface to describe the Actor Role.
* T - Type,
* P - Paper or Role
* M - Mass of result of perform an act.
*
*/
public interface Actor <T, P,M>{
public M doAct(P role,T type,M merde);
}