Sleuth Kit Java Bindings (JNI)  4.6
Java bindings for using The Sleuth Kit
ContentVisitor.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 
32 public interface ContentVisitor<T> {
33 
41  T visit(Directory d);
42 
50  T visit(File f);
51 
59  T visit(FileSystem fs);
60 
68  T visit(Image i);
69 
77  T visit(Pool p);
78 
86  T visit(Volume v);
87 
95  T visit(VolumeSystem vs);
96 
104  T visit(LayoutFile lf);
105 
113  T visit(VirtualDirectory vd);
114 
122  T visit(LocalDirectory ld);
123 
131  T visit(DerivedFile lf);
132 
140  T visit(LocalFile df);
141 
149  T visit(SlackFile sf);
150 
158  T visit(BlackboardArtifact ba);
159 
167  T visit(Report r);
168 
179  static abstract public class Default<T> implements ContentVisitor<T> {
180 
181  protected abstract T defaultVisit(Content c);
182 
183  @Override
184  public T visit(Directory d) {
185  return defaultVisit(d);
186  }
187 
188  @Override
189  public T visit(File f) {
190  return defaultVisit(f);
191  }
192 
193  @Override
194  public T visit(FileSystem fs) {
195  return defaultVisit(fs);
196  }
197 
198  @Override
199  public T visit(Image i) {
200  return defaultVisit(i);
201  }
202 
203  @Override
204  public T visit(Volume v) {
205  return defaultVisit(v);
206  }
207 
208  @Override
209  public T visit(Pool p) {
210  return defaultVisit(p);
211  }
212 
213  @Override
214  public T visit(VolumeSystem vs) {
215  return defaultVisit(vs);
216  }
217 
218  @Override
219  public T visit(LayoutFile lf) {
220  return defaultVisit(lf);
221  }
222 
223  @Override
224  public T visit(VirtualDirectory ld) {
225  return defaultVisit(ld);
226  }
227 
228  @Override
229  public T visit(LocalDirectory ld) {
230  return defaultVisit(ld);
231  }
232 
233  @Override
234  public T visit(DerivedFile df) {
235  return defaultVisit(df);
236  }
237 
238  @Override
239  public T visit(LocalFile lf) {
240  return defaultVisit(lf);
241  }
242 
243  @Override
244  public T visit(SlackFile sf) {
245  return defaultVisit(sf);
246  }
247 
248  @Override
249  public T visit(BlackboardArtifact ba) {
250  return defaultVisit(ba);
251  }
252 
253  @Override
254  public T visit(Report r) {
255  return defaultVisit(r);
256  }
257  }
258 }

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.