// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from duration.djinni

#import "DBRecordWithDurationAndDerivings.h"


@implementation DBRecordWithDurationAndDerivings

- (id)initWithDt:(NSTimeInterval)dt
{
    if (self = [super init]) {
        _dt = dt;
    }
    return self;
}

- (BOOL)isEqual:(id)other
{
    if (![other isKindOfClass:[DBRecordWithDurationAndDerivings class]]) {
        return NO;
    }
    DBRecordWithDurationAndDerivings *typedOther = (DBRecordWithDurationAndDerivings *)other;
    return self.dt == typedOther.dt;
}

- (NSUInteger)hash
{
    return NSStringFromClass([self class]).hash ^
            ((NSUInteger)self.dt);
}

- (NSComparisonResult)compare:(DBRecordWithDurationAndDerivings *)other
{
    NSComparisonResult tempResult;
    if (self.dt < other.dt) {
        tempResult = NSOrderedAscending;
    } else if (self.dt > other.dt) {
        tempResult = NSOrderedDescending;
    } else {
        tempResult = NSOrderedSame;
    }
    if (tempResult != NSOrderedSame) {
        return tempResult;
    }
    return NSOrderedSame;
}

@end
