code: public boolean isIdentity() {
          for (int i = 0; i < this.values.length; i++) {
              if (this.values[i] != i) {
                  return false;
              }
          }
          return true;
      }
docs: Check to see if this permutation is the identity permutation.
  
  @return true if for all i, p[i] = i