{"action":"closed","number":188,"pull_request":{"url":"https://api.github.com/repos/apache/commons-lang/pulls/188","id":85003671,"html_url":"https://github.com/apache/commons-lang/pull/188","diff_url":"https://github.com/apache/commons-lang/pull/188.diff","patch_url":"https://github.com/apache/commons-lang/pull/188.patch","issue_url":"https://api.github.com/repos/apache/commons-lang/issues/188","number":188,"state":"closed","locked":false,"title":"LANG-1266 Add alphabet converter","user":{"login":"eyala","id":883256,"avatar_url":"https://avatars.githubusercontent.com/u/883256?v=3","gravatar_id":"","url":"https://api.github.com/users/eyala","html_url":"https://github.com/eyala","followers_url":"https://api.github.com/users/eyala/followers","following_url":"https://api.github.com/users/eyala/following{/other_user}","gists_url":"https://api.github.com/users/eyala/gists{/gist_id}","starred_url":"https://api.github.com/users/eyala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyala/subscriptions","organizations_url":"https://api.github.com/users/eyala/orgs","repos_url":"https://api.github.com/users/eyala/repos","events_url":"https://api.github.com/users/eyala/events{/privacy}","received_events_url":"https://api.github.com/users/eyala/received_events","type":"User","site_admin":false},"body":"(as described in [the mailing list](http://mail-archives.apache.org/mod_mbox/commons-dev/201609.mbox/%3c289983494.3057706.1472720010277@mail.yahoo.com%3e))\r\n\r\nThis is a utility class I wrote for converting from one alphabet to another - for example, from unicode to latin, without using some of the chars in latin. The usage looks like this:\r\n\r\n```\r\nSet<Character> originals; // a, b, c, d\r\nSet<Character> encoding; // 0, 1, d\r\nSet<Character> doNotEncode; // d\r\n\r\nAlphabetConverter ac = AlphabetConverter.createConverter(originals, encoding, doNotEncode);\r\n\r\nac.encode(\"a\"); // 00\r\nac.encode(\"b\"); // 01\r\nac.encode(\"c\"); // 0d\r\nac.encode(\"d\"); // d\r\nac.encode(\"abcd\"); // 00010dd\r\n```\r\nOf course, \r\n\r\n`x.equals(ac.decode(ac.encode(x)))`\r\n\r\n should always be true.\r\n\r\nThe implementation provided makes the encodings of fixed length, other than the \"do not encode\" chars, which remain as they are (length one).\r\n\r\nIn addition, in order to make it easier to preserve the encoding scheme, I've added a human-readable toString implementation, and a constructor that can recreate an AlphabetConverter from the encoding map, such that:\r\n```\r\n\r\nAlphabetConverter ac;\r\n\r\nac.equals(AlphabetConverter.createConverterFromMap(ac.getOriginalToEncoded())); // always should be true\r\n\r\n```","created_at":"2016-09-13T08:18:47Z","updated_at":"2016-09-18T16:37:53Z","closed_at":"2016-09-18T16:37:53Z","merged_at":null,"merge_commit_sha":"a3db62e59acfd3ab61d7aad22c2b72fcb3ec104a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/commons-lang/pulls/188/commits","review_comments_url":"https://api.github.com/repos/apache/commons-lang/pulls/188/comments","review_comment_url":"https://api.github.com/repos/apache/commons-lang/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/commons-lang/issues/188/comments","statuses_url":"https://api.github.com/repos/apache/commons-lang/statuses/c1a5a638a3132f2048bb4113181460c3c660c2a8","head":{"label":"eyala:LANG-1266","ref":"LANG-1266","sha":"c1a5a638a3132f2048bb4113181460c3c660c2a8","user":{"login":"eyala","id":883256,"avatar_url":"https://avatars.githubusercontent.com/u/883256?v=3","gravatar_id":"","url":"https://api.github.com/users/eyala","html_url":"https://github.com/eyala","followers_url":"https://api.github.com/users/eyala/followers","following_url":"https://api.github.com/users/eyala/following{/other_user}","gists_url":"https://api.github.com/users/eyala/gists{/gist_id}","starred_url":"https://api.github.com/users/eyala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyala/subscriptions","organizations_url":"https://api.github.com/users/eyala/orgs","repos_url":"https://api.github.com/users/eyala/repos","events_url":"https://api.github.com/users/eyala/events{/privacy}","received_events_url":"https://api.github.com/users/eyala/received_events","type":"User","site_admin":false},"repo":{"id":68003002,"name":"commons-lang","full_name":"eyala/commons-lang","owner":{"login":"eyala","id":883256,"avatar_url":"https://avatars.githubusercontent.com/u/883256?v=3","gravatar_id":"","url":"https://api.github.com/users/eyala","html_url":"https://github.com/eyala","followers_url":"https://api.github.com/users/eyala/followers","following_url":"https://api.github.com/users/eyala/following{/other_user}","gists_url":"https://api.github.com/users/eyala/gists{/gist_id}","starred_url":"https://api.github.com/users/eyala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyala/subscriptions","organizations_url":"https://api.github.com/users/eyala/orgs","repos_url":"https://api.github.com/users/eyala/repos","events_url":"https://api.github.com/users/eyala/events{/privacy}","received_events_url":"https://api.github.com/users/eyala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eyala/commons-lang","description":"Mirror of Apache Commons Lang","fork":true,"url":"https://api.github.com/repos/eyala/commons-lang","forks_url":"https://api.github.com/repos/eyala/commons-lang/forks","keys_url":"https://api.github.com/repos/eyala/commons-lang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eyala/commons-lang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eyala/commons-lang/teams","hooks_url":"https://api.github.com/repos/eyala/commons-lang/hooks","issue_events_url":"https://api.github.com/repos/eyala/commons-lang/issues/events{/number}","events_url":"https://api.github.com/repos/eyala/commons-lang/events","assignees_url":"https://api.github.com/repos/eyala/commons-lang/assignees{/user}","branches_url":"https://api.github.com/repos/eyala/commons-lang/branches{/branch}","tags_url":"https://api.github.com/repos/eyala/commons-lang/tags","blobs_url":"https://api.github.com/repos/eyala/commons-lang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eyala/commons-lang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eyala/commons-lang/git/refs{/sha}","trees_url":"https://api.github.com/repos/eyala/commons-lang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eyala/commons-lang/statuses/{sha}","languages_url":"https://api.github.com/repos/eyala/commons-lang/languages","stargazers_url":"https://api.github.com/repos/eyala/commons-lang/stargazers","contributors_url":"https://api.github.com/repos/eyala/commons-lang/contributors","subscribers_url":"https://api.github.com/repos/eyala/commons-lang/subscribers","subscription_url":"https://api.github.com/repos/eyala/commons-lang/subscription","commits_url":"https://api.github.com/repos/eyala/commons-lang/commits{/sha}","git_commits_url":"https://api.github.com/repos/eyala/commons-lang/git/commits{/sha}","comments_url":"https://api.github.com/repos/eyala/commons-lang/comments{/number}","issue_comment_url":"https://api.github.com/repos/eyala/commons-lang/issues/comments{/number}","contents_url":"https://api.github.com/repos/eyala/commons-lang/contents/{+path}","compare_url":"https://api.github.com/repos/eyala/commons-lang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eyala/commons-lang/merges","archive_url":"https://api.github.com/repos/eyala/commons-lang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eyala/commons-lang/downloads","issues_url":"https://api.github.com/repos/eyala/commons-lang/issues{/number}","pulls_url":"https://api.github.com/repos/eyala/commons-lang/pulls{/number}","milestones_url":"https://api.github.com/repos/eyala/commons-lang/milestones{/number}","notifications_url":"https://api.github.com/repos/eyala/commons-lang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eyala/commons-lang/labels{/name}","releases_url":"https://api.github.com/repos/eyala/commons-lang/releases{/id}","deployments_url":"https://api.github.com/repos/eyala/commons-lang/deployments","created_at":"2016-09-12T11:24:33Z","updated_at":"2016-09-12T11:24:38Z","pushed_at":"2016-09-13T08:15:29Z","git_url":"git://github.com/eyala/commons-lang.git","ssh_url":"git@github.com:eyala/commons-lang.git","clone_url":"https://github.com/eyala/commons-lang.git","svn_url":"https://github.com/eyala/commons-lang","homepage":null,"size":18752,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"dad86bc0a29689fd29bf03b382a39621718e8b05","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":206378,"name":"commons-lang","full_name":"apache/commons-lang","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/commons-lang","description":"Mirror of Apache Commons Lang","fork":false,"url":"https://api.github.com/repos/apache/commons-lang","forks_url":"https://api.github.com/repos/apache/commons-lang/forks","keys_url":"https://api.github.com/repos/apache/commons-lang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/commons-lang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/commons-lang/teams","hooks_url":"https://api.github.com/repos/apache/commons-lang/hooks","issue_events_url":"https://api.github.com/repos/apache/commons-lang/issues/events{/number}","events_url":"https://api.github.com/repos/apache/commons-lang/events","assignees_url":"https://api.github.com/repos/apache/commons-lang/assignees{/user}","branches_url":"https://api.github.com/repos/apache/commons-lang/branches{/branch}","tags_url":"https://api.github.com/repos/apache/commons-lang/tags","blobs_url":"https://api.github.com/repos/apache/commons-lang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/commons-lang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/commons-lang/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/commons-lang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/commons-lang/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/commons-lang/languages","stargazers_url":"https://api.github.com/repos/apache/commons-lang/stargazers","contributors_url":"https://api.github.com/repos/apache/commons-lang/contributors","subscribers_url":"https://api.github.com/repos/apache/commons-lang/subscribers","subscription_url":"https://api.github.com/repos/apache/commons-lang/subscription","commits_url":"https://api.github.com/repos/apache/commons-lang/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/commons-lang/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/commons-lang/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/commons-lang/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/commons-lang/contents/{+path}","compare_url":"https://api.github.com/repos/apache/commons-lang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/commons-lang/merges","archive_url":"https://api.github.com/repos/apache/commons-lang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/commons-lang/downloads","issues_url":"https://api.github.com/repos/apache/commons-lang/issues{/number}","pulls_url":"https://api.github.com/repos/apache/commons-lang/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/commons-lang/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/commons-lang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/commons-lang/labels{/name}","releases_url":"https://api.github.com/repos/apache/commons-lang/releases{/id}","deployments_url":"https://api.github.com/repos/apache/commons-lang/deployments","created_at":"2009-05-21T01:24:46Z","updated_at":"2016-09-18T10:13:07Z","pushed_at":"2016-09-18T16:34:43Z","git_url":"git://github.com/apache/commons-lang.git","ssh_url":"git@github.com:apache/commons-lang.git","clone_url":"https://github.com/apache/commons-lang.git","svn_url":"https://github.com/apache/commons-lang","homepage":null,"size":31518,"stargazers_count":737,"watchers_count":737,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":473,"mirror_url":"git://git.apache.org/commons-lang.git","open_issues_count":12,"forks":473,"open_issues":12,"watchers":737,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/commons-lang/pulls/188"},"html":{"href":"https://github.com/apache/commons-lang/pull/188"},"issue":{"href":"https://api.github.com/repos/apache/commons-lang/issues/188"},"comments":{"href":"https://api.github.com/repos/apache/commons-lang/issues/188/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/commons-lang/pulls/188/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/commons-lang/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/commons-lang/pulls/188/commits"},"statuses":{"href":"https://api.github.com/repos/apache/commons-lang/statuses/c1a5a638a3132f2048bb4113181460c3c660c2a8"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":3,"review_comments":0,"commits":1,"additions":501,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"eyala"}}