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