Make RangeLookupTable immutable
mbedward opened this issue · comments
Original author: michael.bedward@gmail.com (January 15, 2013 02:31:45)
All the usual advantages of having an immutable object apply, and it fits with Simone's recent changes to make the associated RangeLookup operator thread safe.
Add one or more methods to return a new table based on an existing table to replace in-place updating (see issue 198 which this issue will supersede).
Original issue: http://code.google.com/p/jaitools/issues/detail?id=213
Added a Builder class within RangeLookupTable (only in local repo at the moment). Creates some generic type parameter hell in the code but actually reduces type param overload a little for clients.
Think we can take this opportunity to add another option for lookups: pass-through of source values which do not match lookup ranges.
2 thumbs up
Cool - I will make it so
Decided to strip back RangeLookupTable so that it manages building, sorting and searching the list of LookupItems. Default value and pass-through option can be made parameters for the RangeLookup operation.
Done. Included with version 1.3.1