Sleuth Kit Java Bindings (JNI)  4.3
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 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(Volume v);
78 
86  T visit(VolumeSystem vs);
87 
95  T visit(LayoutFile lf);
96 
104  T visit(VirtualDirectory ld);
105 
113  T visit(DerivedFile lf);
114 
122  T visit(LocalFile df);
123 
131  T visit(SlackFile sf);
132 
143  static abstract public class Default<T> implements ContentVisitor<T> {
144 
145  protected abstract T defaultVisit(Content c);
146 
147  @Override
148  public T visit(Directory d) {
149  return defaultVisit(d);
150  }
151 
152  @Override
153  public T visit(File f) {
154  return defaultVisit(f);
155  }
156 
157  @Override
158  public T visit(FileSystem fs) {
159  return defaultVisit(fs);
160  }
161 
162  @Override
163  public T visit(Image i) {
164  return defaultVisit(i);
165  }
166 
167  @Override
168  public T visit(Volume v) {
169  return defaultVisit(v);
170  }
171 
172  @Override
173  public T visit(VolumeSystem vs) {
174  return defaultVisit(vs);
175  }
176 
177  @Override
178  public T visit(LayoutFile lf) {
179  return defaultVisit(lf);
180  }
181 
182  @Override
183  public T visit(VirtualDirectory ld) {
184  return defaultVisit(ld);
185  }
186 
187  @Override
188  public T visit(DerivedFile df) {
189  return defaultVisit(df);
190  }
191 
192  @Override
193  public T visit(LocalFile lf) {
194  return defaultVisit(lf);
195  }
196 
197  @Override
198  public T visit(SlackFile sf) {
199  return defaultVisit(sf);
200  }
201  }
202 }

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.