Enum Class DiffAlgorithm
- All Implemented Interfaces:
Serializable
,Comparable<DiffAlgorithm>
,Constable
Enumerative class that lists the available "diff" algorithms
that can be specified in
More algorithms may be added to the enumerative class as their support is added to the Server.
ItemEventListener.declareFieldDiffOrder(java.lang.String, java.util.Map<java.lang.String, com.lightstreamer.interfaces.data.DiffAlgorithm[]>)
and ItemEventListener.smartDeclareFieldDiffOrder(java.lang.Object, java.util.Map<java.lang.String, com.lightstreamer.interfaces.data.DiffAlgorithm[]>)
.
Such algorithms can be used by the Server to compute the difference
between a value and the previous one in order to send the client this
difference, for "delta delivery" purpose.
More algorithms may be added to the enumerative class as their support is added to the Server.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionComputes the difference between two values with Google's "diff-match-patch" algorithm (the result is then serialized with the custom "TLCP-diff" format).Computes the difference between two values that are valid JSON string representations in JSON Patch format. -
Method Summary
Modifier and TypeMethodDescriptionstatic DiffAlgorithm
Returns the enum constant of this class with the specified name.static DiffAlgorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
JSONPATCH
Computes the difference between two values that are valid JSON string representations in JSON Patch format.
Note that this setting is ignored for the mandatory fields for COMMAND Mode named "key" and "command". -
DIFF_MATCH_PATCH
Computes the difference between two values with Google's "diff-match-patch" algorithm (the result is then serialized with the custom "TLCP-diff" format). This algorithm applies to any strings, only provided that they don't contain UTF-16 surrogate pairs.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-