Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.yammer.dropwizard.jersey.params;
 
 import java.util.UUID;

A parameter encapsulating UUID values. All non-parsable values will return a 400 Bad Request response.
 
 public class UUIDParam extends AbstractParam<UUID> {
    public UUIDParam(String input) {
        super(input);
    }
    @Override
    protected String errorMessage(String inputException e) {
        return '"' + input + "\" is not a UUID.";
    }
    @Override
    protected UUID parse(String inputthrows Exception {
        return UUID.fromString(input);
    }
New to GrepCode? Check out our FAQ X