EMPageResult.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * \~chinese
  3. * @header EMPageResult.h
  4. * @abstract 分段结果类。
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header EMPageResult.h
  10. * @abstract The subsection result.
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #import <Foundation/Foundation.h>
  15. /**
  16. * \~chinese
  17. * 分段结果类,用于封装服务器返回的数据。
  18. *
  19. * \~english
  20. * The sub-section result.
  21. */
  22. @interface EMPageResult<__covariant ObjectType> : NSObject
  23. /**
  24. * \~chinese
  25. * 结果列表。
  26. *
  27. * \~english
  28. * The result list.
  29. */
  30. @property (nonatomic, strong) NSArray<ObjectType> *_Nullable list;
  31. /**
  32. * \~chinese
  33. * 当前列表数目。
  34. *
  35. * \~english
  36. * The count of the current list.
  37. */
  38. @property (nonatomic) NSInteger count;
  39. /**
  40. * \~chinese
  41. * 创建实例。
  42. *
  43. * @param aList 结果列表。
  44. * @param aCount 获取当前列表数目。
  45. *
  46. * @result 分段结果的实例。
  47. *
  48. * \~english
  49. * Gets the result instance.
  50. *
  51. * @param aList The result list.
  52. * @param aCount The count of current list.
  53. *
  54. * @result The instance of cursor result.
  55. */
  56. + (instancetype _Nonnull)pageResultWithList:(NSArray<ObjectType> * _Nullable)aList
  57. andCount:(NSInteger)aCount;
  58. @end