public class CogDelta extends java.lang.Object implements Coggable, Immutable
CogDeltas are composed of individual CogNodeDelta operations. These describe the steps needed to reconstruct the second cog from the first.
Currently, CogDeltas only work for simple, single-level Cogs - Namings, really. It ignores order and ignores case of values.
Copyright 2010 Partner Software, Inc.
| Constructor and Description |
|---|
CogDelta() |
CogDelta(Cog state)
This is the constructor to support the Coggable interface.
|
CogDelta(Cog a,
Cog b)
This constructor computes the delta between the first and second Cogs.
|
CogDelta(java.util.List<CogNodeDelta> nodeDeltas) |
| Modifier and Type | Method and Description |
|---|---|
Cog |
appliedTo(Cog original)
Returns a new Cog created by applying this delta to the original.
|
java.util.List<CogNodeDelta> |
getNodeDeltas()
Read-only access to the node deltas.
|
boolean |
isIdentity()
Returns true if this delta contains no changes - and, therefore, applying it returns a matching copy of the input Cog.
|
java.util.List<CogNodeDelta> |
listNodeDeltas()
Returns a fresh copy of the node deltas.
|
Cog |
toCog()
Returns the complete internal state of this object in the form of a
Cog. |
java.lang.String |
toString() |
public CogDelta()
public CogDelta(java.util.List<CogNodeDelta> nodeDeltas)
public CogDelta(Cog state)
public Cog appliedTo(Cog original)
public Cog toCog()
CoggableCog.public java.util.List<CogNodeDelta> getNodeDeltas()
public java.util.List<CogNodeDelta> listNodeDeltas()
public boolean isIdentity()
public java.lang.String toString()
toString in class java.lang.Object