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