The current organization of storevector seems quite ad-hoc. The input vector is not a good abstraction, defining a set of interface methods, which aren't general enough to be used/implemented by its implementing classes.
Give a few ideas about my plan here:
define a generic value class (like a union type containing int or string for now). It can be compared during processing. This is to hide any value type specific logic.
all input vector return generic value instances thus avoiding explicit casting in our code base of input vector.
input vector has a set of interface methods get, hasnext, next. which directly works on the state of internal buffers in the implementing classes. Implementing Iterable interface and using iterator to avoid directly manipulating buffer state is a better approach, I think.
The current organization of storevector seems quite ad-hoc. The input vector is not a good abstraction, defining a set of interface methods, which aren't general enough to be used/implemented by its implementing classes.
Give a few ideas about my plan here:
get
,hasnext
,next
. which directly works on the state of internal buffers in the implementing classes. Implementing Iterable interface and using iterator to avoid directly manipulating buffer state is a better approach, I think.Any comments?