+ if (rhs.position_ != position_)
+ return false;
+
+ if (direction_ == ALL || rhs.direction_ == ALL)
+ return true;
+
+ return (rhs.direction_ == direction_);
+}
+
+bool Stop::operator< (const Stop& rhs) const
+{
+ /* If we do not use the direction to help differentiate, then it is
+ * possible that an object can be neither less, greater, or equal */
+ return (position_ < rhs.position_);
+}
+
+bool Stop::operator> (const Stop& rhs) const
+{
+ return (position_ > rhs.position_);
+}
+
+const Direction Stop::getDirection () const
+{
+ return direction_;
+}
+
+const Position Stop::getPosition () const
+{
+ return position_;
+}
+
+std::ostream& operator<< (std::ostream& os, const Stop& rhs)
+{
+ os << "Stop(" << rhs.position_ << ", "; // << rhs.direction_ << ")";
+
+ switch (rhs.direction_)
+ {
+ case IDLE:
+ os << "IDLE";
+ break;
+ case UP:
+ os << "UP";
+ break;
+ case DOWN:
+ os << "DOWN";
+ break;
+ case ALL:
+ os << "ALL";
+ break;
+ default:
+ os << "UNHANDLED";
+ break;
+ }
+
+ os << ")";
+ return os;