Re: Any Checkstyle users?



On Tue, 31 Jan 2006 11:04:17 -0000, "Daniel Dyer"
<dan@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote, quoted or indirectly
quoted someone who said :

>"write locking yourself into ArrayList"

You make it difficult to change to some other List implementation. If
you use an explicit ArrayList reference, you can inadvertently use
methods defined only for ArrayList but not for other Lists.

Using an List reference, forces you write vanilla code where you can
change the collection implementation later easily.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.



Relevant Pages

  • Re: Rich Comparisons Gotcha
    ... I think it is a basic requirement for functioning lists that you get ... be it in the eqfunction, or in the list implementation. ... is the current python behaviour for nan in lists, ...
    (comp.lang.python)
  • Re: Iterate through two lists, performing an operation on each element
    ... > feedback as to the Lispy'ness of the function blit-3. ... > to iterate over two lists and performs an operation on each element. ... (e.g. to use specialized arrays) ... made, whereas the list implementation ...
    (comp.lang.lisp)
  • Re: "Concatenation list" data structure?
    ... > I am interested in a List implementation where an instance is based on ... > several distinct lists. ... Operations on the single concatenation list ... > should be reflected on the base lists. ...
    (comp.lang.java.programmer)
  • "Concatenation list" data structure?
    ... I am interested in a List implementation where an instance is based on ... several distinct lists. ... should be reflected on the base lists. ... Rodrigo ...
    (comp.lang.java.programmer)
  • Re: CMultiLock example
    ... Seriously, though, locking is *mandatory* if two or more threads are accessing non-scalar ... lists ever be modified while the threads are running. ... without a lock. ... You must prevent that one piece of data is modified from multiple ...
    (microsoft.public.vc.mfc)