SlideShare a Scribd company logo
Collections & Generics,
       une introduction

                            Par Didier Besset
                                    didier.besset@hortis.ch




  Hortis GRC SA - www.hortis.ch
Collection interface
                                                 Iterable<T>
                                             iterator()


                  Collection <T>
           add(T)
           addAll(Collection<T>)
           remove(T)
                                                                    Iterator<T>
           removeAll (Collection<T>)
                                                                 hasNext()
           retainAll (Collection<T>)
                                                                 next()
           clear()
                                                                 remove()
           contains(T)
           containsAll(Collection<T>)
           isEmpty()
           size()
           toArray()
           iterator()
                                                                                  2
                                 Hortis GRC SA - www.hortis.ch
Collections & Generics
Utilisation d’un Iterable


        Seule façon d’accéder au contenu d’une
         collection quelconque:
               for( final T item: collection) {
                        ... faire quelque chose...
              }




                                                                      3
                                      Hortis GRC SA - www.hortis.ch
Collections & Generics
Utilisation d’un Iterator

        Seule façon d’accéder et de modifier le
         contenu d’une collection quelconque:
              final Iterator<T> iter =
                                collection.iterator();
              while(iter.hasNext()) {
                         final T item = iter.next();
                         ... faire quelque chose...
                     if (... condition...) {
                             iter.remove();
                    }
              }
                                                                       4
                                       Hortis GRC SA - www.hortis.ch
Collections & Generics
Utilisation d’un Iterator dans un “for”

        Le contenu reste identique:
              for(final Iterator<T> iter =
                                collection.iterator();
                                    iter.hasNext();) {
              final T item = iter.next();
                         ... faire quelque chose...
                     if (... condition...) {
                             iter.remove();
                    }
              }

                                                                       5
                                       Hortis GRC SA - www.hortis.ch
Collections & Generics
Comparable


        Donne un ordre “naturel”:
              Interface Comparable<T> {
                         int compareTo(T o);
              }
        Exemple pour une liste:
              final List<T extends Comparable<T>>
                myList = ...
              Collections.sort(myList);



                                                                   6
                                   Hortis GRC SA - www.hortis.ch
Collections & Generics
Comparator


        Pour mettre de l’ordre dans les collections:
              Interface Comparator<T> {
                         int compare(T o1, To2);
              }
        Exemple pour une liste:
              final List<T> myList = ...
              final Comparator<T> myComparator = ...
              Collections.sort(myList, myComparator);


                                                                   7
                                   Hortis GRC SA - www.hortis.ch
Collections & Generics
Lists and Sets




        Une liste possède un ordre,
        Un Set ne contient aucun doublon.




                                                         8
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Lists and Sets


                                   Collection<T>



                       List<T>                                      Set<T>
                get(int)
                remove(int)                                       SortedSet<T>
                add(int,T)
                                                            comparator()
                set(int,T)
                                                            first()
                indexOf(T)
                                                            last()
                lastIndexOf(T)
                                                            subSet(T,T)
                subList(int,int)
                                                            headSet(T)
                                                            tailSet(T)


                                                                                 9
                                    Hortis GRC SA - www.hortis.ch
Collections & Generics
Maps


        Permet un accès indexé par n’importe quel
         object:
               “buckets” adressés par le hashCode,
               Séparation à l’intérieur d’un “bucket” à l’aide de la
                méthode equals .




                                                                   10
                                Hortis GRC SA - www.hortis.ch
Collections & Generics
Maps
                                Map<K,T>
                         put(K,T)
                         putAll(Map<K,T>)
                         remove(K)
                         get(K)
                         clear()
                         size()
                         containsKey(K)                                 SortedMap<K,T>
                         containsValue(T)
                                                                     comparator()
                         keySet()
                                                                     firstKey()
                         values()
                                                                     lastKey()
                                                                     subMap(K,K)
                                                                     headMap(K)
           Collection<T>
                                                                     tailMap(K)
            Set<K>

                                                                                         11
                                     Hortis GRC SA - www.hortis.ch
Collections & Generics
Synchronization


      Collection type Synchronized object factory
      Collection         synchronizedCollection()
      List               synchronizedList()
      Set                synchronizedSet()
      SortedSet          synchronizedSortedSet()
      Map                synchronizedMap()
      SortedMap          synchronizedSortedMap()
                                                          12
                          Hortis GRC SA - www.hortis.ch
