Predicates.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #import "Types.h"
  2. @interface Predicates : NSObject
  3. + (PREDICATE)alternate:(BOOL)startState;
  4. + (PREDICATE)andLeft:(PREDICATE)left withRight:(PREDICATE)right;
  5. + (PREDICATE)orLeft:(PREDICATE)left withRight:(PREDICATE)right;
  6. + (PREDICATE)countTo:(int)n;
  7. + (PREDICATE)containedIn:(NSArray *)existing;
  8. + (PREDICATE)containsString:(NSString *)toMatch;
  9. + (PREDICATE)equalTo:(id)comparable;
  10. + (PREDICATE)everyNth:(int)n;
  11. + (PREDICATE)greaterThan:(NSNumber *)comparable;
  12. + (PREDICATE)lessThan:(NSNumber *)comparable;
  13. + (PREDICATE)lessThanOrEqualTo:(NSNumber *)comparable;
  14. + (PREDICATE)not:(PREDICATE)predicate;
  15. + (PREDICATE)startsWith:(NSString *)prefix;
  16. + (PREDICATE)whileTrue:(PREDICATE)predicate;
  17. @end
  18. extern PREDICATE TL_alternate(BOOL startState);
  19. extern PREDICATE TL_and(PREDICATE left, PREDICATE right);
  20. extern PREDICATE TL_or(PREDICATE left, PREDICATE right);
  21. extern PREDICATE TL_countTo(int n);
  22. extern PREDICATE TL_containedIn(NSArray *existing);
  23. extern PREDICATE TL_containsString(NSString *toMatch);
  24. extern PREDICATE TL_equalTo(id comparable);
  25. extern PREDICATE TL_everyNth(int n);
  26. extern PREDICATE TL_greaterThan(NSNumber *comparable);
  27. extern PREDICATE TL_lessThan(NSNumber *comparable);
  28. extern PREDICATE TL_lessThanOrEqualTo(NSNumber *comparable);
  29. extern PREDICATE TL_not(PREDICATE predicate);
  30. extern PREDICATE TL_startsWith(NSString *prefix);
  31. extern PREDICATE TL_whileTrue(PREDICATE predicate);