All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class objects.EuWrapper

java.lang.Object
   |
   +----objects.EuWrapper

public class EuWrapper
extends Object
implements constants
This is a wrapper class for working with objects and labs. It operates in phases:


Variable Index

 o DRIVE_E
A constant indicating that the EuWrapper is in the DRIVE_E phase and hence contains explicits, not held up against any lab.
 o DRIVE_I
A constant indicating that the EuWrapper is in the DRIVE_I phase and hence contains sorted implicits being processed using flags.
 o NEUTRAL
A constant indicating that the EuWrapper is in the NEUTRAL phase and hence contains unprocessed implicits.
 o PARK
A constant indicating that the EuWrapper is in the STOP phase and hence contains paired implicits and explicits.
 o STOP
A constant indicating that the EuWrapper is in the STOP phase and hence contains paired implicits and explicits.

Constructor Index

 o EuWrapper()
The constructor initializes the class' internal Vectors and sets the phase to NEUTRAL.
 o EuWrapper(int)
The constructor initializes the class' internal Vectors.

Method Index

 o add(EuObject)
Add an entry.
 o add(int, int, int)
Add an entry.
 o add(wrapItem)
Add an entry.
 o addAt(int, int, int, int)
Add an entry at a specified index.
 o addAt(int, wrapItem)
Add an entry at a specified index.
 o checkAgainstMaskExcluding(int, int)
Check if the contents of the EuWrapper match a given mask.
 o countExplicits()
PHASES: All
 o countImplicits()
PHASES: All
 o countImplicitsWhichAreFlagged(int)
Count flagged implicits.
 o currentPhase()
PHASES: All
 o findFirstMaskedAndFlagged(int, int)
Find first entry satisfying mask and flag conditions.
 o flagAt(int, int)
Change the flag at a specified index
 o forgetAt(int)
Forget an entry.
 o forgetImplicitsWhichAreFlagged(int)
Forget all implicits flagged by a certain flag.
 o get(int)
Retrieve an explicit entry.
 o get(int, EuLab)
Retrieve an implicit entry as en explicit using the lab.
 o getArc(int)
Retrieve an explicit entry.
 o getArc(int, EuLab)
Retrieve an implicit entry as en explicit using the lab.
 o getCircle(int)
Retrieve an explicit entry.
 o getCircle(int, EuLab)
Retrieve an implicit entry as en explicit using the lab.
 o getHalf(int)
Retrieve an explicit entry.
 o getHalf(int, EuLab)
Retrieve an implicit entry as en explicit using the lab.
 o getInterval(int)
Retrieve an explicit entry.
 o getInterval(int, EuLab)
Retrieve an implicit entry as en explicit using the lab.
 o getLine(int)
Retrieve an explicit entry.
 o getLine(int, EuLab)
Retrieve an implicit entry as en explicit using the lab.
 o getPoint(int)
Retrieve an explicit entry.
 o getPoint(int, EuLab)
Retrieve an implicit entry as en explicit using the lab.
 o getRadius(int)
Retrieve an explicit entry.
 o getRadius(int, EuLab)
Retrieve an implicit entry as en explicit using the lab.
 o merge(EuWrapper)
A variety of actions are performed during
 o merge(EuWrapper, EuLab, EuWarner)
A variety of actions are performed during
 o pickImplicit(int)
 o reflagImplicits(int)
Flag all implicits.
 o reflagImplicitsWhichAreFlagged(int, int)
Change all instances of one flag to another.
 o reflagUsingMask(int, int, int)
Change all instances of one flag to another, provided that the instances meet a mask criterion.
 o swapByFlag(int, int)
Sort two entries according to their flag.
 o swapByImplicitNumber(int, int)
Sort two entries according to their
 o toPhase(int)
A variety of actions are performed during phase transition.
 o toPhase(int, EuLab)
A variety of actions are performed during phase transition.
 o toString()
