public static class BasicLocations.ObjectArrayLocation extends BasicLocations.ArrayLocation implements ObjectLocation
LocationImpl.EffectivelyFinalLocation<T extends Location>, LocationImpl.InternalLongLocation, LocationImpl.TypedObjectLocation<T extends Location & ObjectLocation>
arrayLocation, index
Constructor and Description |
---|
BasicLocations.ObjectArrayLocation(int index,
Location arrayLocation) |
Modifier and Type | Method and Description |
---|---|
boolean |
canStore(java.lang.Object value)
Returns
true if the location is compatible with the value. |
java.lang.Object |
get(DynamicObject store,
boolean condition)
Get object value as object at this location in store.
|
java.lang.Class<? extends java.lang.Object> |
getType()
The type of this location.
|
boolean |
isNonNull()
If
true , this location does not accept null values. |
int |
objectArrayCount()
Get the number of object array elements this location requires.
|
void |
setInternal(DynamicObject store,
java.lang.Object value)
Like
Location.set(DynamicObject, Object, Shape) , but does not invalidate final locations. |
equals, getArray, getIndex, getWhereString, hashCode
canSet, canStoreFinal, getInternal, isConstant, isFinal, objectFieldCount, primitiveArrayCount, primitiveFieldCount, set, toString, valueEquals
checkShape, finalLocation, get, incompatibleLocation, set, set
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
get, set, set, set
public BasicLocations.ObjectArrayLocation(int index, Location arrayLocation)
public java.lang.Object get(DynamicObject store, boolean condition)
BaseLocation
BaseLocation.get(DynamicObject, Shape)
instead.get
in interface BaseLocation
get
in class Location
condition
- the result of a shape check or false
BaseLocation.get(DynamicObject, Shape)
public final void setInternal(DynamicObject store, java.lang.Object value) throws IncompatibleLocationException
Location
Location.set(DynamicObject, Object, Shape)
, but does not invalidate final locations. For
internal use only and subject to change, use DynamicObjectFactory
to create objects
with predefined properties.setInternal
in class LocationImpl
IncompatibleLocationException
- if value is of non-assignable typepublic boolean canStore(java.lang.Object value)
Location
true
if the location is compatible with the value.
The value may still be rejected if Location.canSet(DynamicObject, Object)
returns false.canStore
in class LocationImpl
value
- the value in questionpublic java.lang.Class<? extends java.lang.Object> getType()
TypedLocation
getType
in interface ObjectLocation
getType
in interface TypedLocation
public final boolean isNonNull()
ObjectLocation
true
, this location does not accept null
values.isNonNull
in interface ObjectLocation
public int objectArrayCount()
LocationImpl
objectArrayCount
in class LocationImpl