summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectElement.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2021-01-20 19:50:42 +0800
committerkeuin <[email protected]>2021-01-20 19:50:42 +0800
commitac7e70883c18602e7fd4b525b9e6fb9ea9620a6b (patch)
tree63b2d65d2fe489ef0cc1fe6e9a87b65c0b69de84 /src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectElement.java
parent7a5297de3467b1069fdf5e4a1b2aaf510ca35663 (diff)
refactor
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectElement.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectElement.java60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectElement.java b/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectElement.java
deleted file mode 100644
index cbb886e..0000000
--- a/src/main/java/com/keuin/kbackupfabric/util/backup/incremental/ObjectElement.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.keuin.kbackupfabric.util.backup.incremental;
-
-import com.keuin.kbackupfabric.util.backup.incremental.identifier.ObjectIdentifier;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-/**
- * Representing a file in a ObjectCollection.
- * Immutable.
- */
-public class ObjectElement implements Serializable {
- private final String name;
- private final ObjectIdentifier identifier;
-
- public ObjectElement(String name, ObjectIdentifier identifier) {
- Objects.requireNonNull(name);
- Objects.requireNonNull(identifier);
- this.name = name;
- this.identifier = identifier;
- }
-
- /**
- * Get file name.
- * @return the file name.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Get file identifier, which is considered to be different between files with different contents.
- * @return the identifier.
- */
- public ObjectIdentifier getIdentifier() {
- return identifier;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- ObjectElement that = (ObjectElement) o;
- return name.equals(that.name) &&
- identifier.equals(that.identifier);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, identifier);
- }
-
- @Override
- public String toString() {
- return "ObjectElement{" +
- "name='" + name + '\'' +
- ", identifier=" + identifier +
- '}';
- }
-}