public static ErrorCode parseCode(String codeIn) {
            if (codeIn == null) {
                return null;
            }
            ErrorCode errorCode = null;
            String code = codeIn.toUpperCase();
            Matcher m = CODE_PARSE.matcher(code);
            if (m.matches()) {
                final Area area = createArea(m.group(1));
                final int number = Integer.parseInt(m.group(2));
                errorCode = new ErrorCode() {
                    @Override
                    public Area getArea() {
                        return area;
                    }
                    @Override
                    public int getNumber() {
                        return number;
                    }
                    
                    @Override
                    public int hashCode() {
                        final int prime = 6991;
                        int result = 1;
                        result = prime * result + ((area == null) ? 0 : area.hashCode());
                        result = prime * result + number;
                        return result;
                    }

                    @Override
                    public boolean equals(Object obj) {
                        if (obj == null) { return false; }
                        if (obj == this) { return true; }
                        if (! (obj instanceof ErrorCode)) {
                            return false;
                        }
                        ErrorCode other = (ErrorCode) obj;
                        if (area == null) {
                            if (other.getArea() != null) {
                                return false;
                            }
                        } else if (!area.equals(other.getArea())) {
                            return false;
                        }
                        return (number == other.getNumber());
                    }
                    
                    @Override
                    public String toString() {
                        return getArea().getID() + getNumber();
                    }
                };
            }
            return errorCode;
        }