本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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;
}
示例5: hashCode
import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@Override
public int hashCode() {
return new HashCodeBuilder(17, 31)
.append(namespace)
.append(name)
.toHashCode();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例12: hashCode
import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@Override
public int hashCode() {
return new HashCodeBuilder().
append(capacity).
append(insertionTime).
toHashCode();
}
示例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();
}
示例14: hashCode
import org.apache.commons.lang.builder.HashCodeBuilder; //导入依赖的package包/类
@Override
public int hashCode() {
return new HashCodeBuilder().
append(this.hi).
append(this.lo).
toHashCode();
}
示例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));
}