Collections & Generics
Full collection hierachy
                                                                      Collection

                            AbstractCollection
       List
                                                                                     Set

                    AbstractList                                     AbstractSet
                              AbstractQueue
                                                                                     SortedSet

ArrayList                          Vector                  HashSet         TreeSet

  AbstractSequentialList

                                   Stack
             LinkedList

                                                                                           13
                                     Hortis GRC SA - www.hortis.ch
Collections & Generics
Full Map hierachy


                                                                             Dictionary
                                                                 Map

                         AbstractMap                                         Hashtable

                                                                 SortedMap

         HashMap                       TreeMap


                         WeakHashMap




                                                                                     14
                                        Hortis GRC SA - www.hortis.ch
Collections & Generics
Boxing and auto-boxing


        Une Collection ou une Map contient des
         objects, pas des primitives,
        Usage correct (boxing explicite) :
              Collection<Integer> measures = ...;
              measures.add(new Integer(4));
        Usage permis (boxing implicite) :
              measures.add(4);




                                                           15
                           Hortis GRC SA - www.hortis.ch
Collections & Generics
Convertions


        Arrays → Listes :
              MyClass[] myArray = ...;
              Collection<MyClass> measures =
                               Arrays.asList(myArray);
              Listes → Arrays :
              Collection<MyClass> measures = ...;
              MyClass[] myArray = measures.toArray(
                           new MyClass[measures.size()]);



                                                                  16
                                  Hortis GRC SA - www.hortis.ch
Collections & Generics
“Backed” collections


        Une “feature” dangereuse des collections
         construites sur des Map:
                         keySet()                tailset()

                         values()                tailmap()

                         headset()               subSet()

                         headmap()               subMap()




                                                                     17
                                     Hortis GRC SA - www.hortis.ch
Collections & Generics
keySet()                                 tailset()

       values()                                 tailmap()

       headset()                                subSet()

       headmap()                                subMap()




                                                            18
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Déclarations générique


        Déclaration pour le compilateur seulement,
        Le type “générique” n’a pas d’existence dans
         la machine virtuelle,
        Un type se déclare au niveau:
               de la classe,
               d’une méthode (non-static ou static);
        Il s’agit donc d’un simple “pattern-matching”



                                                                19
                                Hortis GRC SA - www.hortis.ch
Collections & Generics
Différences fondamentale


        Les arrays ont accès à l’héritage:
              Number[] measures = new Integer[4];
        Les collections pas!
              List<Number> measures =
                             new ArrayList<Integer>();
        ... parce que le type de la déclaration de la
         collection n’existe pas en dehors du
         compilateur.


                                                           20
                           Hortis GRC SA - www.hortis.ch
Collections & Generics
Comment faire?


        On utilise la notation <? extends xxx>,
        Par exemple :
              List<? extends Number> measures =
                             new ArrayList<Integer>();
        Par contre :
              Number meter = measures.get(0);
              Integer mm =       (Integer) measures.get(1);




                                                             21
                             Hortis GRC SA - www.hortis.ch
Collections & Generics
Exemple: filtre générique
      public abstract class AbstractObjectFilter<T> {

                    private final EventListenerList listenerList = new EventListenerList();

                    public void addChangeListener(ChangeListener listener) {
                               listenerList.add(ChangeListener.class, listener);
                    }

                    public void removeChangeListener(ChangeListener listener) {
                               listenerList.remove(ChangeListener.class, listener);
                    }

                    protected void fireChanged() {
                               final ChangeEvent event = new ChangeEvent(this);
                               final Object[] listeners = listenerList.getListenerList();
                               for (int i = listeners.length - 2; i >= 0; i -= 2) {
                                             if (listeners[i] == ChangeListener.class) {
                                                      ((ChangeListener) listeners[i + 1]).stateChanged(event);
                                             }
                               }
                    }

                    public abstract boolean accept(T object);
      }
                                                                                                       22
                                             Hortis GRC SA - www.hortis.ch
