Simple macro that expands to the following:
Simple macro that expands to the following:
other.isInstanceOf[Class]
true if other.isInstanceOf[Class]
Equality check using all private/protected/public vals of the class defined in the constructor.
Equality check using all private/protected/public vals of the class
defined in the constructor. Does not use inherited or overriden vals.
Do not use with traits, it will only generate a super.equals(that)
call, instead use equalAllVals
.
true if instance.equals(other)
Equality check using all private/protected/public/lazy vals of the class defined in the constructor AND the body of the class.
Equality check using all private/protected/public/lazy vals of the class defined in the constructor AND the body of the class. Does not use inherited or overriden vals.
true if instance.equals(other)
Generates a string using only the passed in parameters
Generates a string using only the passed in parameters
Acceptable arguments include private/protected/public vals, vars, lazy vals, and defs with no arguments.
first param to test with
rest of the params
"ClassName(param1, param2, ...)"
Generates a string representation of the class using the constructor's arguments.
Generates a string representation of the class using the constructor's arguments.
Output is similar to case classes, for example, "ClassName(arg1, arg2, arg3)" would
be the string returned for class ClassName(arg1: Int, arg2: Int, arg3: Int)
string representation of calling class with constructor arguments
Looks up the elements tested in equals
(including super.equals
) and uses them
in MurmurHash3.arrayHash(Array(elements))
.
Looks up the elements tested in equals
(including super.equals
) and uses them
in MurmurHash3.arrayHash(Array(elements))
. Works with all 3 forms of equal
. Does not
work with custom equals
implementations, one of ScalaEquals.equal
,
ScalaEquals.equal(params)
, or ScalaEquals.equalAllVals
must be used
hashCode generated from fields used in equals
Equality check using only parameters passed in to test for equality.
Equality check using only parameters passed in to test for equality.
Acceptable arguments include private/protected/public vals, vars, lazy vals, and defs with no arguments.
first param to test with
rest of the params
true if instance.equals(other)
(Since version 1.2.0) Use ScalaEqualsExtend.equal(param, params...) instead. Will be removed in 1.3.0
Entry point for ScalaEquals
Examples: Test equality with only vals in constructor:
Test equality with vals in constructor AND body:
Test equality with selected parameters:
Specifically, the above example (test equality with selected parameters) is converted to the following code:
Generating toString:
Which will expand to:
Generating toString with params:
Which will expand to:
1.2.0
0.1.0