Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class CarContainer

    java.lang.Object
      |
      +--CarContainer

Direct Known Subclasses:
  JunctionPath, LaneSection

public abstract class CarContainer
extends java.lang.Object

Field Summary
`static double` | `NOTHING_IN_FRONT`

Constructor Summary
`CarContainer(int iD, int startX, int startY, int endX, int endY)`

Method Summary
`void` | `addCar(Car newCar)`
`boolean` | `anycollisions(Car currentcar)`
`void` | `drawAllCars(java.awt.Graphics2D g2d)`
`void` | `drawIDs(java.awt.Graphics2D g2d, int parentID)`
`Car` | `getCar(java.awt.geom.Point2D p)` Due to mouse Events
`double` | `getdx()`
`double` | `getdy()`
`int` | `getendX()`
`int` | `getendY()`
`int` | `getGeneralDirection()`
`double` | `getGradient()`
`int` | `getID()`
`int` | `getMidX()`
`int` | `getMidY()`
`double[]` | `getNextObInFront(Car currentcar, double curCarDistFromEnd)` given the front of the "currentcar", this returns the shortest distance between the front of the "currentcar" and the back of the car in front.
`abstract int` | `getParentID()`
`double` | `getRadAngle()`
`int` | `getSpeeds()`
`int` | `getstartX()`
`int` | `getstartY()`
`boolean` | `hasCars()`
`boolean` | `isFirstOne()`
`abstract boolean` | `isLastOne()`
`double[]` | `isOKToGo(Car c, double[] info, double dist)`
`void` | `kill()`
`int` | `numStationaryCars()`
`abstract CarContainer` | `onToNext()`
`void` | `removeCar(Car newCar)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NOTHING_IN_FRONT

    public static final double NOTHING_IN_FRONT

Constructor Detail

### CarContainer

    public CarContainer(int iD,
                        int startX,
                        int startY,
                        int endX,
                        int endY)

Method Detail

### getGradient

    public double getGradient()

### getdy

    public double getdy()

### getdx

    public double getdx()

### getstartX

    public int getstartX()

### getstartY

    public int getstartY()

### getendX

    public int getendX()

### getendY

    public int getendY()

### getRadAngle

    public double getRadAngle()

### getMidX

    public int getMidX()

### getMidY

    public int getMidY()

### getGeneralDirection

    public int getGeneralDirection()

### getID

    public int getID()

### isLastOne

    public abstract boolean isLastOne()

### onToNext

    public abstract CarContainer onToNext()

### getParentID

    public abstract int getParentID()

### isFirstOne

    public boolean isFirstOne()

### drawAllCars

    public void drawAllCars(java.awt.Graphics2D g2d)

### drawIDs

    public void drawIDs(java.awt.Graphics2D g2d,
                        int parentID)

### addCar

    public void addCar(Car newCar)

### removeCar

    public void removeCar(Car newCar)

### hasCars

    public boolean hasCars()

### anycollisions

    public boolean anycollisions(Car currentcar)

### getNextObInFront

    public double[] getNextObInFront(Car currentcar,
                                     double curCarDistFromEnd)

  given the front of the "currentcar", this returns the shortest distance between the front of the "currentcar" and the back of the car in front.

### isOKToGo

    public double[] isOKToGo(Car c,
                             double[] info,
                             double dist)

### numStationaryCars

    public int numStationaryCars()

### kill

    public void kill()

### getCar

    public Car getCar(java.awt.geom.Point2D p)

  Due to mouse Events

### getSpeeds

    public int getSpeeds()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD