Modul speiger.src.collections
Schnittstelle ObjectStrategy<T>
- Typparameter:
T- the keyType of elements maintained by this Collection
- Alle bekannten Implementierungsklassen:
ObjectStrategy.IdentityStrategy,ObjectStrategy.NormalStrategy
public interface ObjectStrategy<T>
A Type Specific Strategy class that allows to give control hashcode generation and equals comparason for maps
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypSchnittstelleBeschreibungstatic classA Strategy that uses Identity HashCode instead of the normal hashing function.static classA Strategy that simulates the normal Hash Collection Behavior if you want to use Hash Control Collections to replace normal ones. -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final ObjectStrategy<?>Identity Strategystatic final ObjectStrategy<?>Normal Strategy -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanType Specific Equals functionintType Specific HashCode functionstatic <T> ObjectStrategy<T>static <T> ObjectStrategy<T>
-
Felddetails
-
IDENTITY
Identity Strategy -
NORMAL
Normal Strategy
-
-
Methodendetails
-
identityStrategy
- Typparameter:
T- the keyType of elements maintained by this Collection- Gibt zurück:
- a IdentityStrategy that allows to emulate a IdentityHashMap
-
normalStrategy
- Typparameter:
T- the keyType of elements maintained by this Collection- Gibt zurück:
- a Normal Strategy that is behaving exactly like the normal Hash Strategy in the Hash Collections
-
hashCode
Type Specific HashCode function- Parameter:
o- the element that the hashcode is requested for (if object may be null)- Gibt zurück:
- hashcode for the given entry
-
equals
Type Specific Equals function- Parameter:
key- the first element that should be compared withvalue- the second element that should be compared with (if object may be null)- Gibt zurück:
- if the elements match
-