Collections & Generics
Exemple: utilisation filtre


    public boolean collect(List<D> adaptedObjects,
               IObjectListModel<? extends D> model) {
          final boolean added = false;
          for (final D object : model) {
                if (filter.accept(object)) {
                      adaptedObjects.add(object);
                }
          }
          return added;
    }




                                                         23
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Exemple: binding sur une sous-classe
    public class WayPointDifferentiator extends
    AbstractNamedAdaptationDataDifferentiator<WayPoint> {

                 public final static WayPointDifferentiator
                                               instance = new WayPointDifferentiator();

                 private WayPointDifferentiator() {
                           super();
                 }

                 @Override
                 public boolean equals(final WayPoint o1, final WayPoint o2) {
                           return super.equals(o1, o2) && (o1 == null ||
                                               valueEquals(o1.getArea(), o2.getArea()));
                 }

                 @Override
                 public Class<WayPoint> getObjectClass() {
                           return WayPoint.class;
                 }

                 @Override
                 protected void collectAccessors(ArrayList<String> accessorList) {
                           super.collectAccessors(accessorList);
                           accessorList.add(quot;ShortNamequot;);
                           accessorList.add(quot;Wgs84Latitudequot;);
                           accessorList.add(quot;Wgs84Longitudequot;);
                 }
    }

                                                                                           24
                                        Hortis GRC SA - www.hortis.ch
Collections & Generics
Exemple: binding sur une méthode



public abstract class AbstractAdaptationData<T>
                    implements Serializable, IVersionable<T>, Comparable<T> {

             public static <D extends Comparable<D>> int compare(final D v1, final D v2) {
                       if (v2 == null) {
                                 return v1 == null ? 0 : 1;
                       } else if (v1 == null) {
                                 return -1;
                       }
                       return v1.compareTo(v2);
             }




                                                                                        25
                                       Hortis GRC SA - www.hortis.ch
Collections & Generics
Exemple: binding sur une méthode

  public <T extends AbstractAdaptationData<T>> void loadDescriptorData(
                    final AdaptationDataManager manager,
                    final AdaptationDataRepository dataRepository,
                    final AbstractAdaptationDataDescriptor<T> _descriptor,
                    final SubtableController _subtableController,
                    final T selectedObject, final boolean activateSearchField) {
           setName(_descriptor.getName());
           final ObjectTableModel<T> tableModel =
                             _descriptor.getTableModel(manager, selectedObject);
           tableModel.setResourceBundle(manager.getResourceBundle());
           table = new JTableWithToolTips(tableModel);
           table.setName(_descriptor.getName());
           final String searchColumn = _descriptor.getSearchColumn();
           MutableDynamicTableFilter<T> dynamicTableFilter = null;
           MutableDynamicTableSorter<T> dynamicTableSorter = null;
           final DefaultColumnFilterFactory<T> filterFactory =
                                      _descriptor.getFilterFactory(manager);




                                                                           26
                                Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         27
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         28
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                   ClassCastException


                                                         29
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         30
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         31
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         32
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         33
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         34
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         35
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         36
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         37
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         38
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         39
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         40
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         41
                         Hortis GRC SA - www.hortis.ch
Collections & Generics
Questionaire




                                                         42
                         Hortis GRC SA - www.hortis.ch
Collections & Generics

More Related Content

What's hot

Running Free with the Monads
Running Free with the MonadsRunning Free with the Monads
Running Free with the Monads
kenbot
 
Jscex: Write Sexy JavaScript
Jscex: Write Sexy JavaScriptJscex: Write Sexy JavaScript
Jscex: Write Sexy JavaScriptjeffz
 
Disassembling Go
Disassembling GoDisassembling Go
Disassembling Go
Eyal Post
 
Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)jeffz
 
Scala @ TomTom
Scala @ TomTomScala @ TomTom
Scala @ TomTom
Eric Bowman
 
Coffee script
Coffee scriptCoffee script
Coffee scripttimourian
 
Emo-Exploitation
Emo-ExploitationEmo-Exploitation
Emo-Exploitationw0nd
 
Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015
Leonardo Borges
 
Eta
EtaEta
Pybelsberg — Constraint-based Programming in Python
Pybelsberg — Constraint-based Programming in PythonPybelsberg — Constraint-based Programming in Python
Pybelsberg — Constraint-based Programming in Python
Christoph Matthies
 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with Python
Han Lee
 
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
it-people
 
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012
Leonardo Borges
 
The core libraries you always wanted - Google Guava
The core libraries you always wanted - Google GuavaThe core libraries you always wanted - Google Guava
The core libraries you always wanted - Google Guava
Mite Mitreski
 
Beauty and the beast - Haskell on JVM
Beauty and the beast  - Haskell on JVMBeauty and the beast  - Haskell on JVM
Beauty and the beast - Haskell on JVM
Jarek Ratajski
 
Clips basics how to make expert system in clips | facts adding | rules makin...
Clips basics  how to make expert system in clips | facts adding | rules makin...Clips basics  how to make expert system in clips | facts adding | rules makin...
Clips basics how to make expert system in clips | facts adding | rules makin...
NaumanMalik30
 
The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)jeffz
 
