Java 类org.apache.commons.lang.builder.HashCodeBuilder 实例源码

项目:VASSAL-src    文件:SourceOpDiskCacheBitmapImpl.java   
public SourceOpDiskCacheBitmapImpl(
  String name,
  int tileX,
  int tileY,
  double scale,
  ImageTileSource tileSrc)
{
  if (name == null) throw new IllegalArgumentException();
  if (name.length() == 0) throw new IllegalArgumentException();
  if (tileX < 0) throw new IllegalArgumentException();
  if (tileY < 0) throw new IllegalArgumentException();
  if (scale <= 0) throw new IllegalArgumentException();
  if (tileSrc == null) throw new IllegalArgumentException();

  this.name = name;
  this.tileX = tileX;
  this.tileY = tileY;
  this.scale = scale;
  this.tileSrc = tileSrc;

  hash = new HashCodeBuilder().append(name)
                              .append(tileX)
                              .append(tileY)
                              .append(scale)
                              .toHashCode();
}
项目:VASSAL-src    文件:ScaleOpBitmapImpl.java   
/**
 * Constructs an <code>ImageOp</code> which will scale
 * the image produced by its source <code>ImageOp</code>.
 *
 * @param sop the source operation
 * @param scale the scale factor
 * @param hints rendering hints
 */
public ScaleOpBitmapImpl(ImageOp sop, double scale, RenderingHints hints) {
  if (sop == null)
    throw new IllegalArgumentException("Attempt to scale null image");
  if (scale <= 0)
    throw new IllegalArgumentException("Cannot scale image at " + scale);

  this.sop = sop;
  this.scale = scale;
  this.hints = hints;

  hash = new HashCodeBuilder().append(sop)
                              .append(scale)
                              .append(hints)
                              .toHashCode();
}
项目:flume-release-1.7.0    文件:LogEntry.java   
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean present_category = true && (isSetCategory());
  builder.append(present_category);
  if (present_category)
    builder.append(category);

  boolean present_message = true && (isSetMessage());
  builder.append(present_message);
  if (present_message)
    builder.append(message);

  return builder.toHashCode();
}
项目:Reer    文件:WeaklyTypeReferencingMethod.java   
@Override
public int hashCode() {
    if (cachedHashCode != -1) {
        return cachedHashCode;
    }
    // there's a risk, for some methods, that the hash is always
    // recomputed but it won't be worse than before
    cachedHashCode = new HashCodeBuilder()
            .append(declaringType)
            .append(returnType)
            .append(name)
            .append(paramTypes)
            .toHashCode();
    return cachedHashCode;
}
项目:Reer    文件:NamespaceId.java   
@Override
public int hashCode() {
    return new HashCodeBuilder(17, 31)
            .append(namespace)
            .append(name)
            .toHashCode();
}
项目:hadoop    文件:CachePoolInfo.java   
@Override
public int hashCode() {
  return new HashCodeBuilder().
      append(poolName).
      append(ownerName).
      append(groupName).
      append(mode).
      append(limit).
      append(maxRelativeExpiryMs).
      hashCode();
}
项目:morf    文件:FieldReference.java   
/**
 * @see java.lang.Object#hashCode()
 */
@Override
public int hashCode() {
  return new HashCodeBuilder()
      .appendSuper(super.hashCode())
      .append(direction)
      .append(name)
      .append(nullValueHandling)
      .append(table)
      .toHashCode();
}
项目:VASSAL-src    文件:CropOpBitmapImpl.java   
/**
 * Constructs an <code>ImageOp</code> which will crop the image
 * produced by its source <code>ImageOp</code>.
 *
 * @param sop the source operation
 * @param x0 the x coordinate of the upper-left corner
 * @param y0 the y coordinate of the upper-left corner
 * @param x1 the x coordinate of the lower-right corner
 * @param y1 the y coordinate of the lower-right corner
 */
