code: @Override
      public boolean isValid() {
          BigInteger maxNumberOfEdges = BigInteger.valueOf(getNumberOfNodes());
          maxNumberOfEdges = maxNumberOfEdges.multiply(maxNumberOfEdges.subtract(BigInteger.ONE));
          maxNumberOfEdges = maxNumberOfEdges.divide(BigInteger.valueOf(2));
  
          return super.isValid() && numberOfEdges > 0 && BigInteger.valueOf(numberOfEdges).compareTo(maxNumberOfEdges) < 1;
      }
docs: {@inheritDoc}