Class NoLambda.EqualityBasedOnSerialization

java.lang.Object
com.diffplug.spotless.NoLambda.EqualityBasedOnSerialization
All Implemented Interfaces:
NoLambda, Serializable
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:
  • Constructor Details

    • EqualityBasedOnSerialization

      public EqualityBasedOnSerialization()
  • Method Details

    • toBytes

      public byte[] toBytes()
      Description copied from interface: NoLambda
      Returns a byte array representation of everything inside this SerializableFileFilter.

      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. (See SerializableFileFilterImpl.SkipFilesNamed for an example of how to make a serializable subclass.)

      Specified by:
      toBytes in interface NoLambda
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object otherObj)
      Overrides:
      equals in class Object