Code example for HashSet

Methods: remove

        return nonce;
    public static void removeNonce(long nonce) {
    public static boolean isNonceKnown(long nonce) {
        return sKnownNonces.contains(nonce);
     * Verifies that the data was signed with the given signature, and returns 
     * the list of verified purchases. The data is in JSON format and contains 
     * a nonce (number used once) that we generated and that was signed 
     * (as part of the whole data string) with a private key. The data also 
     * contains the {@link PurchaseState} and product ID of the purchase. 
     * In the general case, there can be an array of purchase transactions 
     * because there may be delays in processing the purchase on the backend