public CropOpBitmapImpl(ImageOp sop, int x0, int y0, int x1, int y1) {
  if (sop == null) {
    throw new IllegalArgumentException();
  }

  if (x0 < 0) {
    throw new IllegalArgumentException("left = " + x0);
  }

  if (y0 < 0) {
    throw new IllegalArgumentException("top = " + y0);
  }

  if (x1 <= x0) {
    throw new IllegalArgumentException("left = "+ x0 + ", right = " + x1);
  }

  if (y1 <= y0) {
    throw new IllegalArgumentException("top = " + y0 + ", bottom = " + y1);
  }

  this.sop = sop;
  this.x0 = x0;
  this.y0 = y0;
  this.x1 = x1;
  this.y1 = y1;

  size = new Dimension(x1-x0, y1-y0);

  hash = new HashCodeBuilder().append(sop)
                              .append(x0)
                              .append(y0)
                              .append(x1)
                              .append(y1)
                              .toHashCode();
}
项目:ctsms    文件:SelectionSetValueRowProcessor.java   
@Override
protected int lineHashCode(String[] values) {
    return new HashCodeBuilder(1249046965, -82296885)
    // .append(getFieldName(values))
    // .append(getValue(values))
    .append(getFieldName(values))
    .append(getName(values))
    .append(getValue(values))
    .append(getLocalized(values))
    .append(getPreset(values))
    .append(getStrokesId(values))
    .append(getInkRegions(values))
    .toHashCode();
}
项目:VASSAL-src    文件:SourceTileOpSVGImpl.java   
public SourceTileOpSVGImpl(SVGOp sop, int tileX, int tileY) {
  if (sop == null) throw new IllegalArgumentException();

  if (tileX < 0 || tileX >= sop.getNumXTiles() ||
      tileY < 0 || tileY >= sop.getNumYTiles())
    throw new IndexOutOfBoundsException();

  this.sop = sop;

  final int tw = sop.getTileWidth();
  final int th = sop.getTileHeight();
  final int sw = sop.getWidth();
  final int sh = sop.getHeight();

  x0 = tileX*tw;
  y0 = tileY*th;
  x1 = Math.min((tileX+1)*tw, sw);
  y1 = Math.min((tileY+1)*th, sh);

  size = new Dimension(x1-x0, y1-y0);

  hash = new HashCodeBuilder().append(sop)
                              .append(x0)
                              .append(y0)
                              .append(x1)
                              .append(y1)
                              .toHashCode();
}
项目:VASSAL-src    文件:OrthoRotateOpBitmapImpl.java   
public OrthoRotateOpBitmapImpl(ImageOp sop, int angle) {
  if (sop == null) throw new IllegalArgumentException();

  angle = (360 + (angle % 360)) % 360;  // put angle in [0,360)
  if (angle % 90 != 0) throw new IllegalArgumentException();

  // angle is now in { 0, 90, 180, 270 }.

  this.sop = sop;
  this.angle = angle / 90;

  hash = new HashCodeBuilder().append(sop)
                              .append(angle)
                              .toHashCode();
}
项目:hadoop    文件:ElasticByteBufferPool.java   
@Override
public int hashCode() {
  return new HashCodeBuilder().
      append(capacity).
      append(insertionTime).
      toHashCode();
}
项目:jwala    文件:JsonCreateApplication.java   
@Override
public int hashCode() {
    return new HashCodeBuilder().append(getGroupId())
            .append(getName())
            .append(getWebappContext())
            .append(isSecure())
            .append(isLoadBalanceAcrossServers())
            .append(isUnpackWar()).toHashCode();
}
项目:hadoop    文件:ShortCircuitShm.java   
@Override
public int hashCode() {
  return new HashCodeBuilder().
      append(this.hi).
      append(this.lo).
      toHashCode();
}
项目:ctsms    文件:OpsCodeLineProcessor.java   
private HashCodeBuilder getHashCodeBuilder(String[] values) {
    return new HashCodeBuilder(1249046965, -82296885)
    .append(getType(values))
    .append(getDimdiId(values))
    .append(getFirstCode(values))
    .append(getSecondCode(values))
    .append(getText(values));
}
项目:hadoop    文件:XAttr.java   
@Override
public int hashCode() {
  return new HashCodeBuilder(811, 67)
      .append(name)
      .append(ns)
      .append(value)
      .toHashCode();
}
项目:jwala    文件:JsonUpdateApplication.java   
@Override
public int hashCode() {
    return new HashCodeBuilder().append(getGroupId())
            .append(getName())
            .append(getWebappContext())
            .append(getWebappId())
            .append(isSecure())
            .append(isLoadBalanceAcrossServers())
            .append(isUnpackWar()).toHashCode();
}
项目:living-documentation    文件:Delivery.java   
@Override
public int hashCode() {
    return new HashCodeBuilder().
            append(transportStatus).
            append(lastKnownLocation).
            append(currentVoyage).
            append(misdirected).
            append(eta).
            append(nextExpectedActivity).
            append(isUnloadedAtDestination).
            append(routingStatus).
            append(calculatedAt).
            append(lastEvent).
            toHashCode();
}
项目:ctsms    文件:AlphaIdLineProcessor.java   
private HashCodeBuilder getHashCodeBuilder(String[] values) {
    return new HashCodeBuilder(1249046965, -82296885)
    .append(getValid(values))
    .append(getAlphaId(values))
    .append(getPrimaryCode(values))
    .append(getAsteriskCode(values))
    .append(getOptionalCode(values))
    .append(getText(values));
}
项目:osc-core    文件:Endpoint.java   
@Override
public int hashCode() {
    return new HashCodeBuilder()
            .append(getEndPointIP())
            .append(getDomainId())
            .append(getProject())
            .append(getUser())
            .append(getPassword())
            .append(isHttps())
            .toHashCode();
}
项目:osc-core    文件:Policy.java   
@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder().append(getName()).append(getId());
    if (this.applianceManagerConnector != null) {
        builder.append(this.applianceManagerConnector.getId());
    }

    return builder.toHashCode();
}
项目:ctsms    文件:BankIdentificationLineProcessor.java   
@Override
protected int lineHashCode(String[] values) {
    return new HashCodeBuilder(1249046965, -82296885)
    .append(getBankName(values))
    .append(getBankCodeNumber(values))
    .toHashCode();
}
项目:flume-release-1.7.0    文件:ThriftSourceProtocol.java   
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean present_event = true && (isSetEvent());
  builder.append(present_event);
  if (present_event)
    builder.append(event);

  return builder.toHashCode();
}
项目:flume-release-1.7.0    文件:Scribe.java   
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean present_success = true && (isSetSuccess());
  builder.append(present_success);
  if (present_success)
    builder.append(success.getValue());

  return builder.toHashCode();
}
项目:lams    文件:LearningDesignAccess.java   
@Override
   public int hashCode() {
return new HashCodeBuilder().append(learningDesignId).append(userId).toHashCode();
   }