Ray Tracing with ZIO
Ray Tracing with ZIORay Tracing with ZIO
Ray Tracing with ZIO
Pierangelo Cecchetto
 

What's hot (20)

Running Free with the Monads
Running Free with the MonadsRunning Free with the Monads
Running Free with the Monads
 
Jscex: Write Sexy JavaScript
Jscex: Write Sexy JavaScriptJscex: Write Sexy JavaScript
Jscex: Write Sexy JavaScript
 
Disassembling Go
Disassembling GoDisassembling Go
Disassembling Go
 
V8
V8V8
V8
 
Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)
 
Scala @ TomTom
Scala @ TomTomScala @ TomTom
Scala @ TomTom
 
Google Guava
Google GuavaGoogle Guava
Google Guava
 
Coffee script
Coffee scriptCoffee script
Coffee script
 
Emo-Exploitation
Emo-ExploitationEmo-Exploitation
Emo-Exploitation
 
Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015
 
Eta
EtaEta
Eta
 
Pybelsberg — Constraint-based Programming in Python
Pybelsberg — Constraint-based Programming in PythonPybelsberg — Constraint-based Programming in Python
Pybelsberg — Constraint-based Programming in Python
 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with Python
 
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
«Отладка в Python 3.6: Быстрее, Выше, Сильнее» Елизавета Шашкова, JetBrains
 
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012
 
The core libraries you always wanted - Google Guava
The core libraries you always wanted - Google GuavaThe core libraries you always wanted - Google Guava
The core libraries you always wanted - Google Guava
 
Beauty and the beast - Haskell on JVM
Beauty and the beast  - Haskell on JVMBeauty and the beast  - Haskell on JVM
Beauty and the beast - Haskell on JVM
 
Clips basics how to make expert system in clips | facts adding | rules makin...
Clips basics  how to make expert system in clips | facts adding | rules makin...Clips basics  how to make expert system in clips | facts adding | rules makin...
Clips basics how to make expert system in clips | facts adding | rules makin...
 
The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)
 
Ray Tracing with ZIO
Ray Tracing with ZIORay Tracing with ZIO
Ray Tracing with ZIO
 

Similar to Collections&Generics

Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupJava 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Henri Tremblay
 
Generics and Lambdas cocktail explained - Montreal JUG
Generics and Lambdas cocktail explained  - Montreal JUGGenerics and Lambdas cocktail explained  - Montreal JUG
Generics and Lambdas cocktail explained - Montreal JUG
Henri Tremblay
 
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docxlab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
DIPESH30
 
Linq Sanjay Vyas
Linq   Sanjay VyasLinq   Sanjay Vyas
Linq Sanjay Vyasrsnarayanan
 
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUGLambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
Henri Tremblay
 
STL ALGORITHMS
STL ALGORITHMSSTL ALGORITHMS
STL ALGORITHMS
fawzmasood
 
The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88
Mahmoud Samir Fayed
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
Databricks
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
Databricks
 
Real World Haskell: Lecture 7
Real World Haskell: Lecture 7Real World Haskell: Lecture 7
Real World Haskell: Lecture 7Bryan O'Sullivan
 
Library functions in c++
Library functions in c++Library functions in c++
Library functions in c++
Neeru Mittal
 
C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0
Yaser Zhian
 
Computer notes - Hashing
Computer notes - HashingComputer notes - Hashing
Computer notes - Hashing
ecomputernotes
 
EMFPath
EMFPathEMFPath
EMFPath
mikaelbarbero
 
Erlang Introduction Bcberlin3
Erlang Introduction Bcberlin3Erlang Introduction Bcberlin3
Erlang Introduction Bcberlin3guesta3202
 
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docxlab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
DIPESH30
 
Collections Framework Beginners Guide 2
Collections Framework Beginners Guide 2Collections Framework Beginners Guide 2
Collections Framework Beginners Guide 2
Kenji HASUNUMA
 
