Record Class LastModification
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.common.resourcecollection.LastModification
-
Constructor Summary
ConstructorsConstructorDescriptionLastModification
(String actor, Date timestamp) Creates an instance of aLastModification
record class. -
Method Summary
Modifier and TypeMethodDescriptionactor()
Returns the value of theactor
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static Optional<LastModification>
Returns the value of thetimestamp
record component.final String
toString()
Returns a string representation of this record class.static Resource
Create a newResource
with a last modification entries in its attributes map.static boolean
Verify thatresource
has aLastModification
attribute and that the signature of that LastModification is still valid given the contents of the resource.
-
Constructor Details
-
LastModification
Creates an instance of aLastModification
record class.- Parameters:
actor
- the value for theactor
record componenttimestamp
- the value for thetimestamp
record component
-
-
Method Details
-
of
-
update
Create a newResource
with a last modification entries in its attributes map. -
verify
Verify thatresource
has aLastModification
attribute and that the signature of that LastModification is still valid given the contents of the resource.- Parameters:
resource
- theResource
to verify.- Returns:
true
ifresource
has aLastModification
attribute and its signature is valid.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
actor
Returns the value of theactor
record component.- Returns:
- the value of the
actor
record component
-
timestamp
Returns the value of thetimestamp
record component.- Returns:
- the value of the
timestamp
record component
-