Here you can find the source of hash(String name)
Parameter | Description |
---|---|
name | The name of the entry. |
public static int hash(String name)
//package com.java2s; //License from project: Open Source License public class Main { /**// www. j av a 2s. co m * Hashes the specified string into an integer used to identify an {@link ArchiveEntry}. * * @param name The name of the entry. * @return The hash. */ public static int hash(String name) { return name.toUpperCase().chars().reduce(0, (hash, character) -> hash * 61 + character - 32); } }