Sleuth Kit Java Bindings (JNI)  4.3
Java bindings for using The Sleuth Kit
SleuthkitItemVisitor.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011 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 
99 
108 
116  T visit(LayoutFile lf);
117 
125  T visit(VirtualDirectory ld);
126 
134  T visit(DerivedFile df);
135 
143  T visit(LocalFile lf);
144 
152  T visit(SlackFile sf);
153 
163  static abstract public class Default<T> implements SleuthkitItemVisitor<T> {
164 
165  protected abstract T defaultVisit(SleuthkitVisitableItem s);
166 
167  @Override
168  public T visit(Directory d) {
169  return defaultVisit(d);
170  }
171 
172  @Override
173  public T visit(File f) {
174  return defaultVisit(f);
175  }
176 
177  @Override
178  public T visit(FileSystem fs) {
179  return defaultVisit(fs);
180  }
181 
182  @Override
183  public T visit(Image i) {
184  return defaultVisit(i);
185  }
186 
187  @Override
188  public T visit(Volume v) {
189  return defaultVisit(v);
190  }
191 
192  @Override
193  public T visit(VolumeSystem vs) {
194  return defaultVisit(vs);
195  }
196 
197  @Override
198  public T visit(BlackboardArtifact ba) {
199  return defaultVisit(ba);
200  }
201 
202  @Override
204  return defaultVisit(tw);
205  }
206 
207  @Override
208  public T visit(LayoutFile lf) {
209  return defaultVisit(lf);
210  }
211 
212  @Override
213  public T visit(VirtualDirectory vd) {
214  return defaultVisit(vd);
215  }
216 
217  @Override
218  public T visit(DerivedFile df) {
219  return defaultVisit(df);
220  }
221 
222  @Override
223  public T visit(LocalFile lf) {
224  return defaultVisit(lf);
225  }
226 
227  @Override
228  public T visit(SlackFile sf) {
229  return defaultVisit(sf);
230  }
231  }
232 }
abstract T defaultVisit(SleuthkitVisitableItem s)

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