Package microsim.reflection
Class IntegerValueExtractor
java.lang.Object
microsim.reflection.AbstractValueExtractor
microsim.reflection.IntegerValueExtractor
Employs Java reflection to call objects' methods which return integer values.
-
Field Summary
Fields inherited from class microsim.reflection.AbstractValueExtractor
field, method, target
-
Constructor Summary
ConstructorDescriptionIntegerValueExtractor
(@NonNull Object target, @NonNull String fieldName, boolean isMethod) IntegerValueExtractor
(@Nullable Class<?> target, @NonNull String fieldName, boolean isMethod) -
Method Summary
Modifier and TypeMethodDescriptionint @NonNull []
getCollectionValue
(@NonNull Collection<?> c) int
getInt()
Invoke the method of the object passed to constructor and return its integer result.int
Invoke the method of the target object and return its integer result.int
getIntValue
(int ignoredValueID) This is an implementation of theIntSource
interface.
-
Constructor Details
-
IntegerValueExtractor
-
IntegerValueExtractor
-
-
Method Details
-
getInt
Invoke the method of the target object and return its integer result.- Parameters:
target
- Object to be invoked.- Returns:
- The requested integer value.
-
getInt
public int getInt()Invoke the method of the object passed to constructor and return its integer result.- Returns:
- The requested integer value.
-
getIntValue
public int getIntValue(int ignoredValueID) - Parameters:
ignoredValueID
- This parameter is ignored. It is put for compatibility with theIntSource
interface.- Returns:
- The requested integer value.
-
getCollectionValue
-