Class MaterialProduct
java.lang.Object
com.kazurayam.materialstore.base.reduce.zipper.MaterialProduct
- All Implemented Interfaces:
Identifiable
,Jsonifiable
,TemplateReady
,Comparable<MaterialProduct>
public final class MaterialProduct
extends Object
implements Comparable<MaterialProduct>, TemplateReady, Identifiable
"Material x Material" = "Materials Product"
is used to carry data of a pair of "Material" objects, plus the "diff" of the two.
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionannotate
(IgnoreMetadataKeys ignoreMetadataKeys, IdentifyMetadataValues identifyMetadataValues) static MaterialProduct
clone
(MaterialProduct source) int
compareTo
(MaterialProduct other) boolean
int
containsMaterialAt
(Material material) boolean
getDiff()
getID()
getLeft()
getQueryIdentification
(SortKeys sortKeys) getRight()
int
hashCode()
return true if either of the left Material or the right Material is Material.NULL_OBJECT object.void
void
setDiffRatio
(Double diffRatio) toJson()
toJson
(boolean prettyPrint) toString()
toVariableJson
(SortKeys sortKeys) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.kazurayam.materialstore.core.TemplateReady
toTemplateModel, toTemplateModelAsJson, toTemplateModelAsJson
-
Field Details
-
NULL_OBJECT
-
-
Method Details
-
annotate
public MaterialProduct annotate(IgnoreMetadataKeys ignoreMetadataKeys, IdentifyMetadataValues identifyMetadataValues) -
setDiff
-
setDiffRatio
-
getLeft
-
getFileTypeExtension
-
getFileTypeDiffability
-
getRight
-
getDiff
-
getDiffRatio
-
isBachelor
return true if either of the left Material or the right Material is Material.NULL_OBJECT object. In other words, return true if this MaterialProduct object has single Material object contained; return false if both of the left and right is stuffed Material.- Returns:
- true if either of the left Material or the right Material is NULL object
-
getReducedTimestamp
-
getQueryOnMetadata
-
getQueryIdentification
-
getQueryIdentification
-
getID
- Specified by:
getID
in interfaceIdentifiable
-
getJobName
-
getShortID
- Specified by:
getShortID
in interfaceIdentifiable
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<MaterialProduct>
-
contains
-
containsMaterialAt
-
clone
-
toJson
- Specified by:
toJson
in interfaceJsonifiable
-
toJson
- Specified by:
toJson
in interfaceJsonifiable
-
toVariableJson
-