public class RecordmMsg.Field extends Object
It is used only for writing boolean conditions on the changes.
Can only be constructed by using the RecordmMsg.field(String) method on the RecordmMsg.
| Modifier and Type | Method and Description |
|---|---|
boolean |
changed()
True if this is an update message and there was a change on a field with the specified name.
|
boolean |
changed(BiPredicate<String,String> predicate)
True if this is an update message and there was a change on a field that matches the predicate.
|
boolean |
changed(String from,
String to)
True if this is an update message and there was a change on a field
from the "from" value to the "to" value.
|
boolean |
changedFrom(List<String> froms)
True if this is an update message and there was a change on a field
from one of the "from" values.
|
boolean |
changedFrom(String from)
True if this is an update message and there was a change on a field
from the "from" value.
|
boolean |
changedTo(List<String> tos)
True if this is an update message and there was a change on a field
to one of the "to" values.
|
boolean |
changedTo(String to)
True if this is an update message and there was a change on a field
to the "to" value.
|
public boolean changed()
public boolean changed(BiPredicate<String,String> predicate)
predicate - a BiPredicate that receives both the old and new values
and should return true if they match the desired condition.public boolean changed(String from, String to)
from - the desired previous valueto - the desired updated valuepublic boolean changedFrom(List<String> froms)
froms - the desired previous valuespublic boolean changedFrom(String from)
from - the desired previous valuepublic boolean changedTo(List<String> tos)
tos - the desired updated valuespublic boolean changedTo(String to)
to - the desired updated valueCopyright © 2021 Cult Of Bits, lda