All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class moves.FindIntersection

java.lang.Object
   |
   +----moves.EuMove
           |
           +----moves.constructFamily
                   |
                   +----moves.constructFamilyBeacon
                           |
                           +----moves.FindIntersection

public class FindIntersection
extends constructFamilyBeacon
implements constants
Implements the LEA command FindIntersection


Constructor Index

 o FindIntersection(EuWrapper, EuLab)
This constructor tries, given tentative information from a user, to find an input mode.
 o FindIntersection(EuWrapper, EuWrapper, EuArguments, int)
This constructor tries, given full information for a LEA program, to find an input and an output mode and checks that no arguments are passed.

Method Index

 o checkSegment(int)
Throws an exception in segment is not PREMISE or SOLUTION.
 o findAllConstructs(EuWrapper, EuLab)
Constructs a circle and places it in the provided EuWrapper.
 o name()
 o number()
 o numberOfModes(int)
 o subTypeChecks(EuWrapper, int, int)
 o theMode(int, int)
 o weedWithBeacon(EuWrapper)
Weeds using pointWeeder();

Constructors

 o FindIntersection
 public FindIntersection(EuWrapper in,
                         EuWrapper out,
                         EuArguments args,
                         int beacon) throws LeaSyntaxException
This constructor tries, given full information for a LEA program, to find an input and an output mode and checks that no arguments are passed. Also checks that no beacons are passed.

Parameters:
in - the input @see EuWrapper
out - the output @see EuWrapper
args - arguments
beacon - a beacon, or 0 if no such was requested
 o FindIntersection
 public FindIntersection(EuWrapper sel,
                         EuLab lab) throws LeaSyntaxException
This constructor tries, given tentative information from a user, to find an input mode.

Parameters:
sel - the user selections in a @see EuWrapper
lab - the current EuLab

Methods

 o name
 public String name()
Returns:
The LEA name of this command
Overrides:
name in class EuMove
 o number
 public int number()
Returns:
A number representing this move internally
Overrides:
number in class EuMove
 o weedWithBeacon
 protected void weedWithBeacon(EuWrapper findings) throws LeaRuntimeException, LeaInternalException
Weeds using pointWeeder();

Parameters:
outputmode - an output mode or 0 if none has been determined
findings - a EuWrapper in STOP phase
Overrides:
weedWithBeacon in class constructFamily
 o findAllConstructs
 protected void findAllConstructs(EuWrapper results,
                                  EuLab lab) throws LeaRuntimeException
Constructs a circle and places it in the provided EuWrapper.

Parameters:
results - a EuWrapper which must be in the DRIVE_E phase.
lab - the EuLab in which to get the objects with which to construct
Throws: LeaRuntimeException
if radius is not set
Overrides:
findAllConstructs in class constructFamily
 o numberOfModes
 protected int numberOfModes(int io)
Parameters:
io - either INPUT or OUTPUT (ignored)
Returns:
there are 2 input and 2 output modes
Overrides:
numberOfModes in class constructFamily
 o theMode
 protected int theMode(int i,
                       int io)
Parameters:
i - the number of the mode
io - either INPUT or OUTPUT
Returns:
a mask of the specified input or output mode
Overrides:
theMode in class constructFamily
 o subTypeChecks
 protected boolean subTypeChecks(EuWrapper sel,
                                 int i,
                                 int io)
Parameters:
sel - a EuWrapper in DRIVE_I or PARK mode
i - the number of the mode
io - either INPUT or OUTPUT
Returns:
true if subtype specifications are met, and they always are
Overrides:
subTypeChecks in class constructFamily
 o checkSegment
 protected void checkSegment(int segment) throws LeaRuntimeException
Throws an exception in segment is not PREMISE or SOLUTION.

Parameters:
segment - the current segment
Throws: LeaRuntimeException
if not PREMISE or SOLUTION
Overrides:
checkSegment in class constructFamily

All Packages  Class Hierarchy  This Package  Previous  Next  Index