Collections Framework Begineers guide 2
Collections Framework Begineers guide 2Collections Framework Begineers guide 2
Collections Framework Begineers guide 2
Kenji HASUNUMA
 
computer notes - Data Structures - 35
computer notes - Data Structures - 35computer notes - Data Structures - 35
computer notes - Data Structures - 35ecomputernotes
 

Similar to Collections&Generics (20)

Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupJava 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
 
Generics and Lambdas cocktail explained - Montreal JUG
Generics and Lambdas cocktail explained  - Montreal JUGGenerics and Lambdas cocktail explained  - Montreal JUG
Generics and Lambdas cocktail explained - Montreal JUG
 
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docxlab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
lab08build.bat@echo offclsset DRIVE_LETTER=1s.docx
 
Linq Sanjay Vyas
Linq   Sanjay VyasLinq   Sanjay Vyas
Linq Sanjay Vyas
 
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUGLambdas and Generics (long version) - Bordeaux/Toulouse JUG
Lambdas and Generics (long version) - Bordeaux/Toulouse JUG
 
STL ALGORITHMS
STL ALGORITHMSSTL ALGORITHMS
STL ALGORITHMS
 
The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88
 
Scala 2 + 2 > 4
Scala 2 + 2 > 4Scala 2 + 2 > 4
Scala 2 + 2 > 4
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
Real World Haskell: Lecture 7
Real World Haskell: Lecture 7Real World Haskell: Lecture 7
Real World Haskell: Lecture 7
 
Library functions in c++
Library functions in c++Library functions in c++
Library functions in c++
 
C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0
 
Computer notes - Hashing
Computer notes - HashingComputer notes - Hashing
Computer notes - Hashing
 
EMFPath
EMFPathEMFPath
EMFPath
 
Erlang Introduction Bcberlin3
Erlang Introduction Bcberlin3Erlang Introduction Bcberlin3
Erlang Introduction Bcberlin3
 
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docxlab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
lab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
 
Collections Framework Beginners Guide 2
Collections Framework Beginners Guide 2Collections Framework Beginners Guide 2
Collections Framework Beginners Guide 2
 
Collections Framework Begineers guide 2
Collections Framework Begineers guide 2Collections Framework Begineers guide 2
Collections Framework Begineers guide 2
 
computer notes - Data Structures - 35
computer notes - Data Structures - 35computer notes - Data Structures - 35
computer notes - Data Structures - 35
 

More from hortis

Mardi gras du 2 juin 2010 : CSIM2
Mardi gras du 2 juin 2010 : CSIM2Mardi gras du 2 juin 2010 : CSIM2
Mardi gras du 2 juin 2010 : CSIM2
hortis
 
Presentation Adi 14052009
Presentation Adi 14052009Presentation Adi 14052009
Presentation Adi 14052009
hortis
 
eXtreme Programming, une introduction
eXtreme Programming, une introductioneXtreme Programming, une introduction
eXtreme Programming, une introduction
hortis
 
Témoignage Agilité Ari 21/11/08
Témoignage Agilité Ari 21/11/08Témoignage Agilité Ari 21/11/08
Témoignage Agilité Ari 21/11/08
hortis
 
Retour Experience Pair Programming XPDay Genève 2009
Retour Experience Pair Programming XPDay Genève 2009Retour Experience Pair Programming XPDay Genève 2009
Retour Experience Pair Programming XPDay Genève 2009
hortis
 
Mardi Gras 'Integration Continue'
Mardi Gras 'Integration Continue'Mardi Gras 'Integration Continue'
Mardi Gras 'Integration Continue'
hortis
 

More from hortis (6)

Mardi gras du 2 juin 2010 : CSIM2
Mardi gras du 2 juin 2010 : CSIM2Mardi gras du 2 juin 2010 : CSIM2
Mardi gras du 2 juin 2010 : CSIM2
 
Presentation Adi 14052009
Presentation Adi 14052009Presentation Adi 14052009
Presentation Adi 14052009
 
eXtreme Programming, une introduction
eXtreme Programming, une introductioneXtreme Programming, une introduction
eXtreme Programming, une introduction
 
Témoignage Agilité Ari 21/11/08
Témoignage Agilité Ari 21/11/08Témoignage Agilité Ari 21/11/08
Témoignage Agilité Ari 21/11/08
 
