|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace Sourceboat\Enumeration\Enums\Interfaces; |
| 4 | + |
| 5 | +use Eloquent\Enumeration\EnumerationInterface; |
| 6 | + |
| 7 | +/** |
| 8 | + * Defines the interface for weighted enums. |
| 9 | + */ |
| 10 | +interface Weighted extends EnumerationInterface |
| 11 | +{ |
| 12 | + /** |
| 13 | + * Get members of this enum greater than $weighted. |
| 14 | + * |
| 15 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $weighted |
| 16 | + * @return array |
| 17 | + */ |
| 18 | + public static function getMembersGreaterThan(Weighted $weighted): array; |
| 19 | + |
| 20 | + /** |
| 21 | + * Get members of this enum greater than or equal to $weighted. |
| 22 | + * |
| 23 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $weighted |
| 24 | + * @return array |
| 25 | + */ |
| 26 | + public static function getMembersGreaterThanOrEqualTo(Weighted $weighted): array; |
| 27 | + |
| 28 | + /** |
| 29 | + * Get members of this enum equal to $weighted. |
| 30 | + * |
| 31 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $weighted |
| 32 | + * @return array |
| 33 | + */ |
| 34 | + public static function getMembersEqualTo(Weighted $weighted): array; |
| 35 | + |
| 36 | + /** |
| 37 | + * Get members of this enum less than or equal to $weighted. |
| 38 | + * |
| 39 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $weighted |
| 40 | + * @return array |
| 41 | + */ |
| 42 | + public static function getMembersLessThanOrEqualTo(Weighted $weighted): array; |
| 43 | + |
| 44 | + /** |
| 45 | + * Get members of this enum less than or equal to $weighted. |
| 46 | + * |
| 47 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $weighted |
| 48 | + * @return array |
| 49 | + */ |
| 50 | + public static function getMembersLessThan(Weighted $weighted): array; |
| 51 | + |
| 52 | + /** |
| 53 | + * Get members of this enum between the given members weights. |
| 54 | + * |
| 55 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $lower |
| 56 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $higher |
| 57 | + * @return array |
| 58 | + */ |
| 59 | + public static function getMembersBetween(Weighted $lower, Weighted $higher): array; |
| 60 | + |
| 61 | + /** |
| 62 | + * Get members of this enum between or equal to the given members weights. |
| 63 | + * |
| 64 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $lower |
| 65 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $higher |
| 66 | + * @return array |
| 67 | + */ |
| 68 | + public static function getMembersBetweenOrEqualTo(Weighted $lower, Weighted $higher): array; |
| 69 | + |
| 70 | + /** |
| 71 | + * Get members of this enum greater than this. |
| 72 | + * |
| 73 | + * @return array |
| 74 | + */ |
| 75 | + public function getMembersGreaterThanThis(): array; |
| 76 | + |
| 77 | + /** |
| 78 | + * Get members of this enum greater than or queal to this. |
| 79 | + * |
| 80 | + * @return array |
| 81 | + */ |
| 82 | + public function getMembersGreaterThanOrEqualToThis(): array; |
| 83 | + |
| 84 | + /** |
| 85 | + * Get members of this enum equal to this. |
| 86 | + * |
| 87 | + * @return array |
| 88 | + */ |
| 89 | + public function getMembersEqualToThis(): array; |
| 90 | + |
| 91 | + /** |
| 92 | + * Get members of this enum less than or equal to this. |
| 93 | + * |
| 94 | + * @return array |
| 95 | + */ |
| 96 | + public function getMembersLessThanOrEqualToThis(): array; |
| 97 | + |
| 98 | + /** |
| 99 | + * Get members of this enum less than this. |
| 100 | + * |
| 101 | + * @return array |
| 102 | + */ |
| 103 | + public function getMembersLessThanThis(): array; |
| 104 | + |
| 105 | + /** |
| 106 | + * Get members of this enum between this and the given higher bound. |
| 107 | + * |
| 108 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $higher |
| 109 | + * @return array |
| 110 | + */ |
| 111 | + public function getMembersBetweenThisAnd(Weighted $higher): array; |
| 112 | + |
| 113 | + /** |
| 114 | + * Get members of this enum between or equal to this and the given higher bound. |
| 115 | + * |
| 116 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $higher |
| 117 | + * @return array |
| 118 | + */ |
| 119 | + public function getMembersBetweenOrEqualToThisAnd(Weighted $higher): array; |
| 120 | + |
| 121 | + /** |
| 122 | + * The weight of this enum member. |
| 123 | + * |
| 124 | + * @return int|float |
| 125 | + */ |
| 126 | + public function weight(); |
| 127 | + |
| 128 | + /** |
| 129 | + * Determine if this members weight is greater than the given members weight. |
| 130 | + * |
| 131 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $member |
| 132 | + * @return bool |
| 133 | + */ |
| 134 | + public function isGreaterThan(Weighted $member): bool; |
| 135 | + |
| 136 | + /** |
| 137 | + * Determine if this members weight is greater or equal than the given members weight. |
| 138 | + * |
| 139 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $member |
| 140 | + * @return bool |
| 141 | + */ |
| 142 | + public function isGreaterThanOrEqualTo(Weighted $member): bool; |
| 143 | + |
| 144 | + /** |
| 145 | + * Determine if this members weight is equal to the given members weight. |
| 146 | + * |
| 147 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $member |
| 148 | + * @return bool |
| 149 | + */ |
| 150 | + public function isEqualTo(Weighted $member): bool; |
| 151 | + |
| 152 | + /** |
| 153 | + * Determine if this members weight is less than the given members weight. |
| 154 | + * |
| 155 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $member |
| 156 | + * @return bool |
| 157 | + */ |
| 158 | + public function isLessThan(Weighted $member): bool; |
| 159 | + |
| 160 | + /** |
| 161 | + * Determine if this members weight is less than or euqal to the given members weight. |
| 162 | + * |
| 163 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $member |
| 164 | + * @return bool |
| 165 | + */ |
| 166 | + public function isLessThanOrEqualTo(Weighted $member): bool; |
| 167 | + |
| 168 | + /** |
| 169 | + * Determine if this members weight is between the given members weight. |
| 170 | + * |
| 171 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $lower |
| 172 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $higher |
| 173 | + * @return bool |
| 174 | + */ |
| 175 | + public function isBetween(Weighted $lower, Weighted $higher): bool; |
| 176 | + |
| 177 | + /** |
| 178 | + * Determine if this members weight is between or equal to the given members weight. |
| 179 | + * |
| 180 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $lower |
| 181 | + * @param \Sourceboat\Enumeration\Enums\Interfaces\Weighted $higher |
| 182 | + * @return bool |
| 183 | + */ |
| 184 | + public function isBetweenOrEqualTo(Weighted $lower, Weighted $higher): bool; |
| 185 | +} |
0 commit comments