Document the contents of the EuWrapper.

Variables

 o NEUTRAL
 public static int NEUTRAL
A constant indicating that the EuWrapper is in the NEUTRAL phase and hence contains unprocessed implicits.

 o DRIVE_E
 public static int DRIVE_E
A constant indicating that the EuWrapper is in the DRIVE_E phase and hence contains explicits, not held up against any lab.

 o DRIVE_I
 public static int DRIVE_I
A constant indicating that the EuWrapper is in the DRIVE_I phase and hence contains sorted implicits being processed using flags.

 o STOP
 public static int STOP
A constant indicating that the EuWrapper is in the STOP phase and hence contains paired implicits and explicits.

 o PARK
 public static int PARK
A constant indicating that the EuWrapper is in the STOP phase and hence contains paired implicits and explicits.

Constructors

 o EuWrapper
 public EuWrapper(int p)
The constructor initializes the class' internal Vectors.

Parameters:
p - The phase in which to start the EuWrapper
 o EuWrapper
 public EuWrapper()
The constructor initializes the class' internal Vectors and sets the phase to NEUTRAL.

Methods

 o currentPhase
 public int currentPhase()
PHASES: All

Returns:
The current phase
 o countImplicits
 public int countImplicits()
PHASES: All

Returns:
The number of stored implicits
 o countExplicits
 public int countExplicits()
PHASES: All

Returns:
The number of stored explicits
 o countImplicitsWhichAreFlagged
 public int countImplicitsWhichAreFlagged(int flag)
Count flagged implicits. PHASES: All

Parameters:
flag - the flag
Returns:
The number of implicits flagged by passed flag
 o findFirstMaskedAndFlagged
 public int findFirstMaskedAndFlagged(int mask,
                                      int flag)
Find first entry satisfying mask and flag conditions. PHASES: All

Parameters:
flag - the flag
mask - the mask, should work both with types and subtypes
Returns:
The entry number, or -1 if no such entry exists.
 o flagAt
 public void flagAt(int i,
                    int flag)
Change the flag at a specified index

Parameters:
i - the index
to - the new flag
 o reflagImplicitsWhichAreFlagged
 public void reflagImplicitsWhichAreFlagged(int from,
                                            int to)
Change all instances of one flag to another. PHASES: All

Parameters:
from - the flag to be changed
to - the new flag
 o reflagImplicits
 public void reflagImplicits(int to)
Flag all implicits. PHASES: All

Parameters:
to - the new flag
 o reflagUsingMask
 public void reflagUsingMask(int mask,
                             int from,
                             int to)
Change all instances of one flag to another, provided that the instances meet a mask criterion. PHASES: All

Parameters:
from - the flag to be changed
to - the new flag
mask - the mask
 o toString
 public String toString()
Document the contents of the EuWrapper. PHASES: All

Parameters:
from - the flag to be changed
to - the new flag
mask - the mask
Overrides:
toString in class Object
 o pickImplicit
 public wrapItem pickImplicit(int i)
Parameters:
i - the index of the desired implicit
Returns:
the implicit
 o forgetAt
 public void forgetAt(int i) throws LeaInternalException
Forget an entry. PHASES: NEUTRAL, STOP, DRIVE

Parameters:
i - the number of the entry
Throws: LeaInternalException
if wrong phase
 o add
 public void add(wrapItem item) throws LeaInternalException
Add an entry. PHASES: NEUTRAL, DRIVE_I

Parameters:
item - the entry
Throws: LeaInternalException
if wrong phase
 o add
 public void add(int number,
                 int flag,
                 int type) throws LeaInternalException
Add an entry. PHASES: NEUTRAL, DRIVE_I

Parameters:
number - the number
flag - the flag
type - the type
Throws: LeaInternalException
if wrong phase
 o addAt
 public void addAt(int i,
                   wrapItem item) throws LeaInternalException
Add an entry at a specified index. PHASES: NEUTRAL, DRIVE_I

