Package com.perforce.p4java.mapapi
Class MapTable
- java.lang.Object
-
- com.perforce.p4java.mapapi.MapTable
-
public class MapTable extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MapTable.compareLHS
class
MapTable.compareRHS
class
MapTable.compareStreamLHS
class
MapTable.compareStreamRHS
-
Field Summary
Fields Modifier and Type Field Description int
caseMode
int
count
java.lang.String
emptyReason
MapItem
entry
boolean
hasAndmaps
boolean
hasHavemaps
boolean
hasMaps
boolean
hasOverlays
boolean
joinError
MapTree[]
trees
-
Constructor Summary
Constructors Constructor Description MapTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MapItem
check(MapTableT dir, java.lang.String from)
void
clear()
int
countByFlag(MapFlag mapFlag)
void
disambiguate()
MapTable::Disambiguate() - handle un/ambiguous mappingsvoid
dump(java.lang.StringBuffer buf, java.lang.String trace, int fmt)
void
dumpTree(java.lang.StringBuffer buf, MapTableT dir, java.lang.String trace)
MapItemArray
explode(MapTableT dir, java.lang.String from)
MapItem
get(int n)
MapFlag
getFlag(MapItem m)
MapItem
getNext(MapItem m)
int
getSlot(MapItem m)
java.lang.String
getStr(MapItem m, MapTableT dir)
boolean
hasAndmaps()
boolean
hasHavemaps()
boolean
hasOverlays()
void
insert(MapTable table, boolean fwd, boolean rev)
void
insert(java.lang.String lhs, int slot, java.lang.String rhs, MapFlag mapFlag)
void
insert(java.lang.String lhs, java.lang.String rhs, MapFlag mapFlag)
void
insertByPattern(java.lang.String lhs, java.lang.String rhs, MapFlag mapFlag)
void
insertNoDups(java.lang.String lhs, java.lang.String rhs, MapFlag mapFlag)
boolean
isEmpty()
boolean
isSingle()
void
join(MapTable m1, MapTableT dir1, MapTable m2, MapTableT dir2, MapJoiner j, java.lang.String reason)
MapTable
join(MapTableT dir1, MapTable m2, MapTableT dir2)
MapTable
join(MapTableT dir1, MapTable m2, MapTableT dir2, java.lang.String reason)
MapTable
join2(MapTableT dir1, MapTable m2, MapTableT dir2)
MapTable
join2(MapTableT dir1, MapTable m2, MapTableT dir2, java.lang.String reason)
boolean
joinCheck(MapTableT dir, MapTable c, MapTableT dir2)
boolean
joinCheck(MapTableT dir, java.lang.String lhs)
boolean
joinError()
void
joinOptimizer(MapTableT dir2)
boolean
match(MapHalf l, java.lang.String rhs)
boolean
match(java.lang.String lhs, java.lang.String rhs)
void
remove(int slotNum)
void
reverse()
MapTable
set(MapTable f)
void
setCaseSensitivity(int mode)
java.util.ArrayList<MapItem>
sort(MapTableT direction)
java.util.ArrayList<MapItem>
sort(MapTableT direction, boolean streamFlag)
MapStrings
strings(MapTableT direction)
MapTable
stripMap(MapFlag mapFlag)
MapTable
swap(MapTable table)
java.lang.String
translate(MapItem m, MapTableT dir, java.lang.String from)
MapWrap
translate(MapTableT dir, java.lang.String from)
void
validate(java.lang.String lhs, java.lang.String rhs)
boolean
validDepotMap(java.lang.String map)
void
validHalf(MapTableT dir)
-
-
-
Field Detail
-
count
public int count
-
entry
public MapItem entry
-
hasMaps
public boolean hasMaps
-
hasOverlays
public boolean hasOverlays
-
hasHavemaps
public boolean hasHavemaps
-
hasAndmaps
public boolean hasAndmaps
-
emptyReason
public java.lang.String emptyReason
-
joinError
public boolean joinError
-
caseMode
public int caseMode
-
trees
public MapTree[] trees
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
-
joinError
public boolean joinError()
-
hasOverlays
public boolean hasOverlays()
-
hasHavemaps
public boolean hasHavemaps()
-
hasAndmaps
public boolean hasAndmaps()
-
clear
public void clear()
-
setCaseSensitivity
public void setCaseSensitivity(int mode)
-
reverse
public void reverse()
-
insert
public void insert(MapTable table, boolean fwd, boolean rev)
-
insert
public void insert(java.lang.String lhs, java.lang.String rhs, MapFlag mapFlag)
-
insert
public void insert(java.lang.String lhs, int slot, java.lang.String rhs, MapFlag mapFlag)
-
insertNoDups
public void insertNoDups(java.lang.String lhs, java.lang.String rhs, MapFlag mapFlag)
-
remove
public void remove(int slotNum)
-
validate
public void validate(java.lang.String lhs, java.lang.String rhs) throws java.lang.Exception
- Throws:
java.lang.Exception
-
validHalf
public void validHalf(MapTableT dir) throws java.lang.Exception
- Throws:
java.lang.Exception
-
dump
public void dump(java.lang.StringBuffer buf, java.lang.String trace, int fmt)
-
dumpTree
public void dumpTree(java.lang.StringBuffer buf, MapTableT dir, java.lang.String trace)
-
isSingle
public boolean isSingle()
-
strings
public MapStrings strings(MapTableT direction)
-
explode
public MapItemArray explode(MapTableT dir, java.lang.String from)
-
match
public boolean match(MapHalf l, java.lang.String rhs)
-
match
public boolean match(java.lang.String lhs, java.lang.String rhs)
-
validDepotMap
public boolean validDepotMap(java.lang.String map)
-
get
public MapItem get(int n)
-
getSlot
public int getSlot(MapItem m)
-
countByFlag
public int countByFlag(MapFlag mapFlag)
-
insertByPattern
public void insertByPattern(java.lang.String lhs, java.lang.String rhs, MapFlag mapFlag)
-
disambiguate
public void disambiguate()
MapTable::Disambiguate() - handle un/ambiguous mappingsMappings provided by the user (client views, branch views) can be ambiguous since later mappings can override earlier ones. Disambiguate() adds explicit exclusion (-) mappings for any ambiguous mappings, so that Join() and Translate() don't have to worry about them.
For example:
a/... b/... a/c b/d
becomes
a/... b/... -a/c -b/c -a/d -b/d a/c b/d
Unmaps are handled similarly, but the high precedence unmap line itself is not added, because everything that can be unmapped has been done so by joining it against the lower precedence mapping lines:
a/... b/... -a/c b/d
becomes
a/... b/... -a/c -b/c -a/d -b/d
-
joinCheck
public boolean joinCheck(MapTableT dir, java.lang.String lhs)
-
joinOptimizer
public void joinOptimizer(MapTableT dir2)
-
join
public void join(MapTable m1, MapTableT dir1, MapTable m2, MapTableT dir2, MapJoiner j, java.lang.String reason)
-
-