public class ExtraMaterialsDescription
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ExtraMaterialsDescription.ConflictResolution
Used to resolve conflicts when merging the additional material
description to the core material description.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
extra
Supplemental material descriptions which are unmodifiable.
|
static ExtraMaterialsDescription |
NONE |
private ExtraMaterialsDescription.ConflictResolution |
resolve
Resolution behavior when there are overlapping entries.
|
Constructor and Description |
---|
ExtraMaterialsDescription(java.util.Map<java.lang.String,java.lang.String> matdesc) |
ExtraMaterialsDescription(java.util.Map<java.lang.String,java.lang.String> matdesc,
ExtraMaterialsDescription.ConflictResolution resolve) |
Modifier and Type | Method and Description |
---|---|
ExtraMaterialsDescription.ConflictResolution |
getConflictResolution()
Returns the conflict resolution strategy; neve null.
|
java.util.Map<java.lang.String,java.lang.String> |
getMaterialDescription()
Returns the extra material description; never null.
|
java.util.Map<java.lang.String,java.lang.String> |
mergeInto(java.util.Map<java.lang.String,java.lang.String> core)
Combine this supplemental material descriptions with those specified in
the "core" parameter.
|
public static final ExtraMaterialsDescription NONE
private final java.util.Map<java.lang.String,java.lang.String> extra
private final ExtraMaterialsDescription.ConflictResolution resolve
ExtraMaterialsDescription.ConflictResolution.FAIL_FAST
.public ExtraMaterialsDescription(java.util.Map<java.lang.String,java.lang.String> matdesc)
public ExtraMaterialsDescription(java.util.Map<java.lang.String,java.lang.String> matdesc, ExtraMaterialsDescription.ConflictResolution resolve)
public java.util.Map<java.lang.String,java.lang.String> getMaterialDescription()
public ExtraMaterialsDescription.ConflictResolution getConflictResolution()
public java.util.Map<java.lang.String,java.lang.String> mergeInto(java.util.Map<java.lang.String,java.lang.String> core)
core
- the core material descriptions to be supplemented;
assumed to be unmodifiable.java.lang.IllegalArgumentException
- if this supplemental material descriptions contains
conflicting entriesjava.lang.UnsupportedOperationException
- if the conflict resolution strategy is not supported