|
1 | | -# Enumeratum [](https://travis-ci.org/lloydmeta/enumeratum) [](https://coveralls.io/r/lloydmeta/enumeratum?branch=master) [](https://www.codacy.com/public/lloydmeta/enumeratum) |
| 1 | +# Enumeratum [](https://travis-ci.org/lloydmeta/enumeratum) [](https://coveralls.io/r/lloydmeta/enumeratum?branch=master) [](https://www.codacy.com/public/lloydmeta/enumeratum) |
2 | 2 |
|
3 | 3 | Yet another enumeration implementation for Scala for the sake of exhaustive pattern match warnings, Enumeratum is |
4 | 4 | an implementation based on a single Scala macro that searches for implementations of a sealed trait or class. |
5 | 5 |
|
6 | 6 | Enumeratum aims to be similar enough to Scala's built in `Enumeration` to be easy-to-use and understand while offering |
7 | | -more flexibility, safety, and power. |
| 7 | +more flexibility, safety, and power. |
8 | 8 |
|
9 | | -Using Enumeratum allows you to use your own `sealed` traits/classes without having to maintain your own collection of |
10 | | -values, which not only means you get exhaustive pattern match warnings, but also richer enum values, and methods that |
11 | | -can take your enum values as arguments without having to worry about erasure (for more info, see [this blog post on Scala's |
| 9 | +Using Enumeratum allows you to use your own `sealed` traits/classes without having to maintain your own collection of |
| 10 | +values, which not only means you get exhaustive pattern match warnings, but also richer enum values, and methods that |
| 11 | +can take your enum values as arguments without having to worry about erasure (for more info, see [this blog post on Scala's |
12 | 12 | `Enumeration`](http://underscore.io/blog/posts/2014/09/03/enumerations.html)) |
13 | 13 |
|
14 | 14 | Compatible with Scala 2.10.x and 2.11.x |
@@ -45,7 +45,7 @@ libraryDependencies ++= Seq( |
45 | 45 | Using Enumeratum is simple. Simply declare your own sealed trait or class `A`, and implement it as case objects inside |
46 | 46 | an object that extends from `Enum[A]` as follows. |
47 | 47 |
|
48 | | -*Note* `Enum` is BYOO (Bring Your Own Ordinality) - take care of ordinality in your own way when you implement |
| 48 | +*Note* `Enum` is BYOO (Bring Your Own Ordinality) - take care of ordinality in your own way when you implement |
49 | 49 | the `values` method. If you don't care about ordinality, just pass `findValues` directly into your |
50 | 50 | `val values` implementation. |
51 | 51 |
|
@@ -84,11 +84,11 @@ def tryMatching(v: Greeting): Unit = v match { |
84 | 84 |
|
85 | 85 | /** |
86 | 86 | Pattern match warning ... |
87 | | - |
| 87 | +
|
88 | 88 | <console>:24: warning: match may not be exhaustive. |
89 | 89 | It would fail on the following input: Bye |
90 | 90 | def tryMatching(v: Greeting): Unit = v match { |
91 | | - |
| 91 | +
|
92 | 92 | */ |
93 | 93 |
|
94 | 94 | ``` |
@@ -176,4 +176,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
176 | 176 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
177 | 177 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
178 | 178 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
179 | | -THE SOFTWARE. |
| 179 | +THE SOFTWARE. |
0 commit comments