Sleuth Kit Java Bindings (JNI)  4.6
Java bindings for using The Sleuth Kit
SleuthkitItemVisitor.java
Go to the documentation of this file.
1 /*
2  * Sleuth Kit Data Model
3  *
4  * Copyright 2011-2018 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.datamodel;
20 
35 public interface SleuthkitItemVisitor<T> {
36 
44  T visit(Directory d);
45 
53  T visit(File f);
54 
62  T visit(FileSystem fs);
63 
71  T visit(Image i);
72 
80  T visit(Volume v);
81 
89  T visit(VolumeSystem vs);
90 
98  T visit(Pool pool);
99 
108 
117 
125  T visit(LayoutFile lf);
126 
134  T visit(VirtualDirectory ld);
135 
143  T visit(LocalDirectory ld);
144 
152  T visit(DerivedFile df);
153 
161  T visit(LocalFile lf);
162 
170  T visit(SlackFile sf);
171 
179  T visit(Report report);
180 
190  static abstract public class Default<T> implements SleuthkitItemVisitor<T> {
191 
192  protected abstract T defaultVisit(SleuthkitVisitableItem s);
193 
194  @Override
195  public T visit(Directory d) {
196  return defaultVisit(d);
197  }
198 
199  @Override
200  public T visit(File f) {
201  return defaultVisit(f);
202  }
203 
204  @Override
205  public T visit(FileSystem fs) {
206  return defaultVisit(fs);
207  }
208 
209  @Override
210  public T visit(Image i) {
211  return defaultVisit(i);
212  }
213 
214  @Override
215  public T visit(Volume v) {
216  return defaultVisit(v);
217  }
218 
219  @Override
220  public T visit(VolumeSystem vs) {
221  return defaultVisit(vs);
222  }
223 
224  @Override
225  public T visit(Pool p) {
226  return defaultVisit(p);
227  }
228 
229  @Override
230  public T visit(BlackboardArtifact ba) {
231  return defaultVisit(ba);
232  }
233 
234  @Override
236  return defaultVisit(tw);
237  }
238 
239  @Override
240  public T visit(LayoutFile lf) {
241  return defaultVisit(lf);
242  }
243 
244  @Override
245  public T visit(VirtualDirectory vd) {
246  return defaultVisit(vd);
247  }
248 
249  @Override
250  public T visit(LocalDirectory ld) {
251  return defaultVisit(ld);
252  }
253 
254  @Override
255  public T visit(DerivedFile df) {
256  return defaultVisit(df);
257  }
258 
259  @Override
260  public T visit(LocalFile lf) {
261  return defaultVisit(lf);
262  }
263 
264  @Override
265  public T visit(SlackFile sf) {
266  return defaultVisit(sf);
267  }
268 
269  @Override
270  public T visit(Report report) {
271  return defaultVisit(report);
272  }
273  }
274 }
abstract T defaultVisit(SleuthkitVisitableItem s)

Copyright © 2011-2018 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.