view default-methods.lisp @ 6:cb470aecc3b0

conditions.lisp: add missing right parens. darcs-hash:20061025162957-aa3d6-be1d3f4c9ae5bf80c090d612f0ce22f3e652d3b0.gz
author m.pearce <m.pearce@gold.ac.uk>
date Wed, 25 Oct 2006 17:29:57 +0100
parents e854a73b0328
children
line wrap: on
line source
(cl:in-package #:amuse) 

;; Some methods that can be defined in terms of others:

;; Time

(defmethod time>= ((object1 moment) (object2 moment))
  (or (time> object1 object2)
      (time= object1 object2)))

(defmethod time<= ((object1 moment) (object2 moment))
  (or (time< object1 object2)
      (time= object1 object2)))

(defmethod time/= ((object1 moment) (object2 moment))
  (not (time= object1 object2)))

;; Duration

(defmethod duration>= ((object1 duration) (object2 duration))
  (or (duration> object1 object2)
      (duration= object1 object2)))

(defmethod duration<= ((object1 duration) (object2 duration))
  (or (duration< object1 object2)
      (duration= object1 object2)))

(defmethod duration/= ((object1 duration) (object2 duration))
  (not (duration= object1 object2)))

;; Pitch

(defmethod pitch>= ((object1 pitch) (object2 pitch))
  (or (pitch> object1 object2)
      (pitch= object1 object2)))

(defmethod pitch<= ((object1 pitch) (object2 pitch))
  (or (pitch< object1 object2)
      (pitch= object1 object2)))

(defmethod pitch/= ((object1 pitch) (object2 pitch))
  (not (pitch= object1 object2)))

;; Interval

(defmethod interval>= ((object1 interval) (object2 interval))
  (or (interval> object1 object2)
      (interval= object1 object2)))

(defmethod interval<= ((object1 interval) (object2 interval))
  (or (interval< object1 object2)
      (interval= object1 object2)))

(defmethod interval/= ((object1 interval) (object2 interval))
  (not (interval= object1 object2)))