-
public class PathFinder.PathElementa path element E matches a view V if each non "prefix" or "index"attribute of E is equal to (or characteristic of) V.SoE.viewClassName == 'com.temp.Awesome' =) V instanceof com.tempAwesomeE.id == 123 =) V.getId() == 123The index attribute, counting from root to leaf,and first child to last child, selects a particularmatching view amongst all possible matches. Indexing starts at zero, like an arrayindex. So E.index == 2 means "Select the third possible match for this element"The prefix attribute refers to the position of the matched views in the hierarchy,relative to the current position of the path being searched. The "current position" ofa path element is determined by the path that preceeded that element:- The current position of the empty path is the root view- The current position of a non-empty path isthe children of any element that matched the lastelement of that path.Prefix values can be:ZERO_LENGTH_PREFIX- the next match must occur at the current position (so at the rootview if this is the first element of a path, or at the matching children of the viewsalready matched by the preceeding portion of the path.)If a path element with ZERO_LENGTH_PREFIXhas no index, then *all* matching elements of the path will be matched, otherwise indeceswill count from first child to last child.SHORTEST_PREFIX- the next match must occur at some descendant of the current position.SHORTEST_PREFIX elements are indexed depth-first, first child to last child. For performancereasons, at most one element will ever be matched to a SHORTEST_PREFIX element, soelements with no index will be treated as having index == 0
-
-
Field Summary
Fields Modifier and Type Field Description public final intprefixpublic final StringviewClassNamepublic final intindexpublic final intviewIdpublic final static intZERO_LENGTH_PREFIXpublic final static intSHORTEST_PREFIX
-
Constructor Summary
Constructors Constructor Description PathFinder.PathElement(int usePrefix, String vClass, int ix, int vId)PathElement
-