1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.finder;
18
19 import java.io.File;
20 import java.util.EventObject;
21
22
23
24
25
26
27
28
29
30 public class FindEvent extends EventObject {
31
32 private File directory;
33 private Finder finder;
34 private File file;
35 private File[] files;
36 private String type;
37
38 public FindEvent(Finder finder, String type, File directory) {
39 super(directory);
40 this.finder = finder;
41 this.directory = directory;
42 this.type = type;
43 }
44
45 public FindEvent(Finder finder, String type, File directory, File file) {
46 super(file);
47 this.finder = finder;
48 this.directory = directory;
49 this.file = file;
50 this.type = type;
51 }
52
53 public FindEvent(Finder finder, String type, File directory, File[] files) {
54 super(files);
55 this.finder = finder;
56 this.directory = directory;
57 this.files = files;
58 this.type = type;
59 }
60
61 public File getDirectory() {
62 return this.directory;
63 }
64
65 public Finder getFinder() {
66 return this.finder;
67 }
68
69
70
71
72 public File getFile() {
73 return this.file;
74 }
75
76
77
78
79 public File[] getFiles() {
80 return this.files;
81 }
82
83 public String getType() {
84 return this.type;
85 }
86
87 public String toString() {
88 String str = "FindEvent - "+this.type+"; dir="+this.directory+", file="+this.file;
89 if(this.files != null) {
90 str += ", files="+java.util.Arrays.asList(this.files);
91 }
92 return str;
93 }
94
95 }