Beispiel #1
0
 public Pair(O anOWLObject, O anotherOWLObject) {
   if (anOWLObject == null) {
     throw new NullPointerException("The first memebr of this pair cannot be null");
   }
   if (anotherOWLObject == null) {
     throw new NullPointerException("The second memebr of this pair cannot be null");
   }
   if (anotherOWLObject.equals(anOWLObject)) {
     throw new IllegalArgumentException("The pair is meant to be made of two distic entities");
   }
   this.members.add(anOWLObject);
   this.members.add(anotherOWLObject);
 }