SexualActivityRecord


public final class SexualActivityRecord implements Record


Captures an occurrence of sexual activity. Each record is a single occurrence. ProtectionUsed field is optional.

Summary

Constants

static final int
static final int
static final int

Public constructors

SexualActivityRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    int protectionUsed,
    @NonNull Metadata metadata
)

Public methods

boolean
equals(Object other)
@NonNull Metadata

Set of common metadata associated with the written record.

final int

Whether protection was used during sexual activity.

@NonNull Instant

Time the record happened.

ZoneOffset

User experienced zone offset at time, or null if unknown.

int
@NonNull String

Constants

PROTECTION_USED_PROTECTED

public static final int PROTECTION_USED_PROTECTED = 1

PROTECTION_USED_UNKNOWN

public static final int PROTECTION_USED_UNKNOWN = 0

PROTECTION_USED_UNPROTECTED

public static final int PROTECTION_USED_UNPROTECTED = 2

Public constructors

SexualActivityRecord

Added in 1.1.0-alpha10
public SexualActivityRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    int protectionUsed,
    @NonNull Metadata metadata
)

Public methods

equals

public boolean equals(Object other)

getMetadata

Added in 1.1.0-alpha10
public @NonNull Metadata getMetadata()

Set of common metadata associated with the written record.

getProtectionUsed

Added in 1.1.0-alpha10
public final int getProtectionUsed()

Whether protection was used during sexual activity. Optional field, null if unknown. Allowed values: Protection.

getTime

Added in 1.1.0-alpha10
public @NonNull Instant getTime()

Time the record happened.

getZoneOffset

Added in 1.1.0-alpha10
public ZoneOffset getZoneOffset()

User experienced zone offset at time, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.

hashCode

public int hashCode()

toString

public @NonNull String toString()