当前位置: 首页>>代码示例>>Java>>正文


Java HashCodeBuilder类代码示例

本文整理汇总了Java中org.apache.commons.lang.builder.HashCodeBuilder的典型用法代码示例。如果您正苦于以下问题:Java HashCodeBuilder类的具体用法?Java HashCodeBuilder怎么用?Java HashCodeBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


HashCodeBuilder类属于org.apache.commons.lang.builder包,在下文中一共展示了HashCodeBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SourceOpDiskCacheBitmapImpl

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
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();
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:27,代码来源:SourceOpDiskCacheBitmapImpl.java

示例2: ScaleOpBitmapImpl

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
/**
 * 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();
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:24,代码来源:ScaleOpBitmapImpl.java

示例3: hashCode

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@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();
}
 
开发者ID:moueimei,项目名称:flume-release-1.7.0,代码行数:17,代码来源:LogEntry.java

示例4: hashCode

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@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;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:16,代码来源:WeaklyTypeReferencingMethod.java

示例5: hashCode

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@Override
public int hashCode() {
    return new HashCodeBuilder(17, 31)
            .append(namespace)
            .append(name)
            .toHashCode();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:NamespaceId.java

示例6: hashCode

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@Override
public int hashCode() {
  return new HashCodeBuilder().
      append(poolName).
      append(ownerName).
      append(groupName).
      append(mode).
      append(limit).
      append(maxRelativeExpiryMs).
      hashCode();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:CachePoolInfo.java

示例7: hashCode

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
/**
 * @see java.lang.Object#hashCode()
 */
@Override
public int hashCode() {
  return new HashCodeBuilder()
      .appendSuper(super.hashCode())
      .append(direction)
      .append(name)
      .append(nullValueHandling)
      .append(table)
      .toHashCode();
}
 
开发者ID:alfasoftware,项目名称:morf,代码行数:14,代码来源:FieldReference.java

示例8: CropOpBitmapImpl

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
/**
 * 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();
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:47,代码来源:CropOpBitmapImpl.java

示例9: lineHashCode

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@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();
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:15,代码来源:SelectionSetValueRowProcessor.java

示例10: SourceTileOpSVGImpl

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
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();
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:29,代码来源:SourceTileOpSVGImpl.java

示例11: OrthoRotateOpBitmapImpl

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
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();
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:16,代码来源:OrthoRotateOpBitmapImpl.java

示例12: hashCode

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@Override
public int hashCode() {
  return new HashCodeBuilder().
      append(capacity).
      append(insertionTime).
      toHashCode();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:ElasticByteBufferPool.java

示例13: hashCode

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@Override
public int hashCode() {
    return new HashCodeBuilder().append(getGroupId())
            .append(getName())
            .append(getWebappContext())
            .append(isSecure())
            .append(isLoadBalanceAcrossServers())
            .append(isUnpackWar()).toHashCode();
}
 
开发者ID:cerner,项目名称:jwala,代码行数:10,代码来源:JsonCreateApplication.java

示例14: hashCode

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@Override
public int hashCode() {
  return new HashCodeBuilder().
      append(this.hi).
      append(this.lo).
      toHashCode();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:ShortCircuitShm.java

示例15: getHashCodeBuilder

import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
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));
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:9,代码来源:OpsCodeLineProcessor.java


注:本文中的org.apache.commons.lang.builder.HashCodeBuilder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。