Parameters:
i - the index
item - the entry
Throws: LeaInternalException
if wrong phase
 o addAt
 public void addAt(int i,
                   int number,
                   int flag,
                   int type) throws LeaInternalException
Add an entry at a specified index. PHASES: NEUTRAL, DRIVE_I

Parameters:
i - the index
number - the number
flag - the flag
type - the type
Throws: LeaInternalException
if wrong phase
 o add
 public void add(EuObject o) throws LeaInternalException
Add an entry. PHASES: DRIVE_E

Parameters:
o - the entry
Throws: LeaInternalException
if wrong phase
 o get
 public EuObject get(int i) throws LeaInternalException
Retrieve an explicit entry. PHASES: DRIVE_E, STOP

Parameters:
i - the number of the entry
Throws: LeaInternalException
if wrong phase
 o getPoint
 public EuPoint getPoint(int i) throws LeaInternalException
Retrieve an explicit entry. PHASES: DRIVE_E

Parameters:
i - the number of the entry
Throws: LeaInternalException
if wrong phase
 o getLine
 public EuLine getLine(int i) throws LeaInternalException
Retrieve an explicit entry. PHASES: DRIVE_E

Parameters:
i - the number of the entry
Throws: LeaInternalException
if wrong phase
 o getCircle
 public EuCircle getCircle(int i) throws LeaInternalException
Retrieve an explicit entry. PHASES: DRIVE_E

Parameters:
i - the number of the entry
Throws: LeaInternalException
if wrong phase
 o getArc
 public EuArc getArc(int i) throws LeaInternalException
Retrieve an explicit entry. PHASES: DRIVE_E

Parameters:
i - the number of the entry
Throws: LeaInternalException
if wrong phase
 o getRadius
 public EuRadius getRadius(int i) throws LeaInternalException
Retrieve an explicit entry. PHASES: DRIVE_E

Parameters:
i - the number of the entry
Throws: LeaInternalException
if wrong phase
 o getInterval
 public EuInterval getInterval(int i) throws LeaInternalException
Retrieve an explicit entry. PHASES: DRIVE_E

Parameters:
i - the number of the entry
Throws: LeaInternalException
if wrong phase
 o getHalf
 public EuHalf getHalf(int i) throws LeaInternalException
Retrieve an explicit entry. PHASES: DRIVE_E

Parameters:
i - the number of the entry
Throws: LeaInternalException
if wrong phase
 o checkAgainstMaskExcluding
 public boolean checkAgainstMaskExcluding(int mask,
                                          int flag)
Check if the contents of the EuWrapper match a given mask. This is determined by comparing the EuWrapper entries' type against the map, ignoring those who are flagged by a passed flag. PHASES: DRIVE_I

Parameters:
mask - the mask
flag - the flag
Throws: LeaInternalException
if wrong phase
 o swapByImplicitNumber
 public void swapByImplicitNumber(int i,
                                  int j) throws LeaInternalException
Sort two entries according to their @see EuLab number. PHASES: STOP

Parameters:
i - the number of the first entry
j - the number of the second entry
Throws: LeaInternalException
if wrong phase
 o swapByFlag
 public void swapByFlag(int i,
                        int j) throws LeaInternalException
Sort two entries according to their flag. PHASES: STOP

Parameters:
i - the number of the first entry
j - the number of the second entry
Throws: LeaInternalException
if wrong phase
 o get
 public EuObject get(int i,
                     EuLab lab) throws LeaInternalException, LeaRuntimeException
Retrieve an implicit entry as en explicit using the lab. PHASES: PARK, DRIVE_I

Parameters:
i - the number of the entry
lab - the lab
Throws: LeaInternalException
if wrong phase
 o getPoint
 public EuPoint getPoint(int i,
                         EuLab lab) throws LeaInternalException, LeaRuntimeException
