Sleuth Kit Java Bindings (JNI)  4.2
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 
40  T visit(Directory d);
41 
48  T visit(File f);
49 
56  T visit(FileSystem fs);
57 
64  T visit(Image i);
65 
72  T visit(Volume v);
73 
80  T visit(VolumeSystem vs);
81 
88  T visit(LayoutFile lf);
89 
96  T visit(VirtualDirectory ld);
97 
104  T visit(DerivedFile lf);
105 
112  T visit(LocalFile df);
113 
124  static abstract public class Default<T> implements ContentVisitor<T> {
125 
126  protected abstract T defaultVisit(Content c);
127 
128  @Override
129  public T visit(Directory d) {
130  return defaultVisit(d);
131  }
132 
133  @Override
134  public T visit(File f) {
135  return defaultVisit(f);
136  }
137 
138  @Override
139  public T visit(FileSystem fs) {
140  return defaultVisit(fs);
141  }
142 
143  @Override
144  public T visit(Image i) {
145  return defaultVisit(i);
146  }
147 
148  @Override
149  public T visit(Volume v) {
150  return defaultVisit(v);
151  }
152 
153  @Override
154  public T visit(VolumeSystem vs) {
155  return defaultVisit(vs);
156  }
157 
158  @Override
159  public T visit(LayoutFile lf) {
160  return defaultVisit(lf);
161  }
162 
163  @Override
164  public T visit(VirtualDirectory ld) {
165  return defaultVisit(ld);
166  }
167 
168  @Override
169  public T visit(DerivedFile df) {
170  return defaultVisit(df);
171  }
172 
173  @Override
174  public T visit(LocalFile lf) {
175  return defaultVisit(lf);
176  }
177  }
178 }

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.