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:
-
NEUTRAL
- Contains unprocessed implicits.
- Used flags: HIDDEN, NORMAL
- DRIVE_E
- Contains explicits, not held up against any lab.
- Used flags: none
- DRIVE_I
- Contains sorted and known implicits being processed using flags
- Used flags: HIDDEN, NORMAL, HIGHLIGHTED, OUT_OF_HIDING.
- STOP
- Contains paired implicits and explicits. Explicit information not dependable
for KNOWN entries. Implicit information
not dependable only for UNKNOWN entries
- Used flags: KNOWN, KNOWN_ONLY_AS_TARGET, UNKNOWN, HIDDEN, NORMAL, HIGHLIGHTED, OUT_OF_HIDING.
- PARK
- Contains implicits only, locked for permanent record of the move
- Used flags: NEW, KNOWN
-
DRIVE_E
- A constant indicating that the EuWrapper is in the DRIVE_E phase
and hence contains explicits, not held up against any lab.
-
DRIVE_I
- A constant indicating that the EuWrapper is in the DRIVE_I phase
and hence contains sorted implicits being processed using flags.
-
NEUTRAL
- A constant indicating that the EuWrapper is in the NEUTRAL phase
and hence contains unprocessed implicits.
-
PARK
- A constant indicating that the EuWrapper is in the STOP phase
and hence contains paired implicits and explicits.
-
STOP
- A constant indicating that the EuWrapper is in the STOP phase
and hence contains paired implicits and explicits.
-
EuWrapper()
- The constructor initializes the class' internal
Vectors and sets the phase to NEUTRAL.
-
EuWrapper(int)
- The constructor initializes the class' internal
Vectors.
-
add(EuObject)
- Add an entry.
-
add(int, int, int)
- Add an entry.
-
add(wrapItem)
- Add an entry.
-
addAt(int, int, int, int)
- Add an entry at a specified index.
-
addAt(int, wrapItem)
- Add an entry at a specified index.
-
checkAgainstMaskExcluding(int, int)
- Check if the contents of the EuWrapper match a given mask.
-
countExplicits()
- PHASES: All
-
countImplicits()
- PHASES: All
-
countImplicitsWhichAreFlagged(int)
- Count flagged implicits.
-
currentPhase()
- PHASES: All
-
findFirstMaskedAndFlagged(int, int)
- Find first entry satisfying mask and flag conditions.
-
flagAt(int, int)
- Change the flag at a specified index
-
forgetAt(int)
- Forget an entry.
-
forgetImplicitsWhichAreFlagged(int)
- Forget all implicits flagged by a certain flag.
-
get(int)
- Retrieve an explicit entry.
-
get(int, EuLab)
- Retrieve an implicit entry as en explicit using the lab.
-
getArc(int)
- Retrieve an explicit entry.
-
getArc(int, EuLab)
- Retrieve an implicit entry as en explicit using the lab.
-
getCircle(int)
- Retrieve an explicit entry.
-
getCircle(int, EuLab)
- Retrieve an implicit entry as en explicit using the lab.
-
getHalf(int)
- Retrieve an explicit entry.
-
getHalf(int, EuLab)
- Retrieve an implicit entry as en explicit using the lab.
-
getInterval(int)
- Retrieve an explicit entry.
-
getInterval(int, EuLab)
- Retrieve an implicit entry as en explicit using the lab.
-
getLine(int)
- Retrieve an explicit entry.
-
getLine(int, EuLab)
- Retrieve an implicit entry as en explicit using the lab.
-
getPoint(int)
- Retrieve an explicit entry.
-
getPoint(int, EuLab)
- Retrieve an implicit entry as en explicit using the lab.
-
getRadius(int)
- Retrieve an explicit entry.
-
getRadius(int, EuLab)
- Retrieve an implicit entry as en explicit using the lab.
-
merge(EuWrapper)
-
A variety of actions are performed during
-
merge(EuWrapper, EuLab, EuWarner)
-
A variety of actions are performed during
-
pickImplicit(int)
-
-
reflagImplicits(int)
- Flag all implicits.
-
reflagImplicitsWhichAreFlagged(int, int)
- Change all instances of one flag to another.
-
reflagUsingMask(int, int, int)
- Change all instances of one flag to another, provided that
the instances meet a mask criterion.
-
swapByFlag(int, int)
- Sort two entries according to their flag.
-
swapByImplicitNumber(int, int)
- Sort two entries according to their
-
toPhase(int)
-
A variety of actions are performed during phase transition.
-
toPhase(int, EuLab)
-
A variety of actions are performed during phase transition.
-
toString()
- Document the contents of the EuWrapper.
NEUTRAL
public static int NEUTRAL
- A constant indicating that the EuWrapper is in the NEUTRAL phase
and hence contains unprocessed implicits.
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.
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.
STOP
public static int STOP
- A constant indicating that the EuWrapper is in the STOP phase
and hence contains paired implicits and explicits.
PARK
public static int PARK
- A constant indicating that the EuWrapper is in the STOP phase
and hence contains paired implicits and explicits.
EuWrapper
public EuWrapper(int p)
- The constructor initializes the class' internal
Vectors.
- Parameters:
- p - The phase in which to start the EuWrapper
EuWrapper
public EuWrapper()
- The constructor initializes the class' internal
Vectors and sets the phase to NEUTRAL.
currentPhase
public int currentPhase()
- PHASES: All
- Returns:
- The current phase
countImplicits
public int countImplicits()
- PHASES: All
- Returns:
- The number of stored implicits
countExplicits
public int countExplicits()
- PHASES: All
- Returns:
- The number of stored explicits
countImplicitsWhichAreFlagged
public int countImplicitsWhichAreFlagged(int flag)
- Count flagged implicits. PHASES: All
- Parameters:
- flag - the flag
- Returns:
- The number of implicits flagged by passed flag
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.
flagAt
public void flagAt(int i,
int flag)
- Change the flag at a specified index
- Parameters:
- i - the index
- to - the new flag
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
reflagImplicits
public void reflagImplicits(int to)
- Flag all implicits. PHASES: All
- Parameters:
- to - the new flag
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
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
pickImplicit
public wrapItem pickImplicit(int i)
- Parameters:
- i - the index of the desired implicit
- Returns:
- the implicit
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
add
public void add(wrapItem item) throws LeaInternalException
- Add an entry. PHASES: NEUTRAL, DRIVE_I
- Parameters:
- item - the entry
- Throws: LeaInternalException
- if wrong phase
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
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
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
add
public void add(EuObject o) throws LeaInternalException
- Add an entry. PHASES: DRIVE_E
- Parameters:
- o - the entry
- Throws: LeaInternalException
- if wrong phase
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
forgetImplicitsWhichAreFlagged
public void forgetImplicitsWhichAreFlagged(int flag) throws LeaInternalException
- Forget all implicits flagged by a certain flag. PHASES: NEUTRAL, DRIVE_I
- Parameters:
- flag - the flag
toPhase
public void toPhase(int newPhase) throws LeaInternalException
- A variety of actions are performed during phase transition. In the table below,
fr/to | N | De | Di | S | P
|
N | A | | C | | G
|
De | A | | | |
|
Di | A | | | | G
|
S | A | | | |
|
P | A | | | |
|
only the marked combinations of to and from entries are allowed
in a call without a passed lab.
Their effects are as follows
- A: clear all
- C: sort all implicits and forget all explicits
- G: Trim implicits, remove explicits, flag all KNOWN
- Parameters:
- newPhase - the desired new phase
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 | N | De | Di | S | P
|
N | | B | | |
|
De | | | | D |
|
Di | | | | E | I
|
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
- B: Using the lab, transform all implicits to cloned explicits
- D: update implicits by holding up explicits to lab
- E: add cloned explicits to EuWrapper using lab
- F: add to lab if necessary, flag KNOWN or NEW, update sameAs, trim
- I: first D, then F
- Parameters:
- newPhase - the desired new phase
- lab - the @see EuLab used
merge
public void merge(EuWrapper other) throws LeaException
- A variety of actions are performed during @see EuWrapper merging. In the table below,