Do you really understand what you are asking about? I doubt, because if you did, you would not ask such question, because this is way too simple. You can create a wrapper class which is initialized with some instance of the
ArrayList
and exposes only the read-only access to the elements. I would suggest that, except the constructor I described above, the wrapper exposed only two properties: get element
Count
and the object by index. However, on top of it, you could implement million of things: cloning, search, and a lot more…
Please see also:
http://en.wikipedia.org/wiki/Decorator_pattern[
^].
—SA