private boolean equalTo(JCGLBlendState another) { return blendFunctionSourceRGB.equals(another.blendFunctionSourceRGB) && blendFunctionSourceAlpha.equals(another.blendFunctionSourceAlpha) && blendFunctionTargetRGB.equals(another.blendFunctionTargetRGB) && blendFunctionTargetAlpha.equals(another.blendFunctionTargetAlpha) && blendEquationRGB.equals(another.blendEquationRGB) && blendEquationAlpha.equals(another.blendEquationAlpha); }
/** * Computes a hash code from attributes: {@code blendFunctionSourceRGB}, {@code blendFunctionSourceAlpha}, {@code blendFunctionTargetRGB}, {@code blendFunctionTargetAlpha}, {@code blendEquationRGB}, {@code blendEquationAlpha}. * @return hashCode value */ @Override public int hashCode() { int h = 5381; h += (h << 5) + blendFunctionSourceRGB.hashCode(); h += (h << 5) + blendFunctionSourceAlpha.hashCode(); h += (h << 5) + blendFunctionTargetRGB.hashCode(); h += (h << 5) + blendFunctionTargetAlpha.hashCode(); h += (h << 5) + blendEquationRGB.hashCode(); h += (h << 5) + blendEquationAlpha.hashCode(); return h; }
@Test public final void testBijection() { final JCGLBlendFunction[] vs = JCGLBlendFunction.values(); for (int index = 0; index < vs.length; ++index) { final JCGLBlendFunction d = vs[index]; Assert.assertEquals(d, this.fromInt(this.toInt(d))); } } }
@Test public final void testBijection() { final JCGLBlendFunction[] vs = JCGLBlendFunction.values(); for (int index = 0; index < vs.length; ++index) { final JCGLBlendFunction d = vs[index]; Assert.assertEquals(d, this.fromInt(this.toInt(d))); } } }
private boolean equalTo(JCGLBlendStateMutable another) { JCGLBlendFunction blendFunctionSourceRGB = blendFunctionSourceRGB(); JCGLBlendFunction blendFunctionSourceAlpha = blendFunctionSourceAlpha(); JCGLBlendFunction blendFunctionTargetRGB = blendFunctionTargetRGB(); JCGLBlendFunction blendFunctionTargetAlpha = blendFunctionTargetAlpha(); JCGLBlendEquation blendEquationRGB = blendEquationRGB(); JCGLBlendEquation blendEquationAlpha = blendEquationAlpha(); return blendFunctionSourceRGB.equals(another.blendFunctionSourceRGB()) && blendFunctionSourceAlpha.equals(another.blendFunctionSourceAlpha()) && blendFunctionTargetRGB.equals(another.blendFunctionTargetRGB()) && blendFunctionTargetAlpha.equals(another.blendFunctionTargetAlpha()) && blendEquationRGB.equals(another.blendEquationRGB()) && blendEquationAlpha.equals(another.blendEquationAlpha()); }
/** * Computes a hash code from attributes: {@code blendFunctionSourceRGB}, {@code blendFunctionSourceAlpha}, {@code blendFunctionTargetRGB}, {@code blendFunctionTargetAlpha}, {@code blendEquationRGB}, {@code blendEquationAlpha}. * @return hashCode value */ @Override public int hashCode() { int h = 5381; JCGLBlendFunction blendFunctionSourceRGB = blendFunctionSourceRGB(); h += (h << 5) + blendFunctionSourceRGB.hashCode(); JCGLBlendFunction blendFunctionSourceAlpha = blendFunctionSourceAlpha(); h += (h << 5) + blendFunctionSourceAlpha.hashCode(); JCGLBlendFunction blendFunctionTargetRGB = blendFunctionTargetRGB(); h += (h << 5) + blendFunctionTargetRGB.hashCode(); JCGLBlendFunction blendFunctionTargetAlpha = blendFunctionTargetAlpha(); h += (h << 5) + blendFunctionTargetAlpha.hashCode(); JCGLBlendEquation blendEquationRGB = blendEquationRGB(); h += (h << 5) + blendEquationRGB.hashCode(); JCGLBlendEquation blendEquationAlpha = blendEquationAlpha(); h += (h << 5) + blendEquationAlpha.hashCode(); return h; }