Project

General

Profile

Download (850 Bytes) Statistics
| Branch: | Tag: | Revision:
1 1104b973 Katja Luther
/**
2
* Copyright (C) 2018 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.remote.editor;
10
11
import java.util.ArrayList;
12
import java.util.HashSet;
13
import java.util.Iterator;
14
import java.util.Set;
15
16
import eu.etaxonomy.cdm.model.location.Point;
17
18
/**
19
 * @author k.luther
20
 * @since 28.06.2018
21
 *
22
 */
23
public class PointList extends ArrayList<Point> {
24
    private static final long serialVersionUID = 1L;
25
26
    public Set<Point> asSet() {
27
        HashSet<Point> tmpSet = new HashSet<>(this.size());
28
29
        Iterator<Point> e = iterator();
30
        while (e.hasNext()) {
31
            tmpSet.add(e.next());
32
        }
33
        return tmpSet;
34
    }
35
36
37
}