forked from graphql-java/graphql-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirective.java
More file actions
60 lines (43 loc) · 1.24 KB
/
Directive.java
File metadata and controls
60 lines (43 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package graphql.language;
import java.util.ArrayList;
import java.util.List;
public class Directive extends AbstractNode {
private String name;
private final List<Argument> arguments = new ArrayList<Argument>();
public Directive() {
}
public Directive(String name) {
this.name = name;
}
public Directive(String name, List<Argument> arguments) {
this.name = name;
this.arguments.addAll(arguments);
}
public List<Argument> getArguments() {
return arguments;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public List<Node> getChildren() {
return new ArrayList<Node>(arguments);
}
@Override
public boolean isEqualTo(Node o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Directive directive = (Directive) o;
return !(name != null ? !name.equals(directive.name) : directive.name != null);
}
@Override
public String toString() {
return "Directive{" +
"name='" + name + '\'' +
", arguments=" + arguments +
'}';
}
}