1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package dev.aherscu.qa.s3.publisher.maven.plugin.config;
18
19 import java.util.*;
20
21 public class ManagedFile {
22
23 private final String fileName;
24 private final Metadata metadata;
25
26 public ManagedFile(final String fileName, final Metadata metadata) {
27 this.fileName = fileName;
28 this.metadata = metadata;
29 }
30
31 @Override
32 public boolean equals(final Object o) {
33 if (o == this)
34 return true;
35 if (!(o instanceof ManagedFile))
36 return false;
37 final ManagedFile managedFile = (ManagedFile) o;
38 return Objects.equals(fileName, managedFile.fileName)
39 && Objects.equals(metadata, managedFile.metadata);
40 }
41
42 public String getFilename() {
43 return fileName;
44 }
45
46 public Metadata getMetadata() {
47 return metadata;
48 }
49
50 @Override
51 public int hashCode() {
52 final int prime = 31;
53 int result = 1;
54 result =
55 prime * result + (fileName == null ? 0 : fileName.hashCode());
56 return result;
57 }
58
59 @Override
60 public String toString() {
61 return "managedFile ["
62 + " fileName=" + fileName
63 + " metadata=" + metadata
64 + " ]";
65 }
66 }