java.lang.Object
org.autogui.base.mapping.GuiReprValue.ObjectSpecifier
- Direct Known Subclasses:
GuiReprValue.ObjectSpecifierIndex
,GuiReprValue.ObjectSpecifierNothing
- Enclosing class:
GuiReprValue
an auxiliary information for specifying a property value.
A typical example is an index of a list.
For regular properties, GuiReprValue.NONE
is sufficient.
However, consider a list property, like
class A { List<B> prop1; } class B { List<C> prop2; } class C { String prop3; }To specify a value of
prop3
from the top A
,
we can write a.prop1.get(i).prop2.get(j).prop3
.
This class represents the expression of the property chain with indices:
NONE.childIndex(i).child(false).childIndex(j).child(false)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchild
(boolean usingCache) childIndex
(int index) int
getIndex()
boolean
isIndex()
boolean
toString()
-
Field Details
-
parent
-
usingCache
protected boolean usingCache
-
-
Constructor Details
-
ObjectSpecifier
-
-
Method Details
-
isUsingCache
public boolean isUsingCache()- Returns:
- true if the obtained property value can be a cached value
-
getParent
-
getIndex
public int getIndex()- Returns:
- index of an element, default is 0
-
isIndex
public boolean isIndex()- Returns:
- true if the specifier is an index. default is false
-
childIndex
- Parameters:
index
- the next index- Returns:
- created index specifier as a child of this specifier.
-
child
- Parameters:
usingCache
- specifying using cache values- Returns:
- created (non-index) specifier as a child of this specifier
-
toString
-