项目:lams    文件:Lesson.java   
@Override
   public int hashCode() {
return new HashCodeBuilder().append(getLessonId()).toHashCode();
   }
项目:microservice-atom    文件:InvoiceLine.java   
@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this);

}
项目:Reer    文件:StartParameter.java   
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this);
}
项目:lams    文件:SpreadsheetMark.java   
@Override
   public int hashCode() {
return new HashCodeBuilder().append(getUid()).append(getComments()).append(getMarks())
    .append(getDateMarksReleased()).toHashCode();
   }
项目:echo    文件:Relationship.java   
@Override
public int hashCode() {
    return new HashCodeBuilder().append(name).append(autoTerminate).append(additionalProperties).toHashCode();
}
项目:lams    文件:KalturaComment.java   
@Override
   public int hashCode() {
return new HashCodeBuilder().append(uid).append(comment).append(createBy).toHashCode();
   }
项目:echo    文件:Config.java   
@Override
public int hashCode() {
    return new HashCodeBuilder().append(additionalProperties).toHashCode();
}
项目:echo    文件:Property.java   
@Override
public int hashCode() {
    return new HashCodeBuilder().append(additionalProperties).toHashCode();
}
项目:lams    文件:PeerreviewUser.java   
@Override
   public int hashCode() {
return new HashCodeBuilder().append(uid).append(firstName).append(lastName).append(loginName).toHashCode();
   }
项目:microservice-kafka    文件:Order.java   
@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this);
}
项目:keti    文件:SubjectEntity.java   
@Override
public int hashCode() {
    return new HashCodeBuilder().append(this.subjectIdentifier).append(this.zone).append(this.attributesAsJson)
            .append(this.parents).toHashCode();
}
项目:distmq    文件:BrokerClient.java   
@Override
public int hashCode() {
    return new HashCodeBuilder()
            .append(addressList)
            .toHashCode();
}
项目:microservice-cloudfoundry    文件:Item.java   
@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this);

}
项目:microservice-cloudfoundry    文件:Item.java   
@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this);

}
项目:microservice-atom    文件:Shipment.java   
@Override
public int hashCode() {
    return HashCodeBuilder.reflectionHashCode(this);
}