1
|
/**
|
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.taxeditor.preference.wizard;
|
10
|
|
11
|
import java.util.Set;
|
12
|
|
13
|
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
14
|
|
15
|
/**
|
16
|
* @author k.luther
|
17
|
* @since 04.10.2018
|
18
|
*
|
19
|
*/
|
20
|
public class NamedAreaWrapper {
|
21
|
|
22
|
boolean isBaseElement;
|
23
|
DefinedTermBase namedArea;
|
24
|
Set<NamedAreaWrapper> children;
|
25
|
Object parent;
|
26
|
|
27
|
public NamedAreaWrapper(DefinedTermBase namedArea, boolean isBaseElement, Object parent){
|
28
|
this.isBaseElement = isBaseElement;
|
29
|
this.namedArea = namedArea;
|
30
|
this.parent = parent;
|
31
|
|
32
|
}
|
33
|
|
34
|
/**
|
35
|
* @return
|
36
|
*/
|
37
|
public DefinedTermBase getNamedArea() {
|
38
|
return namedArea;
|
39
|
}
|
40
|
|
41
|
public Set<NamedAreaWrapper> getChildren(){
|
42
|
return children;
|
43
|
}
|
44
|
@Override
|
45
|
public boolean equals(Object wrapper){
|
46
|
if (!(wrapper instanceof NamedAreaWrapper)){
|
47
|
return false;
|
48
|
}
|
49
|
return (this.namedArea == ((NamedAreaWrapper)wrapper).namedArea && this.isBaseElement == ((NamedAreaWrapper)wrapper).isBaseElement);
|
50
|
}
|
51
|
|
52
|
}
|