Source

DTFoundation / DTFoundation / NSArray+DTExtras.m

//
//  NSArray+DTExtras.m
//  DTKit
//
//  Created by Daniel Tull on 30.09.2009.
//  Copyright 2009 Daniel Tull. All rights reserved.
//

#import "NSArray+DTExtras.h"


@implementation NSArray (DTExtras)

- (BOOL)isEmpty {
	return ([self count] == 0);
}

- (id)firstObject {
	if ([self isEmpty])
		return nil;
	
	return [self objectAtIndex:0];
}

@end