Retrieve an implicit entry as en explicit using the lab. PHASES: PARK

Parameters:
i - the number of the entry
lab - the lab
Throws: LeaInternalException
if wrong phase
 o getLine
 public EuLine getLine(int i,
                       EuLab lab) throws LeaInternalException, LeaRuntimeException
Retrieve an implicit entry as en explicit using the lab. PHASES: PARK

Parameters:
i - the number of the entry
lab - the lab
Throws: LeaInternalException
if wrong phase
 o getCircle
 public EuCircle getCircle(int i,
                           EuLab lab) throws LeaInternalException, LeaRuntimeException
Retrieve an implicit entry as en explicit using the lab. PHASES: PARK

Parameters:
i - the number of the entry
lab - the lab
Throws: LeaInternalException
if wrong phase
 o getArc
 public EuArc getArc(int i,
                     EuLab lab) throws LeaInternalException, LeaRuntimeException
Retrieve an implicit entry as en explicit using the lab. PHASES: PARK

Parameters:
i - the number of the entry
lab - the lab
Throws: LeaInternalException
if wrong phase
 o getRadius
 public EuRadius getRadius(int i,
                           EuLab lab) throws LeaInternalException, LeaRuntimeException
Retrieve an implicit entry as en explicit using the lab. PHASES: PARK

Parameters:
i - the number of the entry
lab - the lab
Throws: LeaInternalException
if wrong phase
 o getInterval
 public EuInterval getInterval(int i,
                               EuLab lab) throws LeaInternalException, LeaRuntimeException
Retrieve an implicit entry as en explicit using the lab. PHASES: PARK

Parameters:
i - the number of the entry
lab - the lab
Throws: LeaInternalException
if wrong phase
 o getHalf
 public EuHalf getHalf(int i,
                       EuLab lab) throws LeaInternalException, LeaRuntimeException
Retrieve an implicit entry as en explicit using the lab. PHASES: PARK

Parameters:
i - the number of the entry
lab - the lab
Throws: LeaInternalException
if wrong phase
 o forgetImplicitsWhichAreFlagged
 public void forgetImplicitsWhichAreFlagged(int flag) throws LeaInternalException
Forget all implicits flagged by a certain flag. PHASES: NEUTRAL, DRIVE_I

Parameters:
flag - the flag
 o toPhase
 public void toPhase(int newPhase) throws LeaInternalException
A variety of actions are performed during phase transition. In the table below,
fr/toNDeDiSP
NA C G
DeA    
DiA   G
SA    
PA    
only the marked combinations of to and from entries are allowed in a call without a passed lab. Their effects are as follows

Parameters:
newPhase - the desired new phase
 o toPhase
 public void toPhase(int newPhase,
                     EuLab lab) throws LeaInternalException, LeaRuntimeException
A variety of actions are performed during phase transition. In the table below, to/fr
 NDeDiSP
N B   
De   D 
Di   EI
S    F
P     
only the marked combinations of to and from entries are allowed in a call with a passed lab. Their effects are as follows

Parameters:
newPhase - the desired new phase
lab - the @see EuLab used
 o merge
 public void merge(EuWrapper other) throws LeaException
A variety of actions are performed during @see EuWrapper merging. In the table below,
fr/toNDeDiSP
N1    
De     
Di     
S     
only the marked combinations of to and from entries are allowed in a call without a passed lab and warner Their effects are as follows

 o merge
 public void merge(EuWrapper other,
                   EuLab lab,
                   EuWarner warner) throws LeaException, WarningTurnedException
A variety of actions are performed during @see EuWrapper merging. In the table below,
fr/toNDeDiSP
N1    
De     
Di     
S    3
P 4  2
only the marked combinations of to and from entries are allowed in a call without a passed lab and warner. Their effects are as follows

Parameters:
newPhase - the desired new phase
lab - the @see EuLab used

All Packages  Class Hierarchy  This Package  Previous  Next  Index