コード例 #1
0
 public AbstractStockCollectionProperty generateClone() {
   AbstractStockCollectionProperty cloned = new StockCollectionProperty();
   cloned.type = this.type;
   cloned.stockCollection = this.stockCollection;
   cloned.value = this.value;
   cloned.rank = this.rank;
   return cloned;
 }
コード例 #2
0
  public boolean equals(Object other) {
    if ((this == other)) return true;
    if ((other == null)) return false;
    if (!(other instanceof AbstractStockCollectionProperty)) return false;
    AbstractStockCollectionProperty castOther = (AbstractStockCollectionProperty) other;

    return ((this.getType() == castOther.getType())
            || (this.getType() != null
                && castOther.getType() != null
                && this.getType().equals(castOther.getType())))
        && ((this.getStockCollection() == castOther.getStockCollection())
            || (this.getStockCollection() != null
                && castOther.getStockCollection() != null
                && this.getStockCollection().equals(castOther.getStockCollection())))
        && (this.getRank() == castOther.getRank());
  }