Retour Experience Pair Programming XPDay Genève 2009
Retour Experience Pair Programming XPDay Genève 2009Retour Experience Pair Programming XPDay Genève 2009
Retour Experience Pair Programming XPDay Genève 2009
 
Mardi Gras 'Integration Continue'
Mardi Gras 'Integration Continue'Mardi Gras 'Integration Continue'
Mardi Gras 'Integration Continue'
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

Collections&Generics

  • 1. Collections & Generics, une introduction Par Didier Besset didier.besset@hortis.ch Hortis GRC SA - www.hortis.ch
  • 2. Collection interface Iterable<T> iterator() Collection <T> add(T) addAll(Collection<T>) remove(T) Iterator<T> removeAll (Collection<T>) hasNext() retainAll (Collection<T>) next() clear() remove() contains(T) containsAll(Collection<T>) isEmpty() size() toArray() iterator() 2 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 3. Utilisation d’un Iterable  Seule façon d’accéder au contenu d’une collection quelconque:  for( final T item: collection) {  ... faire quelque chose... } 3 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 4. Utilisation d’un Iterator  Seule façon d’accéder et de modifier le contenu d’une collection quelconque: final Iterator<T> iter = collection.iterator(); while(iter.hasNext()) { final T item = iter.next(); ... faire quelque chose... if (... condition...) { iter.remove(); } } 4 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 5. Utilisation d’un Iterator dans un “for”  Le contenu reste identique: for(final Iterator<T> iter = collection.iterator(); iter.hasNext();) { final T item = iter.next(); ... faire quelque chose... if (... condition...) { iter.remove(); } } 5 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 6. Comparable  Donne un ordre “naturel”: Interface Comparable<T> { int compareTo(T o); }  Exemple pour une liste: final List<T extends Comparable<T>> myList = ... Collections.sort(myList); 6 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 7. Comparator  Pour mettre de l’ordre dans les collections: Interface Comparator<T> { int compare(T o1, To2); }  Exemple pour une liste: final List<T> myList = ... final Comparator<T> myComparator = ... Collections.sort(myList, myComparator); 7 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 8. Lists and Sets  Une liste possède un ordre,  Un Set ne contient aucun doublon. 8 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 9. Lists and Sets Collection<T> List<T> Set<T> get(int) remove(int) SortedSet<T> add(int,T) comparator() set(int,T) first() indexOf(T) last() lastIndexOf(T) subSet(T,T) subList(int,int) headSet(T) tailSet(T) 9 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 10. Maps  Permet un accès indexé par n’importe quel object:  “buckets” adressés par le hashCode,  Séparation à l’intérieur d’un “bucket” à l’aide de la méthode equals . 10 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 11. Maps Map<K,T> put(K,T) putAll(Map<K,T>) remove(K) get(K) clear() size() containsKey(K) SortedMap<K,T> containsValue(T) comparator() keySet() firstKey() values() lastKey() subMap(K,K) headMap(K) Collection<T> tailMap(K) Set<K> 11 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 12. Synchronization Collection type Synchronized object factory Collection synchronizedCollection() List synchronizedList() Set synchronizedSet() SortedSet synchronizedSortedSet() Map synchronizedMap() SortedMap synchronizedSortedMap() 12 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 13. Full collection hierachy Collection AbstractCollection List Set AbstractList AbstractSet AbstractQueue SortedSet ArrayList Vector HashSet TreeSet AbstractSequentialList Stack LinkedList 13 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 14. Full Map hierachy Dictionary Map AbstractMap Hashtable SortedMap HashMap TreeMap WeakHashMap 14 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 15. Boxing and auto-boxing  Une Collection ou une Map contient des objects, pas des primitives,  Usage correct (boxing explicite) : Collection<Integer> measures = ...; measures.add(new Integer(4));  Usage permis (boxing implicite) : measures.add(4); 15 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 16. Convertions  Arrays → Listes : MyClass[] myArray = ...; Collection<MyClass> measures = Arrays.asList(myArray); Listes → Arrays : Collection<MyClass> measures = ...; MyClass[] myArray = measures.toArray( new MyClass[measures.size()]); 16 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 17. “Backed” collections  Une “feature” dangereuse des collections construites sur des Map: keySet() tailset() values() tailmap() headset() subSet() headmap() subMap() 17 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 18. keySet() tailset() values() tailmap() headset() subSet() headmap() subMap() 18 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 19. Déclarations générique  Déclaration pour le compilateur seulement,  Le type “générique” n’a pas d’existence dans la machine virtuelle,  Un type se déclare au niveau:  de la classe,  d’une méthode (non-static ou static);  Il s’agit donc d’un simple “pattern-matching” 19 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 20. Différences fondamentale  Les arrays ont accès à l’héritage: Number[] measures = new Integer[4];  Les collections pas! List<Number> measures = new ArrayList<Integer>();  ... parce que le type de la déclaration de la collection n’existe pas en dehors du compilateur. 20 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 21. Comment faire?  On utilise la notation <? extends xxx>,  Par exemple : List<? extends Number> measures = new ArrayList<Integer>();  Par contre : Number meter = measures.get(0); Integer mm = (Integer) measures.get(1); 21 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 22. Exemple: filtre générique public abstract class AbstractObjectFilter<T> { private final EventListenerList listenerList = new EventListenerList(); public void addChangeListener(ChangeListener listener) { listenerList.add(ChangeListener.class, listener); } public void removeChangeListener(ChangeListener listener) { listenerList.remove(ChangeListener.class, listener); } protected void fireChanged() { final ChangeEvent event = new ChangeEvent(this); final Object[] listeners = listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ChangeListener.class) { ((ChangeListener) listeners[i + 1]).stateChanged(event); } } } public abstract boolean accept(T object); } 22 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 23. Exemple: utilisation filtre public boolean collect(List<D> adaptedObjects, IObjectListModel<? extends D> model) { final boolean added = false; for (final D object : model) { if (filter.accept(object)) { adaptedObjects.add(object); } } return added; } 23 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 24. Exemple: binding sur une sous-classe public class WayPointDifferentiator extends AbstractNamedAdaptationDataDifferentiator<WayPoint> { public final static WayPointDifferentiator instance = new WayPointDifferentiator(); private WayPointDifferentiator() { super(); } @Override public boolean equals(final WayPoint o1, final WayPoint o2) { return super.equals(o1, o2) && (o1 == null || valueEquals(o1.getArea(), o2.getArea())); } @Override public Class<WayPoint> getObjectClass() { return WayPoint.class; } @Override protected void collectAccessors(ArrayList<String> accessorList) { super.collectAccessors(accessorList); accessorList.add(quot;ShortNamequot;); accessorList.add(quot;Wgs84Latitudequot;); accessorList.add(quot;Wgs84Longitudequot;); } } 24 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 25. Exemple: binding sur une méthode public abstract class AbstractAdaptationData<T> implements Serializable, IVersionable<T>, Comparable<T> { public static <D extends Comparable<D>> int compare(final D v1, final D v2) { if (v2 == null) { return v1 == null ? 0 : 1; } else if (v1 == null) { return -1; } return v1.compareTo(v2); } 25 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 26. Exemple: binding sur une méthode public <T extends AbstractAdaptationData<T>> void loadDescriptorData( final AdaptationDataManager manager, final AdaptationDataRepository dataRepository, final AbstractAdaptationDataDescriptor<T> _descriptor, final SubtableController _subtableController, final T selectedObject, final boolean activateSearchField) { setName(_descriptor.getName()); final ObjectTableModel<T> tableModel = _descriptor.getTableModel(manager, selectedObject); tableModel.setResourceBundle(manager.getResourceBundle()); table = new JTableWithToolTips(tableModel); table.setName(_descriptor.getName()); final String searchColumn = _descriptor.getSearchColumn(); MutableDynamicTableFilter<T> dynamicTableFilter = null; MutableDynamicTableSorter<T> dynamicTableSorter = null; final DefaultColumnFilterFactory<T> filterFactory = _descriptor.getFilterFactory(manager); 26 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 27. Questionaire 27 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 28. Questionaire 28 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 29. Questionaire ClassCastException 29 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 30. Questionaire 30 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 31. Questionaire 31 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 32. Questionaire 32 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 33. Questionaire 33 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 34. Questionaire 34 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 35. Questionaire 35 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 36. Questionaire 36 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 37. Questionaire 37 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 38. Questionaire 38 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 39. Questionaire 39 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 40. Questionaire 40 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 41. Questionaire 41 Hortis GRC SA - www.hortis.ch Collections & Generics
  • 42. Questionaire 42 Hortis GRC SA - www.hortis.ch Collections & Generics