Anticipation030.java

Package: agent/
File: Anticipation030.java

  1. package agent;
  2.  
  3. import coupling.interaction.Interaction030;
  4.  
  5. /**
  6.  * An Anticipation030 is created for each proposed primitive interaction.
  7.  * An Anticipation030 is greater than another if its interaction has a greater valence than the other's.
  8.  */
  9. public class Anticipation030 implements Anticipation {
  10.  
  11. Interaction030 interaction;
  12.  
  13. public Anticipation030(Interaction030 interaction){
  14. this.interaction = interaction;
  15. }
  16.  
  17. public Interaction030 getInteraction(){
  18. return this.interaction;
  19. }
  20.  
  21. @Override
  22. public int compareTo(Anticipation anticipation) {
  23. return ((Integer)((Anticipation030)anticipation).getInteraction().getValence()).compareTo(this.interaction.getValence());
  24. }
  25.  
  26. }
  27.  

See public discussions about this page or start a new discussion by clicking on the Google+ Share button. Please type the #IDEALMOOCAnticipation030 hashtag in your post: