Package org.apache.pekko.http
Class HashCodeCollider$
java.lang.Object
org.apache.pekko.http.HashCodeCollider$
Helper that creates strings that all share the same hashCode == 0.
Adapted from MIT-licensed code by Andriy Plokhotnyuk at https://github.com/plokhotnyuk/jsoniter-scala/blob/26b5ecdd4f8c2ab7e97bd8106cefdda4c1e701ce/jsoniter-scala-benchmark/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/macros/HashCodeCollider.scala#L6.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HashCodeCollider$
Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionscala.collection.Iterator<Object>
asciiCharsAndHash
(int previousHash) scala.collection.immutable.IndexedSeq<Object>
scala.collection.Iterator<String>
Creates an iterator of Strings that all have hashCode == 0
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
HashCodeCollider$
public HashCodeCollider$()
-
-
Method Details
-
visibleChars
-
asciiChars
-
asciiCharsAndHash
-
zeroHashCodeIterator
Creates an iterator of Strings that all have hashCode == 0
-