radsz/jacop — pull request #3 by knub (2013-11-06 15:27:51+00:00)
Title: Set cardinality in empty BoundSetDomain() constructor

I was creating *BoundSetDomains* by using code like this:
```java
domain = new BoundSetDomain();
for (int i : someListIHave()) {
domain = domain.union(i);
}
```

Sometimes, however, this list is empty, which leads to an empty *BoundSetDomain*, which does not have a cardinality.

Later one, when I called *search.labeling()*, I get a *NullPointerException* in ```BoundSetDomain.inCardinality:1265```. This line checks for
```java
min <= cardinality.min()
```
which raises a *NullPointerException* as cardinality is null for my *BoundSetDomain*.

I tried to create a very simple test case to show the issue, but I was not able in the short amount of time I have.
It seems like the error only occurs in my complex set of constraints I have.

However, I think it is reasonable to set the cardinality to 0 for an empty SetDomain, isn't it?

Note: I have not tested this code. In my code, I work around this issue by creating my domain like
```java
domain = new BoundSetDomain(0, -1);
```
until another solution exists.