Package com.diffplug.spotless
Class NoLambda.EqualityBasedOnSerialization
- java.lang.Object
-
- com.diffplug.spotless.NoLambda.EqualityBasedOnSerialization
-
- All Implemented Interfaces:
NoLambda
,Serializable
- Direct Known Subclasses:
FormatExceptionPolicyStrict
- Enclosing interface:
- NoLambda
public abstract static class NoLambda.EqualityBasedOnSerialization extends Object implements NoLambda
An implementation of NoLambda in which equality is based on the serialized representation of itself.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.diffplug.spotless.NoLambda
NoLambda.EqualityBasedOnSerialization
-
-
Constructor Summary
Constructors Constructor Description EqualityBasedOnSerialization()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object otherObj)
int
hashCode()
byte[]
toBytes()
Returns a byte array representation of everything inside thisSerializableFileFilter
.
-
-
-
Method Detail
-
toBytes
public byte[] toBytes()
Description copied from interface:NoLambda
Returns a byte array representation of everything inside thisSerializableFileFilter
. The main purpose of this method is to ensure one can't instantiate this class with lambda expressions, which are notoriously difficult to serialize and deserialize properly. (SeeSerializableFileFilterImpl.SkipFilesNamed
for an example of how to make a serializable subclass.)
-
-