Move Fetched class to top-level
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Fetched.java
1 package net.pterodactylus.sone.core;
2
3 import freenet.client.FetchResult;
4 import freenet.keys.FreenetURI;
5
6 /**
7  * Container for a fetched URI and the {@link FetchResult}.
8  *
9  * @author <a href="mailto:d.roden@xplosion.de">David Roden</a>
10  */
11 public class Fetched {
12
13         /** The fetched URI. */
14         private final FreenetURI freenetUri;
15
16         /** The fetch result. */
17         private final FetchResult fetchResult;
18
19         /**
20          * Creates a new fetched URI.
21          *
22          * @param freenetUri
23          *            The URI that was fetched
24          * @param fetchResult
25          *            The fetch result
26          */
27         public Fetched(FreenetURI freenetUri, FetchResult fetchResult) {
28                 this.freenetUri = freenetUri;
29                 this.fetchResult = fetchResult;
30         }
31
32         //
33         // ACCESSORS
34         //
35
36         /**
37          * Returns the fetched URI.
38          *
39          * @return The fetched URI
40          */
41         public FreenetURI getFreenetUri() {
42                 return freenetUri;
43         }
44
45         /**
46          * Returns the fetch result.
47          *
48          * @return The fetch result
49          */
50         public FetchResult getFetchResult() {
51                 return fetchResult;
52         }
53
54 }