You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
784 B

  1. /*!! Program */
  2. /*!
  3. Composition
  4. ===========
  5. */
  6. /*!- Header */
  7. package program;
  8. /*! A `Composition` combines two programs (`first` and `second`) with the intended semantics of sequential
  9. composition. */
  10. public class Composition extends Program {
  11. public final Program first;
  12. public final Program second;
  13. public Composition(Program first, Program second) {
  14. this.first = first;
  15. this.second = second;
  16. }
  17. /*!- generated equals implementation */
  18. @Override
  19. public boolean equals(Object o) {
  20. if (this == o) return true;
  21. if (o == null || getClass() != o.getClass()) return false;
  22. Composition that = (Composition) o;
  23. if (!first.equals(that.first)) return false;
  24. return second.equals(that.second);
  25. }
  26. }