Example #1
0
  public int compareTo(SuperColumn other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    SuperColumn typedOther = (SuperColumn) other;

    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetName()) {
      lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumns()) {
      lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Example #2
0
 /** Performs a deep copy on <i>other</i>. */
 public SuperColumn(SuperColumn other) {
   if (other.isSetName()) {
     this.name = TBaseHelper.copyBinary(other.name);
     ;
   }
   if (other.isSetColumns()) {
     List<Column> __this__columns = new ArrayList<Column>();
     for (Column other_element : other.columns) {
       __this__columns.add(new Column(other_element));
     }
     this.columns = __this__columns;
   }
 }
Example #3
0
 /** Performs a deep copy on <i>other</i>. */
 public SuperColumn(SuperColumn other) {
   if (other.isSetName()) {
     this.name = ByteBuffer.wrap(new byte[other.name.limit() - other.name.arrayOffset()]);
     System.arraycopy(
         other.name.array(),
         other.name.arrayOffset(),
         name.array(),
         0,
         other.name.limit() - other.name.arrayOffset());
   }
   if (other.isSetColumns()) {
     List<Column> __this__columns = new ArrayList<Column>();
     for (Column other_element : other.columns) {
       __this__columns.add(new Column(other_element));
     }
     this.columns = __this__columns;
   }
 }
Example #4
0
  public boolean equals(SuperColumn that) {
    if (that == null) return false;

    boolean this_present_name = true && this.isSetName();
    boolean that_present_name = true && that.isSetName();
    if (this_present_name || that_present_name) {
      if (!(this_present_name && that_present_name)) return false;
      if (!this.name.equals(that.name)) return false;
    }

    boolean this_present_columns = true && this.isSetColumns();
    boolean that_present_columns = true && that.isSetColumns();
    if (this_present_columns || that_present_columns) {
      if (!(this_present_columns && that_present_columns)) return false;
      if (!this.columns.equals(that.columns)) return false;
    }

    return true;
  }