Operator | Description |
---|---|
Array access | Array elements may be accessed using either square brackets or a dotted numeral, e.g. arr1[0] and arr1.0 are equivalent |
List access | List elements may be accessed using either square brackets or a dotted numeral, e.g. list[0] and list.0 are equivalent |
Map access | Map elements are accessed using square brackets, e.g. map[0]; map[’name‘]; map[var]; Note that map[‚7‘] and map[7] refer to different elements. Map elements with a numeric key may also be accessed using a dotted numeral, e.g. map[0] and map.0 are equivalent. Note that map.1 and map.01 refer to different elements, while map.1 and map[01] are equivalent. |
JavaBean property access | Properties of JavaBean objects that define appropriate getter methods can be accessed using either square brackets or a dotted numeral, e.g. foo[‚bar‘] and foo.bar are equivalent. The appropriate Foo.getBar() method will be called. Note that both foo.Bar and foo.bar can be used |
Indexed JavaBean property access | Indexed properties of JavaBean objects that define appropriate getter methods can be accessed using either square brackets or a dotted numeral, e.g. x.attribute[’name‘] and x.attribute.name are equivalent. The appropriate Foo.getAttribute(String index) method will be called |
Public field access | Public fields of java objects can be accessed using either square brackets or a dotted numeral, e.g. foo[‚bar‘] and foo.bar are equivalent. |
Duck-typed collection property access | Properties of Java classes that define public Object get(String name) method can be accessed using either square brackets or a dotted numeral, e.g. foo[‚bar‘] and foo.bar are equivalent. The appropriate Foo.get(String index) method will be called with the argument of „bar“ String |