Record Class ConfigEntry
java.lang.Object
java.lang.Record
me.rochblondiaux.gameanalytics.model.config.ConfigEntry
-
Constructor Summary
ConstructorsConstructorDescriptionConfigEntry(String key, String value, long startTimestamp, @Nullable Long endTimestamp) Creates an instance of aConfigEntryrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable LongReturns the value of theendTimestamprecord component.final booleanIndicates whether some other object is "equal to" this one.booleanhasExpired(long currentTimestamp) final inthashCode()Returns a hash code value for this object.booleanisActive(long currentTimestamp) key()Returns the value of thekeyrecord component.longReturns the value of thestartTimestamprecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
ConfigEntry
public ConfigEntry(String key, String value, long startTimestamp, @Nullable @Nullable Long endTimestamp) Creates an instance of aConfigEntryrecord class.- Parameters:
key- the value for thekeyrecord componentvalue- the value for thevaluerecord componentstartTimestamp- the value for thestartTimestamprecord componentendTimestamp- the value for theendTimestamprecord component
-
-
Method Details
-
hasExpired
public boolean hasExpired(long currentTimestamp) -
isActive
public boolean isActive(long currentTimestamp) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
startTimestamp
@SerializedName("start_ts") public long startTimestamp()Returns the value of thestartTimestamprecord component.- Returns:
- the value of the
startTimestamprecord component
-
endTimestamp
Returns the value of theendTimestamprecord component.- Returns:
- the value of the
endTimestamprecord component
-