├── .gitattributes ├── .gitignore ├── .metadata ├── .lock ├── .log ├── .plugins │ ├── org.eclipse.core.resources │ │ ├── .history │ │ │ ├── 0 │ │ │ │ └── 40ac5c1136fb00151b6fb62373bed4e9 │ │ │ ├── 2 │ │ │ │ ├── 30534f8ed4fb00151cf686a16d520ddf │ │ │ │ ├── 40244e59d4fb00151cf686a16d520ddf │ │ │ │ ├── 8015f42be4fb001511408be01e52e74b │ │ │ │ └── d08f9662cdfb00151cf686a16d520ddf │ │ │ ├── 3 │ │ │ │ ├── 00ab1d6238fb00151b6fb62373bed4e9 │ │ │ │ └── 90ce57ea6ef900151291e6e57074fb2f │ │ │ ├── 5 │ │ │ │ ├── 20282d6cd6fb00151cf686a16d520ddf │ │ │ │ └── 90e53c75d1fb00151cf686a16d520ddf │ │ │ ├── 6 │ │ │ │ └── b05cc0bb11fb001514a6f02b616b228d │ │ │ ├── 8 │ │ │ │ ├── 60365c1dd0fb00151cf686a16d520ddf │ │ │ │ ├── 70593d21d6fb00151cf686a16d520ddf │ │ │ │ ├── d06a0d18d0fb00151cf686a16d520ddf │ │ │ │ └── d0dae650e4fb001511408be01e52e74b │ │ │ ├── 10 │ │ │ │ ├── 30ff26a9d1fb00151cf686a16d520ddf │ │ │ │ ├── 609518de6ef900151291e6e57074fb2f │ │ │ │ └── e09d2578e2fb001511408be01e52e74b │ │ │ ├── 11 │ │ │ │ ├── c0b7b52fecfb001515bcce532dee9874 │ │ │ │ └── d09b88ec6ff900151291e6e57074fb2f │ │ │ ├── 12 │ │ │ │ └── c0b45aea6ef900151291e6e57074fb2f │ │ │ ├── 14 │ │ │ │ ├── 2066839e38fb00151b6fb62373bed4e9 │ │ │ │ └── e0aade8b6ff900151291e6e57074fb2f │ │ │ ├── 15 │ │ │ │ ├── 00a0d38537fb00151b6fb62373bed4e9 │ │ │ │ ├── a0513e35e4fb001511408be01e52e74b │ │ │ │ └── f07727ba37fb00151b6fb62373bed4e9 │ │ │ ├── 16 │ │ │ │ ├── 20e44fb06ff900151291e6e57074fb2f │ │ │ │ ├── 80d107c9eafb001515bcce532dee9874 │ │ │ │ └── e03c3d06e4fb001511408be01e52e74b │ │ │ ├── 17 │ │ │ │ ├── 80492718d2fb00151cf686a16d520ddf │ │ │ │ └── d0d05e60e4fb001511408be01e52e74b │ │ │ ├── 18 │ │ │ │ └── 8091c18bd6fb00151cf686a16d520ddf │ │ │ ├── 19 │ │ │ │ └── c082df720ffb001514a6f02b616b228d │ │ │ ├── 22 │ │ │ │ ├── 20595dfdd4fb00151cf686a16d520ddf │ │ │ │ ├── 402ab764ebfb001515bcce532dee9874 │ │ │ │ ├── 809b38b338fb00151b6fb62373bed4e9 │ │ │ │ └── 90c3b285d1fb00151cf686a16d520ddf │ │ │ ├── 23 │ │ │ │ ├── 70280b8c38fb00151b6fb62373bed4e9 │ │ │ │ ├── 70d076f3e9fb001515bcce532dee9874 │ │ │ │ └── e0e81a1a71f900151291e6e57074fb2f │ │ │ ├── 25 │ │ │ │ ├── 10d28a86e7fb001515bcce532dee9874 │ │ │ │ └── 8030c72ed5fb00151cf686a16d520ddf │ │ │ ├── 28 │ │ │ │ ├── 208fb040eafb001515bcce532dee9874 │ │ │ │ ├── 304d0e550ffb001514a6f02b616b228d │ │ │ │ └── b0fc9f7ed8fb00151cf686a16d520ddf │ │ │ ├── 30 │ │ │ │ ├── 408ae1aee4fb001511408be01e52e74b │ │ │ │ └── b0f94004cefb00151cf686a16d520ddf │ │ │ ├── 31 │ │ │ │ └── d04a6c2770f900151291e6e57074fb2f │ │ │ ├── 32 │ │ │ │ ├── c00aa734d0fb00151cf686a16d520ddf │ │ │ │ └── c00f6912d1fb00151cf686a16d520ddf │ │ │ ├── 34 │ │ │ │ ├── 10a0f0c571f900151291e6e57074fb2f │ │ │ │ ├── 708675b2e4fb001511408be01e52e74b │ │ │ │ └── d0e6deda71f900151291e6e57074fb2f │ │ │ ├── 36 │ │ │ │ └── a073e280cdfb00151cf686a16d520ddf │ │ │ ├── 37 │ │ │ │ ├── 400f87abd1fb00151cf686a16d520ddf │ │ │ │ └── 703f095aebfb001515bcce532dee9874 │ │ │ ├── 38 │ │ │ │ ├── f0a4f197d5fb00151cf686a16d520ddf │ │ │ │ └── f0c25b860ffb001514a6f02b616b228d │ │ │ ├── 40 │ │ │ │ └── 9079045f37fb00151b6fb62373bed4e9 │ │ │ ├── 41 │ │ │ │ ├── 303feca5d4fb00151cf686a16d520ddf │ │ │ │ └── f0ec2bc7e7fb001515bcce532dee9874 │ │ │ ├── 42 │ │ │ │ ├── 40094a4ad5fb00151cf686a16d520ddf │ │ │ │ └── d0aba946e7fb001515bcce532dee9874 │ │ │ ├── 43 │ │ │ │ └── a0efd56f38fb00151b6fb62373bed4e9 │ │ │ ├── 44 │ │ │ │ ├── 0036ecdb0ffb001514a6f02b616b228d │ │ │ │ └── 706171e46ff900151291e6e57074fb2f │ │ │ ├── 45 │ │ │ │ └── 3088a29ce8fb001515bcce532dee9874 │ │ │ ├── 47 │ │ │ │ └── f0551fd50ffb001514a6f02b616b228d │ │ │ ├── 49 │ │ │ │ ├── 00d0598bcbfb00151cf686a16d520ddf │ │ │ │ └── 4003a867d8fb00151cf686a16d520ddf │ │ │ ├── 51 │ │ │ │ ├── 70c1d1f6ccfb00151cf686a16d520ddf │ │ │ │ └── 80e4010c0ffb001514a6f02b616b228d │ │ │ ├── 57 │ │ │ │ └── 107c86d435fb00151b6fb62373bed4e9 │ │ │ ├── 58 │ │ │ │ └── c03fb078e4fb001511408be01e52e74b │ │ │ ├── 59 │ │ │ │ ├── 30028ec2e4fb001511408be01e52e74b │ │ │ │ └── 60407c23ebfb001515bcce532dee9874 │ │ │ ├── 60 │ │ │ │ ├── 10d7f890cefb00151cf686a16d520ddf │ │ │ │ └── b0b7339a0ffb001514a6f02b616b228d │ │ │ ├── 61 │ │ │ │ └── 70aacb9938fb00151b6fb62373bed4e9 │ │ │ ├── 62 │ │ │ │ ├── 3074be8ae8fb001515bcce532dee9874 │ │ │ │ ├── 70cad0a671f900151291e6e57074fb2f │ │ │ │ └── 70e5f028d5fb00151cf686a16d520ddf │ │ │ ├── 65 │ │ │ │ └── 50b228dbe8fb001515bcce532dee9874 │ │ │ ├── 66 │ │ │ │ ├── 10666193e3fb001511408be01e52e74b │ │ │ │ ├── 3067adf6e5fb001515bcce532dee9874 │ │ │ │ ├── a01aa26b6ff900151291e6e57074fb2f │ │ │ │ └── e0f26c2738fb00151b6fb62373bed4e9 │ │ │ ├── 69 │ │ │ │ ├── 10d0c091d0fb00151cf686a16d520ddf │ │ │ │ └── 302e3d0371f900151291e6e57074fb2f │ │ │ ├── 71 │ │ │ │ └── 601d7b7bd5fb00151cf686a16d520ddf │ │ │ ├── 72 │ │ │ │ ├── 709ea75e35fb00151b6fb62373bed4e9 │ │ │ │ └── f03d226d0ffb001514a6f02b616b228d │ │ │ ├── 74 │ │ │ │ └── a060d86f38fb00151b6fb62373bed4e9 │ │ │ ├── 75 │ │ │ │ ├── a0f8fb2dd2fb00151cf686a16d520ddf │ │ │ │ └── e0c7c02ed5fb00151cf686a16d520ddf │ │ │ ├── 76 │ │ │ │ └── 80e06311ecfb001515bcce532dee9874 │ │ │ ├── 79 │ │ │ │ ├── 00d28c400ffb001514a6f02b616b228d │ │ │ │ └── d0295c70ecfb001515bcce532dee9874 │ │ │ ├── 80 │ │ │ │ ├── 20eacf44e4fb001511408be01e52e74b │ │ │ │ └── 902865ecd0fb00151cf686a16d520ddf │ │ │ ├── 81 │ │ │ │ └── 600da5b7e8fb001515bcce532dee9874 │ │ │ ├── 82 │ │ │ │ ├── 60046919eafb001515bcce532dee9874 │ │ │ │ ├── 70da88c2d6fb00151cf686a16d520ddf │ │ │ │ ├── f03f754cd0fb00151cf686a16d520ddf │ │ │ │ └── f0f42ef6d0fb00151cf686a16d520ddf │ │ │ ├── 83 │ │ │ │ ├── 00c7044dd6fb00151cf686a16d520ddf │ │ │ │ └── 409d4a796ef900151291e6e57074fb2f │ │ │ ├── 84 │ │ │ │ ├── 109e1fa4ebfb001515bcce532dee9874 │ │ │ │ ├── 505a2e0fd5fb00151cf686a16d520ddf │ │ │ │ └── 70e6406011fb001514a6f02b616b228d │ │ │ ├── 85 │ │ │ │ └── 5064814236fb00151b6fb62373bed4e9 │ │ │ ├── 86 │ │ │ │ ├── a0b0806ad6fb00151cf686a16d520ddf │ │ │ │ ├── c0f790a670f900151291e6e57074fb2f │ │ │ │ └── e06acfa671f900151291e6e57074fb2f │ │ │ ├── 87 │ │ │ │ ├── 60154a8037fb00151b6fb62373bed4e9 │ │ │ │ └── a0df487270f900151291e6e57074fb2f │ │ │ ├── 89 │ │ │ │ └── f081005f37fb00151b6fb62373bed4e9 │ │ │ ├── 90 │ │ │ │ └── 50a1682770f900151291e6e57074fb2f │ │ │ ├── 91 │ │ │ │ └── 00d416a00ffb001514a6f02b616b228d │ │ │ ├── 92 │ │ │ │ └── 807df328d5fb00151cf686a16d520ddf │ │ │ ├── 93 │ │ │ │ └── 50506611d2fb00151cf686a16d520ddf │ │ │ ├── 94 │ │ │ │ ├── 0067a5c1d0fb00151cf686a16d520ddf │ │ │ │ ├── 405bf7abe7fb001515bcce532dee9874 │ │ │ │ └── 60947338d6fb00151cf686a16d520ddf │ │ │ ├── 95 │ │ │ │ └── 70fcf554cefb00151cf686a16d520ddf │ │ │ ├── 96 │ │ │ │ ├── 0048c82938fb00151b6fb62373bed4e9 │ │ │ │ ├── 00816aadecfb001515bcce532dee9874 │ │ │ │ └── 10112da5d8fb00151cf686a16d520ddf │ │ │ ├── 97 │ │ │ │ ├── 40ab4e41e7fb001515bcce532dee9874 │ │ │ │ └── d0e282336ff900151291e6e57074fb2f │ │ │ ├── 98 │ │ │ │ └── a0c3f597d5fb00151cf686a16d520ddf │ │ │ ├── 99 │ │ │ │ ├── 305e04e5d6fb00151cf686a16d520ddf │ │ │ │ └── 907db820ccfb00151cf686a16d520ddf │ │ │ ├── 1a │ │ │ │ ├── 30b6a8ab0ffb001514a6f02b616b228d │ │ │ │ ├── c0195775d0fb00151cf686a16d520ddf │ │ │ │ ├── c08cddb6eafb001515bcce532dee9874 │ │ │ │ ├── d0a3ba63d5fb00151cf686a16d520ddf │ │ │ │ └── f04a69f471f900151291e6e57074fb2f │ │ │ ├── 1b │ │ │ │ ├── 4057576b36fb00151b6fb62373bed4e9 │ │ │ │ ├── 80efd779e7fb001515bcce532dee9874 │ │ │ │ └── a09af232e9fb001515bcce532dee9874 │ │ │ ├── 1c │ │ │ │ └── 50c9b98bd6fb00151cf686a16d520ddf │ │ │ ├── 2b │ │ │ │ └── 40d84444d0fb00151cf686a16d520ddf │ │ │ ├── 2e │ │ │ │ ├── 007b08aad0fb00151cf686a16d520ddf │ │ │ │ ├── 20c601e5d6fb00151cf686a16d520ddf │ │ │ │ ├── 9077d247ebfb001515bcce532dee9874 │ │ │ │ └── f04da0d4ebfb001515bcce532dee9874 │ │ │ ├── 2f │ │ │ │ ├── d0ee306470f900151291e6e57074fb2f │ │ │ │ └── e01d0ec00ffb001514a6f02b616b228d │ │ │ ├── 3a │ │ │ │ ├── 30b2a49438fb00151b6fb62373bed4e9 │ │ │ │ └── 40f57af6d4fb00151cf686a16d520ddf │ │ │ ├── 3c │ │ │ │ └── a0acd1d2e4fb001511408be01e52e74b │ │ │ ├── 3d │ │ │ │ └── 40c3fed238fb00151b6fb62373bed4e9 │ │ │ ├── 3e │ │ │ │ ├── 104540e2eafb001515bcce532dee9874 │ │ │ │ └── a0cdae3d36fb00151b6fb62373bed4e9 │ │ │ ├── 3f │ │ │ │ ├── 80debfebe9fb001515bcce532dee9874 │ │ │ │ └── f0cfc909edfb001515bcce532dee9874 │ │ │ ├── 4a │ │ │ │ └── 306fcb4dd2fb00151cf686a16d520ddf │ │ │ ├── 4b │ │ │ │ └── d0e9b7d0e3fb001511408be01e52e74b │ │ │ ├── 4c │ │ │ │ └── c0e5a35a0ffb001514a6f02b616b228d │ │ │ ├── 4d │ │ │ │ ├── a0a2fd17ecfb001515bcce532dee9874 │ │ │ │ └── a0c5a75570f900151291e6e57074fb2f │ │ │ ├── 4f │ │ │ │ └── 0087c32ed5fb00151cf686a16d520ddf │ │ │ ├── 5b │ │ │ │ └── 607b50c5d5fb00151cf686a16d520ddf │ │ │ ├── 5d │ │ │ │ └── 9080c77de4fb001511408be01e52e74b │ │ │ ├── 5e │ │ │ │ ├── 80002a41ccfb00151cf686a16d520ddf │ │ │ │ └── b0a5d36f38fb00151b6fb62373bed4e9 │ │ │ ├── 5f │ │ │ │ └── 20b03045d6fb00151cf686a16d520ddf │ │ │ ├── 6a │ │ │ │ ├── 00a8b863d5fb00151cf686a16d520ddf │ │ │ │ └── f0747879e8fb001515bcce532dee9874 │ │ │ ├── 6b │ │ │ │ ├── 00131517cefb00151cf686a16d520ddf │ │ │ │ ├── 907e8b06d1fb00151cf686a16d520ddf │ │ │ │ └── 90f2d358d1fb00151cf686a16d520ddf │ │ │ ├── 6c │ │ │ │ ├── 00ce366ae4fb001511408be01e52e74b │ │ │ │ └── f01c0de06ff900151291e6e57074fb2f │ │ │ ├── 6d │ │ │ │ └── 20842a8ce4fb001511408be01e52e74b │ │ │ ├── 6f │ │ │ │ └── a083b86e36fb00151b6fb62373bed4e9 │ │ │ ├── 7a │ │ │ │ └── 00e2439671f900151291e6e57074fb2f │ │ │ ├── 7b │ │ │ │ ├── 404b459a0cfb001514a6f02b616b228d │ │ │ │ ├── 409d4db938fb00151b6fb62373bed4e9 │ │ │ │ └── 40c89c8bd2fb00151cf686a16d520ddf │ │ │ ├── 7c │ │ │ │ ├── 10937b6cd2fb00151cf686a16d520ddf │ │ │ │ └── 30dbb89937fb00151b6fb62373bed4e9 │ │ │ ├── 7e │ │ │ │ └── a01cfee4d6fb00151cf686a16d520ddf │ │ │ ├── 8b │ │ │ │ └── 80f51c9fd1fb00151cf686a16d520ddf │ │ │ ├── 8c │ │ │ │ └── d046db6f38fb00151b6fb62373bed4e9 │ │ │ ├── 8d │ │ │ │ ├── f0048be4d5fb00151cf686a16d520ddf │ │ │ │ └── f09c21b1e9fb001515bcce532dee9874 │ │ │ ├── 8e │ │ │ │ ├── e0d3398871f900151291e6e57074fb2f │ │ │ │ └── f077358e37fb00151b6fb62373bed4e9 │ │ │ ├── 8f │ │ │ │ └── b074064dd6fb00151cf686a16d520ddf │ │ │ ├── 9b │ │ │ │ ├── 008699eed6fb00151cf686a16d520ddf │ │ │ │ ├── 20050423d5fb00151cf686a16d520ddf │ │ │ │ └── d0669a0136fb00151b6fb62373bed4e9 │ │ │ ├── 9c │ │ │ │ ├── 101f985b36fb00151b6fb62373bed4e9 │ │ │ │ ├── 9022eaeeccfb00151cf686a16d520ddf │ │ │ │ └── e050591136fb00151b6fb62373bed4e9 │ │ │ ├── 9d │ │ │ │ └── a0a0eab3ecfb001515bcce532dee9874 │ │ │ ├── 9e │ │ │ │ ├── 90019ed0d5fb00151cf686a16d520ddf │ │ │ │ ├── b07eab150ffb001514a6f02b616b228d │ │ │ │ └── c07ffff971f900151291e6e57074fb2f │ │ │ ├── 9f │ │ │ │ ├── 305c2815e4fb001511408be01e52e74b │ │ │ │ └── b025a32f71f900151291e6e57074fb2f │ │ │ ├── a │ │ │ │ └── b043efccd0fb00151cf686a16d520ddf │ │ │ ├── a1 │ │ │ │ ├── 10797b56d0fb00151cf686a16d520ddf │ │ │ │ ├── 3097fcb6cefb00151cf686a16d520ddf │ │ │ │ └── a04ddc0572f900151291e6e57074fb2f │ │ │ ├── a2 │ │ │ │ └── f0479a360ffb001514a6f02b616b228d │ │ │ ├── a3 │ │ │ │ ├── 30cb8de30ffb001514a6f02b616b228d │ │ │ │ └── b02477f6d4fb00151cf686a16d520ddf │ │ │ ├── a4 │ │ │ │ └── c0ad1635d6fb00151cf686a16d520ddf │ │ │ ├── a9 │ │ │ │ ├── 10f942dde3fb001511408be01e52e74b │ │ │ │ └── 909e0d1be8fb001515bcce532dee9874 │ │ │ ├── aa │ │ │ │ └── b02ff256d0fb00151cf686a16d520ddf │ │ │ ├── ad │ │ │ │ ├── 608feeeeccfb00151cf686a16d520ddf │ │ │ │ ├── 6095e8a4d5fb00151cf686a16d520ddf │ │ │ │ └── d04f632b37fb00151b6fb62373bed4e9 │ │ │ ├── ae │ │ │ │ ├── 3029a5a16ff900151291e6e57074fb2f │ │ │ │ └── 40392b3ee9fb001515bcce532dee9874 │ │ │ ├── b0 │ │ │ │ ├── c0d4b77ad2fb00151cf686a16d520ddf │ │ │ │ └── e02844546ef900151291e6e57074fb2f │ │ │ ├── b1 │ │ │ │ └── f036907c11fb001514a6f02b616b228d │ │ │ ├── b2 │ │ │ │ └── a011838035fb00151b6fb62373bed4e9 │ │ │ ├── b3 │ │ │ │ ├── 004a527911fb001514a6f02b616b228d │ │ │ │ ├── 00b8dbb6eafb001515bcce532dee9874 │ │ │ │ └── f0fbd45538fb00151b6fb62373bed4e9 │ │ │ ├── b4 │ │ │ │ └── f0ef0a27ecfb001515bcce532dee9874 │ │ │ ├── b6 │ │ │ │ └── 9049f4c571f900151291e6e57074fb2f │ │ │ ├── b7 │ │ │ │ └── 00767ac2ebfb001515bcce532dee9874 │ │ │ ├── b8 │ │ │ │ ├── 2068206938fb00151b6fb62373bed4e9 │ │ │ │ └── 802680c4eafb001515bcce532dee9874 │ │ │ ├── ba │ │ │ │ ├── 4059551136fb00151b6fb62373bed4e9 │ │ │ │ ├── a0e0cf7236fb00151b6fb62373bed4e9 │ │ │ │ └── f04e6c9be4fb001511408be01e52e74b │ │ │ ├── bb │ │ │ │ ├── 10e4d4a0e4fb001511408be01e52e74b │ │ │ │ └── 309bd07b37fb00151b6fb62373bed4e9 │ │ │ ├── bc │ │ │ │ ├── 109a54c5d5fb00151cf686a16d520ddf │ │ │ │ └── 6032c5f86ef900151291e6e57074fb2f │ │ │ ├── bd │ │ │ │ └── f0c854eee3fb001511408be01e52e74b │ │ │ ├── be │ │ │ │ └── b09ad2fb35fb00151b6fb62373bed4e9 │ │ │ ├── bf │ │ │ │ └── 90e86c2fe4fb001511408be01e52e74b │ │ │ ├── c │ │ │ │ └── 90aa315dd5fb00151cf686a16d520ddf │ │ │ ├── c0 │ │ │ │ └── 900c3fe2eafb001515bcce532dee9874 │ │ │ ├── c2 │ │ │ │ └── 70cfbbf1e8fb001515bcce532dee9874 │ │ │ ├── c3 │ │ │ │ └── 00fc401138fb00151b6fb62373bed4e9 │ │ │ ├── c4 │ │ │ │ └── d0d4d6b6d0fb00151cf686a16d520ddf │ │ │ ├── c6 │ │ │ │ ├── 70180b3970f900151291e6e57074fb2f │ │ │ │ └── f0efd98b6ff900151291e6e57074fb2f │ │ │ ├── c7 │ │ │ │ └── c0f549ebeafb001515bcce532dee9874 │ │ │ ├── c8 │ │ │ │ ├── f0dcd724e4fb001511408be01e52e74b │ │ │ │ └── f0e37a9ee3fb001511408be01e52e74b │ │ │ ├── c9 │ │ │ │ ├── 400b9c8e71f900151291e6e57074fb2f │ │ │ │ ├── 40a4abb0d6fb00151cf686a16d520ddf │ │ │ │ ├── 80c0dc5eebfb001515bcce532dee9874 │ │ │ │ └── c07f1f6238fb00151b6fb62373bed4e9 │ │ │ ├── cb │ │ │ │ └── 500e695acdfb00151cf686a16d520ddf │ │ │ ├── cc │ │ │ │ ├── 50e8053970f900151291e6e57074fb2f │ │ │ │ └── a0d408adcefb00151cf686a16d520ddf │ │ │ ├── cd │ │ │ │ ├── 207deec8eafb001515bcce532dee9874 │ │ │ │ ├── 3018af4d0ffb001514a6f02b616b228d │ │ │ │ ├── 4069fa54cefb00151cf686a16d520ddf │ │ │ │ ├── 50685370cdfb00151cf686a16d520ddf │ │ │ │ └── 80a604ead4fb00151cf686a16d520ddf │ │ │ ├── ce │ │ │ │ └── b0c8ac6a70f900151291e6e57074fb2f │ │ │ ├── cf │ │ │ │ ├── 3003940e71f900151291e6e57074fb2f │ │ │ │ └── e004be46ecfb001515bcce532dee9874 │ │ │ ├── d │ │ │ │ └── 306fbdaa38fb00151b6fb62373bed4e9 │ │ │ ├── d0 │ │ │ │ ├── 0031a37ed8fb00151cf686a16d520ddf │ │ │ │ └── 00a60827ecfb001515bcce532dee9874 │ │ │ ├── d2 │ │ │ │ ├── 00ebf72a0ffb001514a6f02b616b228d │ │ │ │ └── b0fa15ed0ffb001514a6f02b616b228d │ │ │ ├── d3 │ │ │ │ └── 2003cfc3e3fb001511408be01e52e74b │ │ │ ├── d5 │ │ │ │ ├── 003fa65570f900151291e6e57074fb2f │ │ │ │ └── 104d9702e9fb001515bcce532dee9874 │ │ │ ├── d6 │ │ │ │ └── 5049336937fb00151b6fb62373bed4e9 │ │ │ ├── d7 │ │ │ │ └── f09b24de71f900151291e6e57074fb2f │ │ │ ├── d8 │ │ │ │ └── 309602c7ebfb001515bcce532dee9874 │ │ │ ├── d9 │ │ │ │ ├── 104a03b1eafb001515bcce532dee9874 │ │ │ │ └── 30ad1b6938fb00151b6fb62373bed4e9 │ │ │ ├── da │ │ │ │ └── 50192b6febfb001515bcce532dee9874 │ │ │ ├── db │ │ │ │ └── 60632e1ee4fb001511408be01e52e74b │ │ │ ├── dc │ │ │ │ └── 6083edb90ffb001514a6f02b616b228d │ │ │ ├── e │ │ │ │ ├── 004790dde9fb001515bcce532dee9874 │ │ │ │ ├── 101e3e75d1fb00151cf686a16d520ddf │ │ │ │ └── 7087629a70f900151291e6e57074fb2f │ │ │ ├── e0 │ │ │ │ ├── 303cc40e38fb00151b6fb62373bed4e9 │ │ │ │ └── 8090f069d4fb00151cf686a16d520ddf │ │ │ ├── e2 │ │ │ │ ├── e03f2b14d6fb00151cf686a16d520ddf │ │ │ │ └── f07f193f6ff900151291e6e57074fb2f │ │ │ ├── e3 │ │ │ │ ├── b0702312d0fb00151cf686a16d520ddf │ │ │ │ └── e057584038fb00151b6fb62373bed4e9 │ │ │ ├── e5 │ │ │ │ ├── 50aca42f71f900151291e6e57074fb2f │ │ │ │ ├── 80be9b1471f900151291e6e57074fb2f │ │ │ │ └── 90d3446aebfb001515bcce532dee9874 │ │ │ ├── e6 │ │ │ │ └── 30793f8871f900151291e6e57074fb2f │ │ │ ├── e7 │ │ │ │ └── b0e56164e8fb001515bcce532dee9874 │ │ │ ├── e8 │ │ │ │ └── 307f0b23d5fb00151cf686a16d520ddf │ │ │ ├── e9 │ │ │ │ ├── 603bb99070f900151291e6e57074fb2f │ │ │ │ ├── 6073413ad2fb00151cf686a16d520ddf │ │ │ │ └── a00380de38fb00151b6fb62373bed4e9 │ │ │ ├── eb │ │ │ │ └── e014ed28d5fb00151cf686a16d520ddf │ │ │ ├── ec │ │ │ │ └── 10e4cd4cccfb00151cf686a16d520ddf │ │ │ ├── ed │ │ │ │ └── b0db91fce8fb001515bcce532dee9874 │ │ │ ├── ef │ │ │ │ ├── 00d41a00ecfb001515bcce532dee9874 │ │ │ │ └── a068bc7ad2fb00151cf686a16d520ddf │ │ │ ├── f │ │ │ │ └── 605bdbcb0ffb001514a6f02b616b228d │ │ │ ├── f0 │ │ │ │ ├── 201ea7e5e7fb001515bcce532dee9874 │ │ │ │ ├── 6054e28b6ff900151291e6e57074fb2f │ │ │ │ └── 8099c2e8e8fb001515bcce532dee9874 │ │ │ ├── f1 │ │ │ │ ├── 2088963cecfb001515bcce532dee9874 │ │ │ │ ├── 400e1565d6fb00151cf686a16d520ddf │ │ │ │ └── 5007f44eebfb001515bcce532dee9874 │ │ │ ├── f2 │ │ │ │ └── 804ca167d8fb00151cf686a16d520ddf │ │ │ ├── f3 │ │ │ │ └── d069e0c438fb00151b6fb62373bed4e9 │ │ │ ├── f4 │ │ │ │ └── 1060bb7be8fb001515bcce532dee9874 │ │ │ ├── f5 │ │ │ │ └── a0ae05c9eafb001515bcce532dee9874 │ │ │ ├── f8 │ │ │ │ └── 804c894338fb00151b6fb62373bed4e9 │ │ │ ├── f9 │ │ │ │ └── 10857edae7fb001515bcce532dee9874 │ │ │ ├── fa │ │ │ │ ├── 703cc14ad2fb00151cf686a16d520ddf │ │ │ │ ├── a070b756d0fb00151cf686a16d520ddf │ │ │ │ └── d02d802b0ffb001514a6f02b616b228d │ │ │ ├── fc │ │ │ │ ├── 909c58fb70f900151291e6e57074fb2f │ │ │ │ └── f06926e0e3fb001511408be01e52e74b │ │ │ ├── fd │ │ │ │ └── c0fe173cebfb001515bcce532dee9874 │ │ │ ├── fe │ │ │ │ └── 004db90072f900151291e6e57074fb2f │ │ │ └── ff │ │ │ │ └── 90b3b72fecfb001515bcce532dee9874 │ │ ├── .projects │ │ │ ├── ROUND_1_A │ │ │ │ ├── .indexes │ │ │ │ │ ├── 92 │ │ │ │ │ │ └── history.index │ │ │ │ │ └── af │ │ │ │ │ │ └── history.index │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ │ └── state.dat │ │ │ ├── ROUND_1_B │ │ │ │ ├── .indexes │ │ │ │ │ ├── 92 │ │ │ │ │ │ └── history.index │ │ │ │ │ ├── af │ │ │ │ │ │ └── history.index │ │ │ │ │ └── e4 │ │ │ │ │ │ └── history.index │ │ │ │ ├── .markers │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ │ └── state.dat │ │ │ ├── ROUND_2_A │ │ │ │ ├── .indexes │ │ │ │ │ ├── 92 │ │ │ │ │ │ └── history.index │ │ │ │ │ ├── af │ │ │ │ │ │ └── history.index │ │ │ │ │ └── e4 │ │ │ │ │ │ └── history.index │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ │ └── state.dat │ │ │ ├── ROUND_2_B │ │ │ │ ├── .indexes │ │ │ │ │ ├── 92 │ │ │ │ │ │ └── history.index │ │ │ │ │ ├── af │ │ │ │ │ │ └── history.index │ │ │ │ │ └── e4 │ │ │ │ │ │ └── history.index │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ │ └── state.dat │ │ │ ├── ROUND_3_A │ │ │ │ ├── .indexes │ │ │ │ │ ├── 92 │ │ │ │ │ │ └── history.index │ │ │ │ │ ├── af │ │ │ │ │ │ └── history.index │ │ │ │ │ └── e4 │ │ │ │ │ │ └── history.index │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ │ └── state.dat │ │ │ ├── ROUND_3_B │ │ │ │ ├── .indexes │ │ │ │ │ ├── 92 │ │ │ │ │ │ └── history.index │ │ │ │ │ ├── af │ │ │ │ │ │ └── history.index │ │ │ │ │ └── e4 │ │ │ │ │ │ └── history.index │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ │ └── state.dat │ │ │ ├── ROUND_4_A │ │ │ │ ├── .indexes │ │ │ │ │ ├── af │ │ │ │ │ │ └── history.index │ │ │ │ │ └── e4 │ │ │ │ │ │ ├── e3 │ │ │ │ │ │ └── history.index │ │ │ │ │ │ └── history.index │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ │ └── state.dat │ │ │ ├── ROUND_4_B │ │ │ │ ├── .indexes │ │ │ │ │ ├── 92 │ │ │ │ │ │ └── history.index │ │ │ │ │ ├── af │ │ │ │ │ │ └── history.index │ │ │ │ │ └── e4 │ │ │ │ │ │ ├── e3 │ │ │ │ │ │ └── history.index │ │ │ │ │ │ └── history.index │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ │ └── state.dat │ │ │ ├── ROUND_5_A │ │ │ │ ├── .indexes │ │ │ │ │ ├── 92 │ │ │ │ │ │ └── history.index │ │ │ │ │ ├── af │ │ │ │ │ │ └── history.index │ │ │ │ │ └── e4 │ │ │ │ │ │ └── history.index │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ │ └── state.dat │ │ │ └── ROUND_5_B │ │ │ │ ├── .indexes │ │ │ │ ├── 92 │ │ │ │ │ └── history.index │ │ │ │ ├── af │ │ │ │ │ └── history.index │ │ │ │ └── e4 │ │ │ │ │ └── history.index │ │ │ │ └── org.eclipse.jdt.core │ │ │ │ └── state.dat │ │ ├── .root │ │ │ ├── .indexes │ │ │ │ ├── history.version │ │ │ │ ├── properties.index │ │ │ │ └── properties.version │ │ │ └── 7.tree │ │ └── .safetable │ │ │ └── org.eclipse.core.resources │ ├── org.eclipse.core.runtime │ │ └── .settings │ │ │ ├── org.eclipse.core.resources.prefs │ │ │ ├── org.eclipse.debug.ui.prefs │ │ │ ├── org.eclipse.help.base.prefs │ │ │ ├── org.eclipse.help.ui.prefs │ │ │ ├── org.eclipse.jdt.core.prefs │ │ │ ├── org.eclipse.jdt.launching.prefs │ │ │ ├── org.eclipse.jdt.ui.prefs │ │ │ ├── org.eclipse.m2e.discovery.prefs │ │ │ ├── org.eclipse.pde.api.tools.prefs │ │ │ ├── org.eclipse.team.ui.prefs │ │ │ ├── org.eclipse.ui.editors.prefs │ │ │ ├── org.eclipse.ui.ide.prefs │ │ │ ├── org.eclipse.ui.prefs │ │ │ └── org.eclipse.ui.workbench.prefs │ ├── org.eclipse.debug.core │ │ └── .launches │ │ │ ├── (default package) (1).launch │ │ │ ├── (default package) (2).launch │ │ │ ├── (default package) (3).launch │ │ │ ├── (default package) (4).launch │ │ │ ├── (default package) (5).launch │ │ │ ├── (default package).launch │ │ │ ├── FibonacciIndexEdgeCaseTests (1).launch │ │ │ ├── FibonacciIndexEdgeCaseTests.launch │ │ │ ├── FibonacciIndexTests.zzubZzifOfOneIsOne.launch │ │ │ ├── FibonacciIndexerHappyPathTests.launch │ │ │ ├── FootballScoreStatsTests.totalsFootballScoresForTeam.launch │ │ │ ├── LibraryTests.donatedTitlesAreAddedToLibraryWithOneDefaultCopy (1).launch │ │ │ ├── LibraryTests.donatedTitlesAreAddedToLibraryWithOneDefaultCopy.launch │ │ │ ├── LibraryTests.launch │ │ │ ├── MathsTests (1).launch │ │ │ ├── MathsTests.launch │ │ │ ├── MathsTests.rootOfOneIsOne.launch │ │ │ ├── SorterTests.bubblesortPutsArrayInAscendingOrder.launch │ │ │ ├── SorterTests.launch │ │ │ ├── test (1).launch │ │ │ └── test.launch │ ├── org.eclipse.debug.ui │ │ ├── dialog_settings.xml │ │ └── launchConfigurationHistory.xml │ ├── org.eclipse.e4.workbench │ │ └── workbench.xmi │ ├── org.eclipse.jdt.core │ │ ├── 1696548855.index │ │ ├── 1798035612.index │ │ ├── 2151800701.index │ │ ├── 2280677819.index │ │ ├── 2286021782.index │ │ ├── 2307098273.index │ │ ├── 2362216484.index │ │ ├── 2366568979.index │ │ ├── 2403877962.index │ │ ├── 2480785936.index │ │ ├── 277534491.index │ │ ├── 2818633721.index │ │ ├── 2832260077.index │ │ ├── 289979692.index │ │ ├── 2923255570.index │ │ ├── 3127670531.index │ │ ├── 336047017.index │ │ ├── 3575595675.index │ │ ├── 365281694.index │ │ ├── 373364208.index │ │ ├── 3972768014.index │ │ ├── 4170630083.index │ │ ├── 741379379.index │ │ ├── 859690871.index │ │ ├── 927718159.index │ │ ├── 958386498.index │ │ ├── externalLibsTimeStamps │ │ ├── invalidArchivesCache │ │ ├── javaLikeNames.txt │ │ ├── nonChainingJarsCache │ │ ├── savedIndexNames.txt │ │ └── variablesAndContainers.dat │ ├── org.eclipse.jdt.junit │ │ └── dialog_settings.xml │ ├── org.eclipse.jdt.launching │ │ ├── .install.xml │ │ └── libraryInfos.xml │ ├── org.eclipse.jdt.ui │ │ ├── OpenTypeHistory.xml │ │ ├── QualifiedTypeNameHistory.xml │ │ └── dialog_settings.xml │ ├── org.eclipse.ltk.core.refactoring │ │ └── .refactorings │ │ │ ├── .workspace │ │ │ └── 2016 │ │ │ │ └── 4 │ │ │ │ ├── 13 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ │ └── 14 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ ├── ROUND_1_A │ │ │ └── 2016 │ │ │ │ └── 4 │ │ │ │ └── 14 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ ├── ROUND_1_B │ │ │ └── 2016 │ │ │ │ └── 4 │ │ │ │ └── 14 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ ├── ROUND_2_A │ │ │ └── 2016 │ │ │ │ └── 4 │ │ │ │ └── 13 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ ├── ROUND_2_B │ │ │ └── 2016 │ │ │ │ └── 4 │ │ │ │ └── 13 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ ├── ROUND_3_A │ │ │ └── 2016 │ │ │ │ └── 4 │ │ │ │ └── 14 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ ├── ROUND_3_B │ │ │ └── 2016 │ │ │ │ └── 4 │ │ │ │ └── 14 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ ├── ROUND_4_A │ │ │ └── 2016 │ │ │ │ └── 4 │ │ │ │ └── 14 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ ├── ROUND_4_B │ │ │ └── 2016 │ │ │ │ └── 4 │ │ │ │ └── 14 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ ├── ROUND_5_A │ │ │ └── 2016 │ │ │ │ └── 4 │ │ │ │ └── 13 │ │ │ │ ├── refactorings.history │ │ │ │ └── refactorings.index │ │ │ └── ROUND_5_B │ │ │ └── 2016 │ │ │ └── 4 │ │ │ ├── 13 │ │ │ ├── refactorings.history │ │ │ └── refactorings.index │ │ │ └── 14 │ │ │ ├── refactorings.history │ │ │ └── refactorings.index │ ├── org.eclipse.ltk.ui.refactoring │ │ └── dialog_settings.xml │ ├── org.eclipse.m2e.logback.configuration │ │ ├── 0.log │ │ └── logback.1.4.0.20130601-0317.xml │ ├── org.eclipse.pde.core │ │ └── .cache │ │ │ └── clean-cache.properties │ ├── org.eclipse.ui.intro │ │ └── dialog_settings.xml │ ├── org.eclipse.ui.workbench.texteditor │ │ └── dialog_settings.xml │ └── org.eclipse.ui.workbench │ │ ├── dialog_settings.xml │ │ └── workingsets.xml └── version.ini ├── ROUND_1_A ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ └── FibonacciIndexTests.class └── test │ └── FibonacciIndexTests.java ├── ROUND_1_B ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── FibonacciIndexEdgeCaseTests.class │ ├── FibonacciIndexer.class │ └── FibonacciIndexerHappyPathTests.class ├── src │ └── FibonacciIndexer.java └── test │ ├── FibonacciIndexEdgeCaseTests.java │ └── FibonacciIndexerHappyPathTests.java ├── ROUND_2_A ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── FootballData.class │ ├── FootballScoreStats.class │ ├── FootballScoreStatsTests.class │ └── Game.class ├── src │ ├── FootballData.java │ ├── FootballScoreStats.java │ └── Game.java └── test │ └── FootballScoreStatsTests.java ├── ROUND_2_B ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── FootballData.class │ ├── FootballScoreStats.class │ ├── FootballScoreStatsTests.class │ ├── Game.class │ └── GameData.class ├── src │ ├── FootballData.java │ ├── FootballScoreStats.java │ ├── Game.java │ └── GameData.java └── test │ └── FootballScoreStatsTests.java ├── ROUND_3_A ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── SortKind.class │ ├── Sorter.class │ └── SorterTests.class ├── src │ ├── SortKind.java │ └── Sorter.java └── test │ └── SorterTests.java ├── ROUND_3_B ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── BubbleSort.class │ ├── InsertionSort.class │ ├── QuickSort.class │ ├── Sort.class │ ├── Sorter.class │ └── SorterTests.class ├── src │ ├── BubbleSort.java │ ├── InsertionSort.java │ ├── QuickSort.java │ ├── Sort.java │ └── Sorter.java └── test │ └── SorterTests.java ├── ROUND_4_A ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── Library.class │ └── LibraryTests.class └── src │ ├── Library.java │ └── LibraryTests.java ├── ROUND_4_B ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── Library.class │ ├── LibraryTests.class │ ├── Member.class │ └── Title.class ├── src │ ├── Library.java │ ├── Member.java │ └── Title.java └── test │ └── LibraryTests.java ├── ROUND_5_A ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── Maths.class │ └── MathsTests.class ├── src │ └── Maths.java └── test │ └── MathsTests.java └── ROUND_5_B ├── .classpath ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── bin ├── Maths.class └── MathsTests.class ├── src └── Maths.java └── test └── MathsTests.java /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /.metadata/.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.lock -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/0/40ac5c1136fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public enum SortKind { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/10/30ff26a9d1fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | private String name; 4 | private String donorId; 5 | 6 | public Title(String name, String donorId) { 7 | super(); 8 | this.name = name; 9 | this.donorId = donorId; 10 | } 11 | 12 | protected int getCopyCount(Object[] title) { 13 | return (int)title[2]; 14 | } 15 | 16 | protected String getDonor(Object[] title) { 17 | return donorId; 18 | } 19 | 20 | protected String getTitleName(Object[] title) { 21 | return (String) title[0]; 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/10/609518de6ef900151291e6e57074fb2f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/10/609518de6ef900151291e6e57074fb2f -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/10/e09d2578e2fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.7 8 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/11/d09b88ec6ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FootballScoreStatsTests { 7 | 8 | @Test 9 | public void totalsFootballScoresForTeam() { 10 | FootballScoreStats stats = new FootballScoreStats(); 11 | assertEquals(22, stats.teamTotal("Liverpool FC")); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/12/c0b45aea6ef900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FootballScoreStatsTests { 7 | 8 | @Test 9 | public void test() { 10 | fail("Not yet implemented"); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/14/2066839e38fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class SorterTests { 7 | 8 | @Test 9 | public void bubblesortPutsArrayInAscendingOrder() { 10 | int[] array = {3,1,2}; 11 | array = new Sorter().sort(new BubbleSort(), array); 12 | assertArrayEquals(new int[]{1,2,3}, array ); 13 | } 14 | 15 | @Test 16 | public void quicksortPutsArrayInAscendingOrder() { 17 | int[] array = {3,1,2}; 18 | array = new Sorter().sort(new QuickSort(), array); 19 | assertArrayEquals(new int[]{1,2,3}, array ); 20 | } 21 | 22 | @Test 23 | public void insertionsortPutsArrayInAscendingOrder() { 24 | int[] array = {3,1,2}; 25 | array = new Sorter().sort(SortKind.INSERTION, array); 26 | assertArrayEquals(new int[]{1,2,3}, array ); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/14/e0aade8b6ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballData { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/15/a0513e35e4fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | private final int expectedIndex; 9 | 10 | 11 | public FibonacciIndexTests() { 12 | expectedIndex = 0; 13 | } 14 | 15 | @Test 16 | public void indexOfZeroIsZero() { 17 | int fibonacci = 0; 18 | assertEquals(expectedIndex, findIndexOf(fibonacci)); 19 | } 20 | 21 | @Test 22 | public void indexOfOneIsOne() { 23 | assertEquals(1, findIndexOf(1)); 24 | } 25 | 26 | @Test 27 | public void indexOfTwoIsThree() { 28 | assertEquals(3, findIndexOf(2)); 29 | } 30 | 31 | 32 | private int findIndexOf(int fibonacci) { 33 | if(fibonacci < 2){ 34 | return fibonacci; 35 | } 36 | return 3; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/16/20e44fb06ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class Game { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/16/e03c3d06e4fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | @Test 9 | public void indexOfZeroIsZero() { 10 | assertEquals(0, findIndexOf(0)); 11 | } 12 | 13 | @Test 14 | public void indexOfOneIsOne() { 15 | assertEquals(1, findIndexOf(1)); 16 | } 17 | 18 | @Test 19 | public void indexOfTwoIsThree() { 20 | assertEquals(3, findIndexOf(2)); 21 | } 22 | 23 | 24 | private int findIndexOf(int fibonacci) { 25 | return fibonacci; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/17/80492718d2fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | 7 | public Title(String name, String donorId) { 8 | this.name = name; 9 | this.donorId = donorId; 10 | } 11 | 12 | protected int getCopyCount(Object[] title) { 13 | int copyCount = (int)title[2]; 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor(Object[] title) { 18 | return donorId; 19 | } 20 | 21 | protected String getTitleName(Object[] title) { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/18/8091c18bd6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private int copyCount = 1; 6 | private Member donor; 7 | 8 | public Title(String name, String donorId, Member donor) { 9 | this.name = name; 10 | this.donor = donor; 11 | } 12 | 13 | protected int getCopyCount() { 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor() { 18 | return donor.getId(); 19 | } 20 | 21 | protected String getTitleName() { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/1a/c0195775d0fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | package snippet; 2 | 3 | public class Snippet { 4 | public static void main(String[] args) { 5 | new HashMap() 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/1a/d0a3ba63d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Member { 7 | 8 | public LibraryTests() { 9 | donorMembershipId = "Jason123"; 10 | } 11 | 12 | @Test 13 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 14 | Library library = new Library(); 15 | String titleName = "Jaws 3D"; 16 | Title title = new Title(titleName, donorMembershipId); 17 | library.donate(title ); 18 | title = library.getTitles().get(titleName); 19 | assertEquals(titleName, title.getTitleName()); 20 | assertEquals(donorMembershipId, title.getDonor()); 21 | assertEquals(1, title.getCopyCount()); 22 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/1b/4057576b36fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class SorterTests { 7 | 8 | @Test 9 | public void bubblesortPutsArrayInAscendingOrder() { 10 | int[] array = {3,1,2}; 11 | array = new Sorter().sort(SortKind.BUBBLE, array); 12 | assertArrayEquals(new int[]{1,2,3}, array ); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/1c/50c9b98bd6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Member { 7 | 8 | public LibraryTests() { 9 | super("Jason123"); 10 | } 11 | 12 | @Test 13 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 14 | Library library = new Library(); 15 | String titleName = "Jaws 3D"; 16 | Member donor = new Member("Jason123"); 17 | Title title = new Title(titleName, membershipId, donor); 18 | library.donate(title ); 19 | title = library.getTitles().get(titleName); 20 | assertEquals(titleName, title.getTitleName()); 21 | assertEquals(membershipId, title.getDonor()); 22 | assertEquals(1, title.getCopyCount()); 23 | assertEquals(1, library.getTitlesDonatedByMember(membershipId).size()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/2/30534f8ed4fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | Title title = new Title(titleName, donorMembershipId); 14 | library.donate(titleName, donorMembershipId, title ); 15 | Title donatedTitle = library.getTitles().get(titleName); 16 | assertEquals(titleName, title.getTitleName(null)); 17 | assertEquals(donorMembershipId, title.getDonor(null)); 18 | assertEquals(1, title.getCopyCount(null)); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/2/8015f42be4fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | private final int expectedIndex; 9 | 10 | 11 | public FibonacciIndexTests() { 12 | expectedIndex = 0; 13 | } 14 | 15 | @Test 16 | public void indexOfZeroIsZero() { 17 | int fibonacci = 0; 18 | assertEquals(expectedIndex, findIndexOf(fibonacci)); 19 | } 20 | 21 | @Test 22 | public void indexOfOneIsOne() { 23 | assertEquals(1, findIndexOf(1)); 24 | } 25 | 26 | @Test 27 | public void indexOfTwoIsThree() { 28 | assertEquals(3, findIndexOf(2)); 29 | } 30 | 31 | 32 | private int findIndexOf(int fibonacci) { 33 | if(fibonacci < 2){ 34 | return fibonacci; 35 | } 36 | return 3; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/22/809b38b338fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class InsertionSort extends Sort { 3 | 4 | @Override 5 | public int[] sort(int[] input) { 6 | for (int i = 0; i < input.length - 1; i++) { 7 | for(int j = i+1;j > 0;j--){ 8 | if(input[j] < input[j-1]){ 9 | swap(input, j, j-1); 10 | } 11 | } 12 | } 13 | return input; 14 | } 15 | 16 | } 17 | 18 | 19 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/22/90c3b285d1fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | public Title(String name, String donorId) { 4 | super(); 5 | } 6 | 7 | protected int getCopyCount(Object[] title) { 8 | return (int)title[2]; 9 | } 10 | 11 | protected String getDonor(Object[] title) { 12 | return (String)title[1]; 13 | } 14 | 15 | protected String getTitleName(Object[] title) { 16 | return (String) title[0]; 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/23/e0e81a1a71f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | total += getTeamScore(teamName, game); 9 | } 10 | return total; 11 | } 12 | 13 | private int getTeamScore(String teamName, Game game) { 14 | int total 0; 15 | if(game.getHomeTeam().equals(teamName)){ 16 | total 0 = game.getHomeTeamScore(); 17 | } 18 | if(game.getAwayTeam().equals(teamName)){ 19 | total = game.getAwayTeamScore(); 20 | } 21 | return total; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/25/8030c72ed5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount = 1; 7 | 8 | public Title(String name, String donorId) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | } 12 | 13 | protected int getCopyCount() { 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor() { 18 | return donorId; 19 | } 20 | 21 | protected String getTitleName(Object[] title) { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/28/304d0e550ffb001514a6f02b616b228d: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class MathsTests { 7 | 8 | @Test 9 | public void rootOfOneIsOne() { 10 | double expected = 1; 11 | assertEquals(expected, Maths.sqrroot(expected) * Maths.sqrroot(expected), 1e-15); 12 | } 13 | 14 | @Test 15 | public void rootOfFourIsTwo() { 16 | assertEquals(2, Maths.sqrroot(4), 1e-15); 17 | } 18 | 19 | @Test 20 | public void rootOfNineIsThree() { 21 | assertEquals(3, Maths.sqrroot(9), 1e-15); 22 | } 23 | 24 | @Test 25 | public void rootOfSixteenIsFour() { 26 | assertEquals(4, Maths.sqrroot(16), 1e-15); 27 | } 28 | 29 | @Test 30 | public void rootOfTwoFiveIsPointFive() { 31 | assertEquals(0.5, Maths.sqrroot(0.25), 1e-15); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/28/b0fc9f7ed8fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorId = "Jason123"; 13 | Member donor = new Member(donorId); 14 | Title title = new Title(titleName, donor); 15 | library.donate(title ); 16 | title = library.getTitles().get(titleName); 17 | assertEquals(titleName, title.getTitleName()); 18 | assertEquals(donorId, title.getDonorId()); 19 | assertEquals(1, title.getCopyCount()); 20 | assertEquals(1, donor.getDonatedTitles().contains(title)); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/2e/007b08aad0fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | assertEquals(titleName, (String) donatedTitle[0]); 16 | assertEquals(donorMembershipId, (String)donatedTitle[1]); 17 | assertEquals(1, (int)donatedTitle[2]); 18 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/2e/20c601e5d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorId = "Jason123"; 13 | Member donor = new Member(donorId); 14 | Title title = new Title(titleName, donor); 15 | library.donate(title ); 16 | title = library.getTitles().get(titleName); 17 | assertEquals(titleName, title.getTitleName()); 18 | assertEquals(donorId, title.getDonor()); 19 | assertEquals(1, title.getCopyCount()); 20 | assertEquals(1, library.getTitlesDonatedByMember(donorId).size()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/3/00ab1d6238fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class QuickSort { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/3/90ce57ea6ef900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/30/b0f94004cefb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.Map; 2 | 3 | 4 | public class Library { 5 | 6 | public Map getTitles() { 7 | // TODO Auto-generated method stub 8 | return null; 9 | } 10 | 11 | public void donate(String titleName, String donorMembershipId) { 12 | // TODO Auto-generated method stub 13 | 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/31/d04a6c2770f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/32/c00aa734d0fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | assertEquals(titleName, (String) donatedTitle[0]); 16 | assertEquals(donorMembershipId, (String)donatedTitle[1]); 17 | assertEquals(1, (int)donatedTitle[2]); 18 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/32/c00f6912d1fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Title { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | Title title = new Title(); 16 | assertEquals(titleName, title.getTitleName(donatedTitle)); 17 | assertEquals(donorMembershipId, title.getDonor(donatedTitle)); 18 | assertEquals(1, getCopyCount(donatedTitle)); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/34/10a0f0c571f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballData { 3 | 4 | public Game[] getAllPlayed() { 5 | Game[] played = new Game[3]; 6 | played[0] = new Game("Liverpool", 2, "Everton", 0); 7 | played[1] = new Game("Aston Villa", 1, "Liverpool", 1); 8 | played[2] = new Game("Liverpool", 3, "West Ham", 1); 9 | return played; 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/34/d0e6deda71f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | private final GameData footballData; 5 | 6 | public FootballScoreStats(GameData data) { 7 | footballData = data; 8 | } 9 | 10 | public int teamTotal(String teamName) { 11 | int total = 0; 12 | Game[] played = footballData.getAllPlayed(); 13 | for (Game game : played) { 14 | total += game.getTeamScore(teamName); 15 | } 16 | return total; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/37/400f87abd1fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | private String name; 4 | private String donorId; 5 | 6 | public Title(String name, String donorId) { 7 | super(); 8 | this.name = name; 9 | this.donorId = donorId; 10 | } 11 | 12 | protected int getCopyCount(Object[] title) { 13 | return (int)title[2]; 14 | } 15 | 16 | protected String getDonor(Object[] title) { 17 | return donorId; 18 | } 19 | 20 | protected String getTitleName(Object[] title) { 21 | return name; 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/38/f0a4f197d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Member { 7 | 8 | public LibraryTests() { 9 | donorMembershipId = "Jason123"; 10 | } 11 | 12 | @Test 13 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 14 | Library library = new Library(); 15 | String titleName = "Jaws 3D"; 16 | Title title = new Title(titleName, donorMembershipId); 17 | library.donate(title ); 18 | title = library.getTitles().get(titleName); 19 | assertEquals(titleName, title.getTitleName()); 20 | assertEquals(donorMembershipId, title.getDonor()); 21 | assertEquals(1, title.getCopyCount()); 22 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/3a/30b2a49438fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class SorterTests { 7 | 8 | @Test 9 | public void bubblesortPutsArrayInAscendingOrder() { 10 | int[] array = {3,1,2}; 11 | array = new Sorter().sort(SortKind.BUBBLE, array); 12 | assertArrayEquals(new int[]{1,2,3}, array ); 13 | } 14 | 15 | @Test 16 | public void quicksortPutsArrayInAscendingOrder() { 17 | int[] array = {3,1,2}; 18 | array = new Sorter().sort(SortKind.QUICK, array); 19 | assertArrayEquals(new int[]{1,2,3}, array ); 20 | } 21 | 22 | @Test 23 | public void insertionsortPutsArrayInAscendingOrder() { 24 | int[] array = {3,1,2}; 25 | array = new Sorter().sort(SortKind.INSERTION, array); 26 | assertArrayEquals(new int[]{1,2,3}, array ); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/3a/40f57af6d4fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | Title title = new Title(titleName, donorMembershipId); 14 | library.donate(titleName, donorMembershipId, title ); 15 | title = library.getTitles().get(titleName); 16 | assertEquals(titleName, title.getTitleName(null)); 17 | assertEquals(donorMembershipId, title.getDonor(null)); 18 | assertEquals(1, title.getCopyCount(null)); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/3e/104540e2eafb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Arrays; 3 | import java.util.List; 4 | 5 | public class FibonacciIndexer { 6 | 7 | public FibonacciIndexer() { 8 | super(); 9 | } 10 | 11 | 12 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/3e/a0cdae3d36fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class Sorter { 3 | 4 | public int[] sort(SortKind bubble, int[] array) { 5 | // TODO Auto-generated method stub 6 | return array; 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/3f/f0cfc909edfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Arrays; 3 | import java.util.List; 4 | 5 | public class FibonacciIndexer { 6 | 7 | public int findIndexOf(long fibonacci) { 8 | if(fibonacci >= 0 && fibonacci < 2){ 9 | return (int)fibonacci; 10 | } 11 | return seek(fibonacci); 12 | } 13 | 14 | private int seek(long fibonacci) { 15 | int indexOfFibonacci = -1; 16 | int currentIndex = 2; 17 | long f = 0; 18 | List sequence = new ArrayList(); 19 | sequence.addAll(Arrays.asList(new Long[]{0L,1L})); 20 | while(f < fibonacci){ 21 | f = sequence.get(currentIndex - 1) + sequence.get(currentIndex - 2); 22 | if(f == fibonacci) 23 | return currentIndex; 24 | sequence.add(f); 25 | currentIndex++; 26 | } 27 | return indexOfFibonacci; 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/40/9079045f37fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public enum SortKind { 3 | BUBBLE, QUICK 4 | 5 | } 6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/42/40094a4ad5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | Title title = new Title(titleName, donorMembershipId); 14 | library.donate(title ); 15 | title = library.getTitles().get(titleName); 16 | assertEquals(titleName, title.getTitleName()); 17 | assertEquals(donorMembershipId, title.getDonor()); 18 | assertEquals(1, title.getCopyCount()); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/43/a0efd56f38fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class InsertionSort extends Sort { 3 | 4 | @Override 5 | public int[] sortAsc(int[] input) { 6 | for (int i = 0; i < input.length - 1; i++) { 7 | for(int j = i+1;j > 0;j--){ 8 | if(input[j] < input[j-1]){ 9 | swap(input, j, j-1); 10 | } 11 | } 12 | } 13 | return input; 14 | } 15 | 16 | } 17 | 18 | 19 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/44/706171e46ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballData { 3 | 4 | public static Game[] getAllPlayed() { 5 | Game[] played = new Game[10]; 6 | played[0] = new Game("Liverpool", 2, "Everton", 0); 7 | played[1] = new Game("Aston Villa", 1, "Liverpool", 1); 8 | played[2] = new Game("Liverpool", 3, "West Ham", 1); 9 | return played; 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/49/00d0598bcbfb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.7 8 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/49/4003a867d8fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorId = "Jason123"; 13 | Member donor = new Member(donorId); 14 | Title title = new Title(titleName, donor); 15 | library.donate(title ); 16 | title = library.getTitles().get(titleName); 17 | assertEquals(titleName, title.getTitleName()); 18 | assertEquals(donorId, title.getDonorId()); 19 | assertEquals(1, title.getCopyCount()); 20 | assertEquals(1, library.getTitlesDonatedByMember(donorId).size()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/4a/306fcb4dd2fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount = 1; 7 | 8 | public Title(String name, String donorId) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | } 12 | 13 | protected int getCopyCount(Object[] title) { 14 | copyCount = (int)title[2]; 15 | return copyCount; 16 | } 17 | 18 | protected String getDonor(Object[] title) { 19 | return donorId; 20 | } 21 | 22 | protected String getTitleName(Object[] title) { 23 | return name; 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/4b/d0e9b7d0e3fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | @Test 9 | public void indexOfZeroIsZero() { 10 | assertEquals(0, lookup(0)); 11 | } 12 | 13 | 14 | private int lookup(int fibonacci) { 15 | return 0; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/4d/a0c5a75570f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | if(game.getHomeTeam() == teamName){ 9 | total += game.getHomeTeamScore(); 10 | } 11 | } 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/4f/0087c32ed5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | Title title = new Title(titleName, donorMembershipId); 14 | library.donate(title ); 15 | title = library.getTitles().get(titleName); 16 | assertEquals(titleName, title.getTitleName(null)); 17 | assertEquals(donorMembershipId, title.getDonor()); 18 | assertEquals(1, title.getCopyCount()); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/5/20282d6cd6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private int copyCount = 1; 6 | private Member donor; 7 | 8 | public Title(String name, String donorId, Member donor) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | this.donor = donor; 12 | } 13 | 14 | protected int getCopyCount() { 15 | return copyCount; 16 | } 17 | 18 | protected String getDonor() { 19 | return donor.getId(); 20 | } 21 | 22 | protected String getTitleName() { 23 | return name; 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/5/90e53c75d1fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | Title title = new Title(); 16 | assertEquals(titleName, title.getTitleName(donatedTitle)); 17 | assertEquals(donorMembershipId, title.getDonor(donatedTitle)); 18 | assertEquals(1, title.getCopyCount(donatedTitle)); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/51/70c1d1f6ccfb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | Object donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | assertEquals("Jaws 3D", getTitleName(donatedTitle)); 16 | assertEquals(1, getRentalCopyCount(donatedTitle)); 17 | } 18 | 19 | public String getTitleName(Object[] title) { 20 | return (String) title[0]; 21 | } 22 | 23 | public int getRentalCopyCount(Object[] title) { 24 | return (int)title[1]; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/51/80e4010c0ffb001514a6f02b616b228d: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class MathsTests { 7 | 8 | @Test 9 | public void rootOfOneIsOne() { 10 | assertEquals(1, Maths.sqrroot(1), 1e-15); 11 | } 12 | 13 | @Test 14 | public void rootOfFourIsTwo() { 15 | assertEquals(2, Maths.sqrroot(4), 1e-15); 16 | } 17 | 18 | @Test 19 | public void rootOfNineIsThree() { 20 | assertEquals(3, Maths.sqrroot(9), 1e-15); 21 | } 22 | 23 | @Test 24 | public void rootOfSixteenIsFour() { 25 | assertEquals(4, Maths.sqrroot(16), 1e-15); 26 | } 27 | 28 | @Test 29 | public void rootOfTwoFiveIsPointFive() { 30 | assertEquals(0.5, Maths.sqrroot(0.25), 1e-15); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/57/107c86d435fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class SorterTests { 7 | 8 | @Test 9 | public void test() { 10 | fail("Not yet implemented"); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/5b/607b50c5d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Member { 7 | 8 | public LibraryTests() { 9 | super("Jason123"); 10 | } 11 | 12 | @Test 13 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 14 | Library library = new Library(); 15 | String titleName = "Jaws 3D"; 16 | Title title = new Title(titleName, donorMembershipId); 17 | library.donate(title ); 18 | title = library.getTitles().get(titleName); 19 | assertEquals(titleName, title.getTitleName()); 20 | assertEquals(donorMembershipId, title.getDonor()); 21 | assertEquals(1, title.getCopyCount()); 22 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/5e/80002a41ccfb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | 2 | public class Library { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/5e/b0a5d36f38fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class BubbleSort extends Sort { 3 | 4 | @Override 5 | public int[] sortAsc(int[] input) { 6 | boolean sorted = false; 7 | while(!sorted){ 8 | sorted = true; 9 | for (int i = 0; i < input.length - 1; i++) { 10 | if(input[i] > input[i+1]){ 11 | swap(input, i, i+1); 12 | sorted = false; 13 | } 14 | } 15 | } 16 | return input; 17 | } 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/5f/20b03045d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Member { 2 | 3 | protected final String donorMembershipId; 4 | 5 | public Member(String id) { 6 | donorMembershipId = id; 7 | } 8 | 9 | public String getDonorMembershipId() { 10 | return donorMembershipId; 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/60/10d7f890cefb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.HashMap; 2 | import java.util.List; 3 | import java.util.Map; 4 | 5 | 6 | public class Library { 7 | 8 | private Map titles = new HashMap(); 9 | 10 | public Map getTitles() { 11 | return titles; 12 | } 13 | 14 | public void donate(String titleName, String donorMembershipId) { 15 | titles.put(titleName, new Object[]{titleName, donorMembershipId, 1}); 16 | } 17 | 18 | public List getTitlesDonatedByMember(String donorMembershipId) { 19 | return null; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/61/70aacb9938fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class SorterTests { 7 | 8 | @Test 9 | public void bubblesortPutsArrayInAscendingOrder() { 10 | int[] array = {3,1,2}; 11 | array = new Sorter().sort(new BubbleSort(), array); 12 | assertArrayEquals(new int[]{1,2,3}, array ); 13 | } 14 | 15 | @Test 16 | public void quicksortPutsArrayInAscendingOrder() { 17 | int[] array = {3,1,2}; 18 | array = new Sorter().sort(SortKind.QUICK, array); 19 | assertArrayEquals(new int[]{1,2,3}, array ); 20 | } 21 | 22 | @Test 23 | public void insertionsortPutsArrayInAscendingOrder() { 24 | int[] array = {3,1,2}; 25 | array = new Sorter().sort(SortKind.INSERTION, array); 26 | assertArrayEquals(new int[]{1,2,3}, array ); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/62/70cad0a671f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FootballScoreStatsTests { 7 | 8 | @Test 9 | public void totalsFootballScoresForTeam() { 10 | FootballScoreStats stats = new FootballScoreStats(); 11 | assertEquals(6, stats.teamTotal("Liverpool")); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/62/70e5f028d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | Title title = new Title(titleName, donorMembershipId); 14 | library.donate(title ); 15 | title = library.getTitles().get(titleName); 16 | assertEquals(titleName, title.getTitleName(null)); 17 | assertEquals(donorMembershipId, title.getDonor(null)); 18 | assertEquals(1, title.getCopyCount()); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/66/10666193e3fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class IccanobifTests { 7 | 8 | @Test 9 | public void blah() { 10 | assertEquals(1, zzubZzif("1")[0]); 11 | } 12 | 13 | @Test 14 | public void zzubZzifOfTwoIsTwo() { 15 | assertEquals(2, zzubZzif("1,2")[1]); 16 | } 17 | 18 | private int[] zzubZzif(String fizzBuzz) { 19 | String[] elements = fizzBuzz.split(","); 20 | int[] numbers = new int[elements.length]; 21 | for (int i = 0; i < elements.length; i++) { 22 | numbers[i] = i + 1; 23 | } 24 | return numbers; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/66/a01aa26b6ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/66/a01aa26b6ff900151291e6e57074fb2f -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/66/e0f26c2738fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/66/e0f26c2738fb00151b6fb62373bed4e9 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/69/10d0c091d0fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | assertEquals(titleName, (String) donatedTitle[0]); 16 | assertEquals(donorMembershipId, (String)donatedTitle[1]); 17 | assertEquals(1, (int)donatedTitle[2]); 18 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/69/302e3d0371f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | total = getTeamScore(teamName, total, game); 9 | } 10 | return total; 11 | } 12 | 13 | private int getTeamScore(String teamName, int total, Game game) { 14 | if(game.getHomeTeam().equals(teamName)){ 15 | total += game.getHomeTeamScore(); 16 | } 17 | if(game.getAwayTeam().equals(teamName)){ 18 | total += game.getAwayTeamScore(); 19 | } 20 | return total; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/6a/00a8b863d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Member { 2 | 3 | protected final String donorMembershipId; 4 | 5 | public Member() { 6 | super(); 7 | } 8 | 9 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/6b/00131517cefb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.HashMap; 2 | import java.util.Map; 3 | 4 | 5 | public class Library { 6 | 7 | private Map titles = new HashMap(); 8 | 9 | public Map getTitles() { 10 | return titles; 11 | } 12 | 13 | public void donate(String titleName, String donorMembershipId) { 14 | // TODO Auto-generated method stub 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/6b/907e8b06d1fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Title { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | Title title = new Title(); 16 | assertEquals(titleName, title.getTitleName(donatedTitle)); 17 | assertEquals(donorMembershipId, getDonor(donatedTitle)); 18 | assertEquals(1, getCopyCount(donatedTitle)); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/6b/90f2d358d1fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Title { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | Title title = new Title(); 16 | assertEquals(titleName, title.getTitleName(donatedTitle)); 17 | assertEquals(donorMembershipId, title.getDonor(donatedTitle)); 18 | assertEquals(1, title.getCopyCount(donatedTitle)); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/6c/f01c0de06ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballData { 3 | 4 | public static Game[] getAllPlayed() { 5 | Game[] played = new Game[10]; 6 | played[0] = new Game("Liverpool", 2, "Everton", 0); 7 | return played; 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/6f/a083b86e36fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class SorterTests { 7 | 8 | @Test 9 | public void bubblesortPutsArrayInAscendingOrder() { 10 | int[] array = {3,1,2}; 11 | array = new Sorter().sort(SortKind.BUBBLE, array); 12 | assertArrayEquals(new int[]{1,2,3}, array ); 13 | } 14 | 15 | @Test 16 | public void quicksortPutsArrayInAscendingOrder() { 17 | int[] array = {3,1,2}; 18 | array = new Sorter().sort(SortKind.BUBBLE, array); 19 | assertArrayEquals(new int[]{1,2,3}, array ); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/72/709ea75e35fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.7 8 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/75/a0f8fb2dd2fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount; 7 | 8 | public Title(String name, String donorId) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | } 12 | 13 | protected int getCopyCount(Object[] title) { 14 | copyCount = (int)title[2]; 15 | return copyCount; 16 | } 17 | 18 | protected String getDonor(Object[] title) { 19 | return donorId; 20 | } 21 | 22 | protected String getTitleName(Object[] title) { 23 | return name; 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/75/e0c7c02ed5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Collection; 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | 8 | public class Library { 9 | 10 | private Map titles = new HashMap(); 11 | 12 | public Map getTitles() { 13 | return titles; 14 | } 15 | 16 | public void donate(Title title) { 17 | titles.put(title.getTitleName(null), title); 18 | } 19 | 20 | public Collection getTitlesDonatedByMember(String donorMembershipId) { 21 | List<Title> memberTitles = new ArrayList<Title>(); 22 | for (Title title : titles.values()) { 23 | if(title.getDonor().equals(donorMembershipId)){ 24 | memberTitles.add(title); 25 | } 26 | } 27 | return memberTitles; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/79/00d28c400ffb001514a6f02b616b228d: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class MathsTests { 7 | 8 | @Test 9 | public void rootOfOneIsOne() { 10 | int expected = 1; 11 | assertEquals(expected, Maths.sqrroot(expected), 1e-15); 12 | } 13 | 14 | @Test 15 | public void rootOfFourIsTwo() { 16 | assertEquals(2, Maths.sqrroot(4), 1e-15); 17 | } 18 | 19 | @Test 20 | public void rootOfNineIsThree() { 21 | assertEquals(3, Maths.sqrroot(9), 1e-15); 22 | } 23 | 24 | @Test 25 | public void rootOfSixteenIsFour() { 26 | assertEquals(4, Maths.sqrroot(16), 1e-15); 27 | } 28 | 29 | @Test 30 | public void rootOfTwoFiveIsPointFive() { 31 | assertEquals(0.5, Maths.sqrroot(0.25), 1e-15); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/79/d0295c70ecfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Arrays; 3 | import java.util.List; 4 | 5 | public class FibonacciIndexer { 6 | 7 | public int findIndexOf(long fibonacci) { 8 | if(fibonacci >= 0 && fibonacci < 2){ 9 | return (int)fibonacci; 10 | } 11 | int indexOfFibonacci = -1; 12 | int currentIndex = 2; 13 | long f = 0; 14 | List<Long> sequence = new ArrayList<Long>(); 15 | sequence.addAll(Arrays.asList(new Long[]{0L,1L})); 16 | while(f < fibonacci){ 17 | f = sequence.get(currentIndex - 1) + sequence.get(currentIndex - 2); 18 | if(f == fibonacci) 19 | indexOfFibonacci = currentIndex; 20 | sequence.add(f); 21 | currentIndex++; 22 | } 23 | 24 | return indexOfFibonacci; 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/7a/00e2439671f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | FootballData footballData = new FootballData(); 7 | Game[] played = footballData.getAllPlayed(); 8 | for (Game game : played) { 9 | total += game.getTeamScore(teamName); 10 | } 11 | return total; 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/7b/40c89c8bd2fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount = 1; 7 | 8 | public Title(String name, String donorId) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | } 12 | 13 | protected int getCopyCount(Object[] title) { 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor(Object[] title) { 18 | return donorId; 19 | } 20 | 21 | protected String getTitleName(Object[] title) { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/7c/10937b6cd2fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | Title title = new Title(titleName, donorMembershipId); 16 | assertEquals(titleName, title.getTitleName(donatedTitle)); 17 | assertEquals(donorMembershipId, title.getDonor(donatedTitle)); 18 | assertEquals(1, title.getCopyCount(donatedTitle)); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/7e/a01cfee4d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Collection; 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | 8 | public class Library { 9 | 10 | private Map<String, Title> titles = new HashMap<String, Title>(); 11 | 12 | public Map<String, Title> getTitles() { 13 | return titles; 14 | } 15 | 16 | public void donate(Title title) { 17 | titles.put(title.getTitleName(), title); 18 | } 19 | 20 | public Collection<Title> getTitlesDonatedByMember(String donorMembershipId) { 21 | List<Title> memberTitles = new ArrayList<Title>(); 22 | for (Title title : titles.values()) { 23 | if(title.getDonor().equals(donorMembershipId)){ 24 | memberTitles.add(title); 25 | } 26 | } 27 | return memberTitles; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/8/70593d21d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount = 1; 7 | private Member donor; 8 | 9 | public Title(String name, String donorId, Member donor) { 10 | this.name = name; 11 | this.donorId = donorId; 12 | this.donor = donor; 13 | } 14 | 15 | protected int getCopyCount() { 16 | return copyCount; 17 | } 18 | 19 | protected String getDonor() { 20 | return donorId; 21 | } 22 | 23 | protected String getTitleName() { 24 | return name; 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/80/20eacf44e4fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | private final int expectedIndex; 9 | private final int fibonacci; 10 | 11 | 12 | public FibonacciIndexTests() { 13 | expectedIndex = 0; 14 | fibonacci = 0; 15 | } 16 | 17 | @Test 18 | public void indexOfZeroIsZero() { 19 | assertEquals(expectedIndex, findIndexOf(fibonacci)); 20 | } 21 | 22 | @Test 23 | public void indexOfOneIsOne() { 24 | assertEquals(1, findIndexOf(1)); 25 | } 26 | 27 | @Test 28 | public void indexOfTwoIsThree() { 29 | assertEquals(3, findIndexOf(2)); 30 | } 31 | 32 | 33 | private int findIndexOf(int fibonacci) { 34 | if(fibonacci < 2){ 35 | return fibonacci; 36 | } 37 | return 3; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/80/902865ecd0fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Title { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | assertEquals(titleName, getTitleName(donatedTitle)); 16 | assertEquals(donorMembershipId, getDonor(donatedTitle)); 17 | assertEquals(1, getCopyCount(donatedTitle)); 18 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/82/70da88c2d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | assertEquals(titleName, (String) donatedTitle[0]); 16 | assertEquals(donorMembershipId, (String)donatedTitle[1]); 17 | assertEquals(1, (int)donatedTitle[2]); 18 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/82/f0f42ef6d0fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Title { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | assertEquals(titleName, new Title().getTitleName(donatedTitle)); 16 | assertEquals(donorMembershipId, getDonor(donatedTitle)); 17 | assertEquals(1, getCopyCount(donatedTitle)); 18 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/83/409d4a796ef900151291e6e57074fb2f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/83/409d4a796ef900151291e6e57074fb2f -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/84/70e6406011fb001514a6f02b616b228d: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | import org.junit.Test; 7 | import org.junit.runner.RunWith; 8 | import org.junit.runners.Parameterized; 9 | import org.junit.runners.Parameterized.Parameters; 10 | 11 | 12 | 13 | @RunWith(Parameterized.class) 14 | public class MathsTests { 15 | 16 | private final double number; 17 | 18 | public MathsTests(double input) { 19 | number = input; 20 | } 21 | 22 | @Parameters 23 | public static List<Object[]> data() { 24 | return Arrays.asList(new Object[][] { { 1 }, {4}, {9}, {16}, {0.25} }); 25 | } 26 | 27 | @Test 28 | public void rootSquaredIsOriginalNumber() { 29 | assertEquals(number, Maths.sqrroot(number) * Maths.sqrroot(number), 1e-15); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/85/5064814236fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class Sorter { 3 | 4 | public int[] sort(SortKind bubble, int[] input) { 5 | // TODO Auto-generated method stub 6 | return array; 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/86/a0b0806ad6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount = 1; 7 | private Member donor; 8 | 9 | public Title(String name, String donorId, Member donor) { 10 | this.name = name; 11 | this.donorId = donorId; 12 | this.donor = donor; 13 | } 14 | 15 | protected int getCopyCount() { 16 | return copyCount; 17 | } 18 | 19 | protected String getDonor() { 20 | return donor.getId(); 21 | } 22 | 23 | protected String getTitleName() { 24 | return name; 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/86/c0f790a670f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public enum Venue { 3 | HOME, AWAY 4 | 5 | } 6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/86/e06acfa671f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | private final FootballData footballData; 5 | 6 | public FootballScoreStats() { 7 | footballData = new FootballData(); 8 | } 9 | 10 | public int teamTotal(String teamName) { 11 | int total = 0; 12 | Game[] played = footballData.getAllPlayed(); 13 | for (Game game : played) { 14 | total += game.getTeamScore(teamName); 15 | } 16 | return total; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/87/a0df487270f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | if(game.getHomeTeam() == teamName){ 9 | total += game.getHomeTeamScore(); 10 | } 11 | if(game.getAwayTeam() == teamName){ 12 | total += game.getAwayTeamScore(); 13 | } 14 | } 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/8b/80f51c9fd1fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | private String name; 4 | private String donorId; 5 | 6 | public Title(String name, String donorId) { 7 | super(); 8 | this.name = name; 9 | this.donorId = donorId; 10 | } 11 | 12 | protected int getCopyCount(Object[] title) { 13 | return (int)title[2]; 14 | } 15 | 16 | protected String getDonor(Object[] title) { 17 | return (String)title[1]; 18 | } 19 | 20 | protected String getTitleName(Object[] title) { 21 | return (String) title[0]; 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/8c/d046db6f38fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public abstract class Sort { 3 | 4 | public abstract int[] sortAsc(int[] input); 5 | 6 | protected void swap(int[] input, int index1, int index2) { 7 | int first = input[index1]; 8 | int second = input[index2]; 9 | input[index1] = second; 10 | input[index2] = first; 11 | } 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/8e/e0d3398871f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | total += game.getTeamScore(teamName); 9 | } 10 | return total; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/8f/b074064dd6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Member { 2 | 3 | protected final String donorMembershipId; 4 | 5 | public Member(String id) { 6 | donorMembershipId = id; 7 | } 8 | 9 | public String getId() { 10 | return donorMembershipId; 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/90/50a1682770f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class Game { 3 | 4 | public Game(String homeTeam, int homeTeamScore, String awayTeam, int awayTeamScore) { 5 | // TODO Auto-generated constructor stub 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/92/807df328d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount = 1; 7 | 8 | public Title(String name, String donorId) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | } 12 | 13 | protected int getCopyCount() { 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor(Object[] title) { 18 | return donorId; 19 | } 20 | 21 | protected String getTitleName(Object[] title) { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/93/50506611d2fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | private String name; 4 | private String donorId; 5 | 6 | public Title(String name, String donorId) { 7 | this.name = name; 8 | this.donorId = donorId; 9 | } 10 | 11 | protected int getCopyCount(Object[] title) { 12 | return (int)title[2]; 13 | } 14 | 15 | protected String getDonor(Object[] title) { 16 | return donorId; 17 | } 18 | 19 | protected String getTitleName(Object[] title) { 20 | return name; 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/94/60947338d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Member { 2 | 3 | protected final String donorMembershipId; 4 | 5 | public Member(String id) { 6 | donorMembershipId = id; 7 | // TODO Auto-generated constructor stub 8 | } 9 | 10 | public String getDonorMembershipId() { 11 | return donorMembershipId; 12 | } 13 | 14 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/95/70fcf554cefb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.HashMap; 2 | import java.util.Map; 3 | 4 | 5 | public class Library { 6 | 7 | private Map<String, Object[]> titles = new HashMap<String, Object[]>(); 8 | 9 | public Map<String, Object[]> getTitles() { 10 | return titles; 11 | } 12 | 13 | public void donate(String titleName, String donorMembershipId) { 14 | titles.put(titleName, new Object[]{titleName, donorMembershipId, 1}); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/96/0048c82938fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class BubbleSort { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/96/00816aadecfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Arrays; 3 | import java.util.List; 4 | 5 | public class FibonacciIndexer { 6 | 7 | public int findIndexOf(long fibonacci) { 8 | if(fibonacci >= 0 && fibonacci < 2){ 9 | return (int)fibonacci; 10 | } 11 | int indexOfFibonacci = -1; 12 | int currentIndex = 2; 13 | long f = 0; 14 | List<Long> sequence = new ArrayList<Long>(); 15 | sequence.addAll(Arrays.asList(new Long[]{0L,1L})); 16 | while(f < fibonacci){ 17 | f = sequence.get(currentIndex - 1) + sequence.get(currentIndex - 2); 18 | if(f == fibonacci) 19 | return currentIndex; 20 | sequence.add(f); 21 | currentIndex++; 22 | } 23 | 24 | return indexOfFibonacci; 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/97/d0e282336ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/97/d0e282336ff900151291e6e57074fb2f -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/98/a0c3f597d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Member { 2 | 3 | protected final String donorMembershipId; 4 | 5 | public Member() { 6 | super(); 7 | } 8 | 9 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/99/305e04e5d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private int copyCount = 1; 6 | private Member donor; 7 | 8 | public Title(String name, Member donor) { 9 | this.name = name; 10 | this.donor = donor; 11 | } 12 | 13 | protected int getCopyCount() { 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor() { 18 | return donor.getId(); 19 | } 20 | 21 | protected String getTitleName() { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/99/907db820ccfb00151cf686a16d520ddf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/99/907db820ccfb00151cf686a16d520ddf -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/9b/008699eed6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Member { 2 | 3 | protected final String membershipId; 4 | 5 | public Member(String id) { 6 | membershipId = id; 7 | } 8 | 9 | public String getId() { 10 | return membershipId; 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/9b/20050423d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | Title title = new Title(titleName, donorMembershipId); 14 | library.donate(title ); 15 | title = library.getTitles().get(titleName); 16 | assertEquals(titleName, title.getTitleName(null)); 17 | assertEquals(donorMembershipId, title.getDonor(null)); 18 | assertEquals(1, title.getCopyCount(null)); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/9b/d0669a0136fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/9b/d0669a0136fb00151b6fb62373bed4e9 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/9c/101f985b36fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class Sorter { 3 | 4 | public int[] sort(SortKind bubble, int[] input) { 5 | boolean sorted = false; 6 | while(!sorted){ 7 | sorted = true; 8 | for (int i = 0; i < input.length - 1; i++) { 9 | if(input[i] > input[i+1]){ 10 | swap(input, i, i+1); 11 | sorted = false; 12 | } 13 | } 14 | } 15 | return input; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/9c/9022eaeeccfb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.Map; 2 | 3 | 4 | public class Library { 5 | 6 | public Map<String, Object[]> getTitles() { 7 | // TODO Auto-generated method stub 8 | return null; 9 | } 10 | 11 | public void donate(String titleName) { 12 | // TODO Auto-generated method stub 13 | 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/9c/e050591136fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class SorterTests { 7 | 8 | @Test 9 | public void bubblesortPutsArrayInAscendingOrder() { 10 | int[] array = {3,1,2}; 11 | assertArrayEquals(new int[]{1,2,3}, array ); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/9e/90019ed0d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Member { 7 | 8 | public LibraryTests() { 9 | super("Jason123"); 10 | } 11 | 12 | @Test 13 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 14 | Library library = new Library(); 15 | String titleName = "Jaws 3D"; 16 | Title title = new Title(titleName, donorMembershipId, new Member(donorMembershipId)); 17 | library.donate(title ); 18 | title = library.getTitles().get(titleName); 19 | assertEquals(titleName, title.getTitleName()); 20 | assertEquals(donorMembershipId, title.getDonor()); 21 | assertEquals(1, title.getCopyCount()); 22 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/9e/b07eab150ffb001514a6f02b616b228d: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class MathsTests { 7 | 8 | @Test 9 | public void rootOfOneIsOne() { 10 | int number = 1; 11 | assertEquals(number, Maths.sqrroot(number), 1e-15); 12 | } 13 | 14 | @Test 15 | public void rootOfFourIsTwo() { 16 | assertEquals(2, Maths.sqrroot(4), 1e-15); 17 | } 18 | 19 | @Test 20 | public void rootOfNineIsThree() { 21 | assertEquals(3, Maths.sqrroot(9), 1e-15); 22 | } 23 | 24 | @Test 25 | public void rootOfSixteenIsFour() { 26 | assertEquals(4, Maths.sqrroot(16), 1e-15); 27 | } 28 | 29 | @Test 30 | public void rootOfTwoFiveIsPointFive() { 31 | assertEquals(0.5, Maths.sqrroot(0.25), 1e-15); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/9f/305c2815e4fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | @Test 9 | public void indexOfZeroIsZero() { 10 | assertEquals(0, findIndexOf(0)); 11 | } 12 | 13 | @Test 14 | public void indexOfOneIsOne() { 15 | assertEquals(1, findIndexOf(1)); 16 | } 17 | 18 | @Test 19 | public void indexOfTwoIsThree() { 20 | assertEquals(3, findIndexOf(2)); 21 | } 22 | 23 | 24 | private int findIndexOf(int fibonacci) { 25 | if(fibonacci < 2){ 26 | return fibonacci; 27 | } 28 | return 3; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/9f/b025a32f71f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | total += getTeamScore(teamName, game); 9 | } 10 | return total; 11 | } 12 | 13 | private int getTeamScore(String teamName, Game game) { 14 | int total = 0; 15 | if(game.getHomeTeam().equals(teamName)){ 16 | total = game.getHomeTeamScore(); 17 | } 18 | if(game.getAwayTeam().equals(teamName)){ 19 | total = game.getAwayTeamScore(); 20 | } 21 | return total; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/a1/a04ddc0572f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class Game { 3 | 4 | private String homeTeam; 5 | private int homeTeamScore; 6 | private String awayTeam; 7 | private int awayTeamScore; 8 | 9 | public Game(String homeTeam, int homeTeamScore, String awayTeam, int awayTeamScore) { 10 | this.homeTeam = homeTeam; 11 | this.homeTeamScore = homeTeamScore; 12 | this.awayTeam = awayTeam; 13 | this.awayTeamScore = awayTeamScore; 14 | } 15 | 16 | public int getAwayTeamScore() { 17 | return awayTeamScore; 18 | } 19 | 20 | int getTeamScore(String teamName) { 21 | int total = 0; 22 | if(homeTeam.equals(teamName)){ 23 | total = homeTeamScore; 24 | } 25 | if(awayTeam.equals(teamName)){ 26 | total = getAwayTeamScore(); 27 | } 28 | return total; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/a2/f0479a360ffb001514a6f02b616b228d: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class MathsTests { 7 | 8 | @Test 9 | public void rootOfOneIsOne() { 10 | assertEquals(1, Maths.sqrroot(1), 1e-15); 11 | } 12 | 13 | @Test 14 | public void rootOfFourIsTwo() { 15 | assertEquals(2, Maths.sqrroot(4), 1e-15); 16 | } 17 | 18 | @Test 19 | public void rootOfNineIsThree() { 20 | assertEquals(3, Maths.sqrroot(9), 1e-15); 21 | } 22 | 23 | @Test 24 | public void rootOfSixteenIsFour() { 25 | assertEquals(4, Maths.sqrroot(16), 1e-15); 26 | } 27 | 28 | @Test 29 | public void rootOfTwoFiveIsPointFive() { 30 | assertEquals(0.5, Maths.sqrroot(0.25), 1e-15); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/a4/c0ad1635d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Member { 2 | 3 | protected final String donorMembershipId; 4 | 5 | public Member(String id) { 6 | donorMembershipId = id; 7 | // TODO Auto-generated constructor stub 8 | } 9 | 10 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/a9/10f942dde3fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | @Test 9 | public void indexOfZeroIsZero() { 10 | assertEquals(0, findIndexOf(0)); 11 | } 12 | 13 | 14 | private int findIndexOf(int fibonacci) { 15 | return 0; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/ad/608feeeeccfb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | library.donate(titleName); 13 | Object[] donatedTitle = library.getTitles().get(titleName); 14 | assertEquals("Jaws 3D", getTitleName(donatedTitle)); 15 | assertEquals(1, getRentalCopyCount(donatedTitle)); 16 | } 17 | 18 | public String getTitleName(Object[] title) { 19 | return (String) title[0]; 20 | } 21 | 22 | public int getRentalCopyCount(Object[] title) { 23 | return (int)title[1]; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/ad/6095e8a4d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Member { 2 | 3 | protected final String donorMembershipId; 4 | 5 | public Member(String id) { 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/ad/d04f632b37fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class Sorter { 3 | 4 | public int[] sort(SortKind bubble, int[] input) { 5 | boolean sorted = false; 6 | while(!sorted){ 7 | sorted = true; 8 | for (int i = 0; i < input.length - 1; i++) { 9 | if(input[i] > input[i+1]){ 10 | swap(input, i, i+1); 11 | sorted = false; 12 | } 13 | } 14 | } 15 | return input; 16 | } 17 | 18 | private void swap(int[] input, int index1, int index2) { 19 | int first = input[index1]; 20 | int second = input[index2]; 21 | input[index1] = second; 22 | input[index2] = first; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/ae/3029a5a16ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballData { 3 | 4 | public static Game[] getAllPlayed() { 5 | Game[] played = new Game[10]; 6 | played[0] = new Game(Venue.AWAY, "Liverpool", 2, "Everton", 0); 7 | return played; 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/b0/e02844546ef900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.7 8 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/b2/a011838035fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/b2/a011838035fb00151b6fb62373bed4e9 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/b3/004a527911fb001514a6f02b616b228d: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | import org.junit.Test; 7 | import org.junit.runner.RunWith; 8 | import org.junit.runners.Parameterized; 9 | import org.junit.runners.Parameterized.Parameters; 10 | 11 | @RunWith(Parameterized.class) 12 | public class MathsTests { 13 | 14 | private final double number; 15 | 16 | public MathsTests(double input) { 17 | number = input; 18 | } 19 | 20 | @Parameters 21 | public static List<Object[]> data() { 22 | return Arrays.asList(new Object[][] { { 1 }, {4}, {9}, {16}, {0.25} }); 23 | } 24 | 25 | @Test 26 | public void rootSquaredIsOriginalNumber() { 27 | assertEquals(number, Maths.sqrroot(number) * Maths.sqrroot(number), 1e-15); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/b3/f0fbd45538fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/b3/f0fbd45538fb00151b6fb62373bed4e9 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/b4/f0ef0a27ecfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.junit.runners.Parameterized; 6 | 7 | 8 | 9 | @RunWith(Parameterized.class) 10 | public class FibonacciIndexTests { 11 | 12 | @Test 13 | public void whenNumberNotFoundThenIndexIsMinusOne() { 14 | assertEquals(-1, new FibonacciIndexer().findIndexOf(7)); 15 | } 16 | 17 | @Test 18 | public void cannotFindIndexOfNegativeNumber() { 19 | assertEquals(-1, new FibonacciIndexer().findIndexOf(-1)); 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/b6/9049f4c571f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | private final FootballData footballData; 5 | 6 | public FootballScoreStats(FootballData data) { 7 | footballData = data; 8 | } 9 | 10 | public int teamTotal(String teamName) { 11 | int total = 0; 12 | Game[] played = footballData.getAllPlayed(); 13 | for (Game game : played) { 14 | total += game.getTeamScore(teamName); 15 | } 16 | return total; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/b7/00767ac2ebfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.junit.runners.Parameterized; 6 | 7 | 8 | 9 | @RunWith(Parameterized.class) 10 | public class FibonacciIndexTests extends FibonacciIndexerBaseTests { 11 | 12 | public FibonacciIndexTests(int expectedIndex, long fibonacci) { 13 | this.expectedIndex = expectedIndex; 14 | this.fibonacci = fibonacci; 15 | indexer = new FibonacciIndexer(); 16 | } 17 | 18 | 19 | @Test 20 | public void whenNumberNotFoundThenIndexIsMinusOne() { 21 | assertEquals(-1, indexer.findIndexOf(7)); 22 | } 23 | 24 | @Test 25 | public void cannotFindIndexOfNegativeNumber() { 26 | assertEquals(-1, indexer.findIndexOf(-1)); 27 | } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/ba/4059551136fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class Sorter { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/ba/a0e0cf7236fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public enum SortKind { 3 | BUBBLE 4 | 5 | } 6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/bc/109a54c5d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount = 1; 7 | 8 | public Title(String name, String donorId) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | } 12 | 13 | protected int getCopyCount() { 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor() { 18 | return donorId; 19 | } 20 | 21 | protected String getTitleName() { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/bc/6032c5f86ef900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FootballScoreStatsTests { 7 | 8 | @Test 9 | public void totalsFootballScoresForTeam() { 10 | FootballScoreStats stats; 11 | assertEquals(22, stats.teamTotal("Liverpool FC")); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/bd/f0c854eee3fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | @Test 9 | public void indexOfZeroIsZero() { 10 | assertEquals(0, findIndexOf(0)); 11 | } 12 | 13 | @Test 14 | public void indexOfOneIsOne() { 15 | assertEquals(1, findIndexOf(1)); 16 | } 17 | 18 | 19 | private int findIndexOf(int fibonacci) { 20 | return fibonacci; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/be/b09ad2fb35fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/be/b09ad2fb35fb00151b6fb62373bed4e9 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/bf/90e86c2fe4fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | private final int expectedIndex; 9 | private int fibonacci; 10 | 11 | 12 | public FibonacciIndexTests() { 13 | expectedIndex = 0; 14 | } 15 | 16 | @Test 17 | public void indexOfZeroIsZero() { 18 | fibonacci = 0; 19 | assertEquals(expectedIndex, findIndexOf(fibonacci)); 20 | } 21 | 22 | @Test 23 | public void indexOfOneIsOne() { 24 | assertEquals(1, findIndexOf(1)); 25 | } 26 | 27 | @Test 28 | public void indexOfTwoIsThree() { 29 | assertEquals(3, findIndexOf(2)); 30 | } 31 | 32 | 33 | private int findIndexOf(int fibonacci) { 34 | if(fibonacci < 2){ 35 | return fibonacci; 36 | } 37 | return 3; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/c0/900c3fe2eafb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Arrays; 3 | import java.util.List; 4 | 5 | public class FibonacciIndexer { 6 | 7 | public FibonacciIndexer() { 8 | super(); 9 | } 10 | 11 | protected int findIndexOf(long fibonacci) { 12 | if(fibonacci >= 0 && fibonacci < 2){ 13 | return (int)fibonacci; 14 | } 15 | int indexOfFibonacci = -1; 16 | int currentIndex = 2; 17 | long f = 0; 18 | List<Long> sequence = new ArrayList<Long>(); 19 | sequence.addAll(Arrays.asList(new Long[]{0L,1L})); 20 | while(f < fibonacci){ 21 | f = sequence.get(currentIndex - 1) + sequence.get(currentIndex - 2); 22 | if(f == fibonacci) 23 | indexOfFibonacci = currentIndex; 24 | sequence.add(f); 25 | currentIndex++; 26 | } 27 | 28 | return indexOfFibonacci; 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/c3/00fc401138fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public abstract class Sort { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/c6/70180b3970f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | if(game.getHomeTeam() == teamName) 9 | } 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/c6/f0efd98b6ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public enum Venue { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/c8/f0dcd724e4fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | @Test 9 | public void indexOfZeroIsZero() { 10 | int expectedIndex = 0; 11 | int fibonacci = 0; 12 | assertEquals(expectedIndex, findIndexOf(fibonacci)); 13 | } 14 | 15 | @Test 16 | public void indexOfOneIsOne() { 17 | assertEquals(1, findIndexOf(1)); 18 | } 19 | 20 | @Test 21 | public void indexOfTwoIsThree() { 22 | assertEquals(3, findIndexOf(2)); 23 | } 24 | 25 | 26 | private int findIndexOf(int fibonacci) { 27 | if(fibonacci < 2){ 28 | return fibonacci; 29 | } 30 | return 3; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/c8/f0e37a9ee3fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | @Test 9 | public void blah() { 10 | assertEquals(1, zzubZzif("1")[0]); 11 | } 12 | 13 | @Test 14 | public void zzubZzifOfTwoIsTwo() { 15 | assertEquals(2, zzubZzif("1,2")[1]); 16 | } 17 | 18 | private int[] zzubZzif(String fizzBuzz) { 19 | String[] elements = fizzBuzz.split(","); 20 | int[] numbers = new int[elements.length]; 21 | for (int i = 0; i < elements.length; i++) { 22 | numbers[i] = i + 1; 23 | } 24 | return numbers; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/c9/400b9c8e71f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = new FootballData().getAllPlayed(); 7 | for (Game game : played) { 8 | total += game.getTeamScore(teamName); 9 | } 10 | return total; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/c9/40a4abb0d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests extends Member { 7 | 8 | public LibraryTests() { 9 | super("Jason123"); 10 | } 11 | 12 | @Test 13 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 14 | Library library = new Library(); 15 | String titleName = "Jaws 3D"; 16 | Member donor = new Member("Jason123"); 17 | Title title = new Title(titleName, donor); 18 | library.donate(title ); 19 | title = library.getTitles().get(titleName); 20 | assertEquals(titleName, title.getTitleName()); 21 | assertEquals(membershipId, title.getDonor()); 22 | assertEquals(1, title.getCopyCount()); 23 | assertEquals(1, library.getTitlesDonatedByMember(membershipId).size()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/cb/500e695acdfb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | library.donate(titleName, donorMembershipId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | assertEquals("Jaws 3D", getTitleName(donatedTitle)); 16 | assertEquals(1, getRentalCopyCount(donatedTitle)); 17 | } 18 | 19 | public String getTitleName(Object[] title) { 20 | return (String) title[0]; 21 | } 22 | 23 | public int getRentalCopyCount(Object[] title) { 24 | return (int)title[1]; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/cc/50e8053970f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class Game { 3 | 4 | private String homeTeam; 5 | private int homeTeamScore; 6 | private String awayTeam; 7 | private int awayTeamScore; 8 | 9 | public Game(String homeTeam, int homeTeamScore, String awayTeam, int awayTeamScore) { 10 | this.homeTeam = homeTeam; 11 | // TODO Auto-generated constructor stub 12 | this.homeTeamScore = homeTeamScore; 13 | this.awayTeam = awayTeam; 14 | this.awayTeamScore = awayTeamScore; 15 | } 16 | 17 | public String getHomeTeam() { 18 | // TODO Auto-generated method stub 19 | return homeTeam; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/cc/a0d408adcefb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Collection; 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | 8 | public class Library { 9 | 10 | private Map<String, Object[]> titles = new HashMap<String, Object[]>(); 11 | 12 | public Map<String, Object[]> getTitles() { 13 | return titles; 14 | } 15 | 16 | public void donate(String titleName, String donorMembershipId) { 17 | titles.put(titleName, new Object[]{titleName, donorMembershipId, 1}); 18 | } 19 | 20 | public Collection<Object[]> getTitlesDonatedByMember(String donorMembershipId) { 21 | Collection<Object[]> allTitles = titles.values(); 22 | List<Object[]> memberTitles = new ArrayList<Object[]>(); 23 | return memberTitles; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/cd/3018af4d0ffb001514a6f02b616b228d: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class MathsTests { 7 | 8 | @Test 9 | public void rootOfOneIsOne() { 10 | double expected = 1; 11 | assertEquals(expected, Maths.sqrroot(expected), 1e-15); 12 | } 13 | 14 | @Test 15 | public void rootOfFourIsTwo() { 16 | assertEquals(2, Maths.sqrroot(4), 1e-15); 17 | } 18 | 19 | @Test 20 | public void rootOfNineIsThree() { 21 | assertEquals(3, Maths.sqrroot(9), 1e-15); 22 | } 23 | 24 | @Test 25 | public void rootOfSixteenIsFour() { 26 | assertEquals(4, Maths.sqrroot(16), 1e-15); 27 | } 28 | 29 | @Test 30 | public void rootOfTwoFiveIsPointFive() { 31 | assertEquals(0.5, Maths.sqrroot(0.25), 1e-15); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/cf/3003940e71f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | total += getTeamScore(teamName, total, game); 9 | } 10 | return total; 11 | } 12 | 13 | private int getTeamScore(String teamName, int total, Game game) { 14 | if(game.getHomeTeam().equals(teamName)){ 15 | total = game.getHomeTeamScore(); 16 | } 17 | if(game.getAwayTeam().equals(teamName)){ 18 | total = game.getAwayTeamScore(); 19 | } 20 | return total; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/cf/e004be46ecfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.junit.runners.Parameterized; 6 | 7 | 8 | 9 | @RunWith(Parameterized.class) 10 | public class FibonacciIndexEdgeCaseTests { 11 | 12 | @Test 13 | public void whenNumberNotFoundThenIndexIsMinusOne() { 14 | assertEquals(-1, new FibonacciIndexer().findIndexOf(7)); 15 | } 16 | 17 | @Test 18 | public void cannotFindIndexOfNegativeNumber() { 19 | assertEquals(-1, new FibonacciIndexer().findIndexOf(-1)); 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/d/306fbdaa38fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class BubbleSort extends Sort { 3 | 4 | @Override 5 | public int[] sort(int[] input) { 6 | boolean sorted = false; 7 | while(!sorted){ 8 | sorted = true; 9 | for (int i = 0; i < input.length - 1; i++) { 10 | if(input[i] > input[i+1]){ 11 | swap(input, i, i+1); 12 | sorted = false; 13 | } 14 | } 15 | } 16 | return input; 17 | } 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/d0/0031a37ed8fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.List; 2 | 3 | public class Member { 4 | 5 | protected final String membershipId; 6 | 7 | public Member(String id) { 8 | membershipId = id; 9 | } 10 | 11 | public String getId() { 12 | return membershipId; 13 | } 14 | 15 | public List<Title> getDonatedTitles() { 16 | return null; 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/d0/00a60827ecfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.junit.runners.Parameterized; 6 | 7 | 8 | 9 | @RunWith(Parameterized.class) 10 | public class FibonacciIndexTests { 11 | 12 | @Test 13 | public void whenNumberNotFoundThenIndexIsMinusOne() { 14 | assertEquals(-1, new FibonacciIndexer().findIndexOf(7)); 15 | } 16 | 17 | @Test 18 | public void cannotFindIndexOfNegativeNumber() { 19 | assertEquals(-1, new FibonacciIndexer().findIndexOf(-1)); 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/d2/b0fa15ed0ffb001514a6f02b616b228d: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | import org.junit.Test; 7 | import org.junit.runner.RunWith; 8 | import org.junit.runners.Parameterized; 9 | import org.junit.runners.Parameterized.Parameters; 10 | 11 | 12 | 13 | @RunWith(Parameterized.class) 14 | public class MathsTests { 15 | 16 | private final double number; 17 | 18 | public MathsTests(double input) { 19 | number = input; 20 | } 21 | 22 | 23 | @Parameters 24 | public static List<Object[]> data() { 25 | return Arrays.asList(new Object[][] { { 1 }, {4}, {9}, {16}, {0.25} }); 26 | } 27 | 28 | @Test 29 | public void rootSquaredIsOriginalNumber() { 30 | assertEquals(number, Maths.sqrroot(number) * Maths.sqrroot(number), 1e-15); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/d3/2003cfc3e3fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | @Test 9 | public void indexOfZeroIsZero() { 10 | assertEquals(1, zzubZzif("1")[0]); 11 | } 12 | 13 | @Test 14 | public void zzubZzifOfTwoIsTwo() { 15 | assertEquals(2, zzubZzif("1,2")[1]); 16 | } 17 | 18 | private int[] zzubZzif(String fizzBuzz) { 19 | String[] elements = fizzBuzz.split(","); 20 | int[] numbers = new int[elements.length]; 21 | for (int i = 0; i < elements.length; i++) { 22 | numbers[i] = i + 1; 23 | } 24 | return numbers; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/d5/003fa65570f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class Game { 3 | 4 | private String homeTeam; 5 | private int homeTeamScore; 6 | private String awayTeam; 7 | private int awayTeamScore; 8 | 9 | public Game(String homeTeam, int homeTeamScore, String awayTeam, int awayTeamScore) { 10 | this.homeTeam = homeTeam; 11 | // TODO Auto-generated constructor stub 12 | this.homeTeamScore = homeTeamScore; 13 | this.awayTeam = awayTeam; 14 | this.awayTeamScore = awayTeamScore; 15 | } 16 | 17 | public String getHomeTeam() { 18 | // TODO Auto-generated method stub 19 | return homeTeam; 20 | } 21 | 22 | public int getHomeTeamScore() { 23 | // TODO Auto-generated method stub 24 | return homeTeamScore; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/d6/5049336937fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class SorterTests { 7 | 8 | @Test 9 | public void bubblesortPutsArrayInAscendingOrder() { 10 | int[] array = {3,1,2}; 11 | array = new Sorter().sort(SortKind.BUBBLE, array); 12 | assertArrayEquals(new int[]{1,2,3}, array ); 13 | } 14 | 15 | @Test 16 | public void quicksortPutsArrayInAscendingOrder() { 17 | int[] array = {3,1,2}; 18 | array = new Sorter().sort(SortKind.QUICK, array); 19 | assertArrayEquals(new int[]{1,2,3}, array ); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/d7/f09b24de71f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | private final GameData footballData; 5 | 6 | public FootballScoreStats(GameData gameDayta) { 7 | footballData = gameDayta; 8 | } 9 | 10 | public int teamTotal(String teamName) { 11 | int total = 0; 12 | Game[] played = footballData.getAllPlayed(); 13 | for (Game game : played) { 14 | total += game.getTeamScore(teamName); 15 | } 16 | return total; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/d8/309602c7ebfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.junit.runners.Parameterized; 6 | 7 | 8 | 9 | @RunWith(Parameterized.class) 10 | public class FibonacciIndexTests extends FibonacciIndexerBaseTests { 11 | 12 | 13 | 14 | @Test 15 | public void whenNumberNotFoundThenIndexIsMinusOne() { 16 | assertEquals(-1, new FibonacciIndexer().findIndexOf(7)); 17 | } 18 | 19 | @Test 20 | public void cannotFindIndexOfNegativeNumber() { 21 | assertEquals(-1, new FibonacciIndexer().findIndexOf(-1)); 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/da/50192b6febfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Arrays; 3 | import java.util.List; 4 | 5 | public class FibonacciIndexer { 6 | 7 | protected int findIndexOf(long fibonacci) { 8 | if(fibonacci >= 0 && fibonacci < 2){ 9 | return (int)fibonacci; 10 | } 11 | int indexOfFibonacci = -1; 12 | int currentIndex = 2; 13 | long f = 0; 14 | List<Long> sequence = new ArrayList<Long>(); 15 | sequence.addAll(Arrays.asList(new Long[]{0L,1L})); 16 | while(f < fibonacci){ 17 | f = sequence.get(currentIndex - 1) + sequence.get(currentIndex - 2); 18 | if(f == fibonacci) 19 | indexOfFibonacci = currentIndex; 20 | sequence.add(f); 21 | currentIndex++; 22 | } 23 | 24 | return indexOfFibonacci; 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/db/60632e1ee4fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | @Test 9 | public void indexOfZeroIsZero() { 10 | int expectedIndex = 0; 11 | assertEquals(expectedIndex, findIndexOf(0)); 12 | } 13 | 14 | @Test 15 | public void indexOfOneIsOne() { 16 | assertEquals(1, findIndexOf(1)); 17 | } 18 | 19 | @Test 20 | public void indexOfTwoIsThree() { 21 | assertEquals(3, findIndexOf(2)); 22 | } 23 | 24 | 25 | private int findIndexOf(int fibonacci) { 26 | if(fibonacci < 2){ 27 | return fibonacci; 28 | } 29 | return 3; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e/101e3e75d1fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | public Title() { 4 | super(); 5 | } 6 | 7 | protected int getCopyCount(Object[] title) { 8 | return (int)title[2]; 9 | } 10 | 11 | protected String getDonor(Object[] title) { 12 | return (String)title[1]; 13 | } 14 | 15 | protected String getTitleName(Object[] title) { 16 | return (String) title[0]; 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e/7087629a70f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FootballScoreStatsTests { 7 | 8 | @Test 9 | public void totalsFootballScoresForTeam() { 10 | FootballScoreStats stats = new FootballScoreStats(); 11 | assertEquals(6, stats.teamTotal("Liverpool FC")); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e0/303cc40e38fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/e0/303cc40e38fb00151b6fb62373bed4e9 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e2/e03f2b14d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount = 1; 7 | 8 | public Title(String name, String donorId, Member donor) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | } 12 | 13 | protected int getCopyCount() { 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor() { 18 | return donorId; 19 | } 20 | 21 | protected String getTitleName() { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e2/f07f193f6ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/e2/f07f193f6ff900151291e6e57074fb2f -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e3/e057584038fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.history/e3/e057584038fb00151b6fb62373bed4e9 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e5/50aca42f71f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class Game { 3 | 4 | private String homeTeam; 5 | private int homeTeamScore; 6 | private String awayTeam; 7 | private int awayTeamScore; 8 | 9 | public Game(String homeTeam, int homeTeamScore, String awayTeam, int awayTeamScore) { 10 | this.homeTeam = homeTeam; 11 | this.homeTeamScore = homeTeamScore; 12 | this.awayTeam = awayTeam; 13 | this.awayTeamScore = awayTeamScore; 14 | } 15 | 16 | public String getHomeTeam() { 17 | return homeTeam; 18 | } 19 | 20 | public int getHomeTeamScore() { 21 | return homeTeamScore; 22 | } 23 | 24 | public String getAwayTeam() { 25 | return awayTeam; 26 | } 27 | 28 | public int getAwayTeamScore() { 29 | return awayTeamScore; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e5/80be9b1471f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | total += getTeamScore(teamName, game); 9 | } 10 | return total; 11 | } 12 | 13 | private int getTeamScore(String teamName, Game game) { 14 | if(game.getHomeTeam().equals(teamName)){ 15 | total = game.getHomeTeamScore(); 16 | } 17 | if(game.getAwayTeam().equals(teamName)){ 18 | total = game.getAwayTeamScore(); 19 | } 20 | return total; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e5/90d3446aebfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Arrays; 3 | import java.util.List; 4 | 5 | public class FibonacciIndexer { 6 | 7 | public FibonacciIndexer() { 8 | super(); 9 | } 10 | 11 | protected int findIndexOf(long fibonacci) { 12 | if(fibonacci >= 0 && fibonacci < 2){ 13 | return (int)fibonacci; 14 | } 15 | int indexOfFibonacci = -1; 16 | int currentIndex = 2; 17 | long f = 0; 18 | List<Long> sequence = new ArrayList<Long>(); 19 | sequence.addAll(Arrays.asList(new Long[]{0L,1L})); 20 | while(f < fibonacci){ 21 | f = sequence.get(currentIndex - 1) + sequence.get(currentIndex - 2); 22 | if(f == fibonacci) 23 | indexOfFibonacci = currentIndex; 24 | sequence.add(f); 25 | currentIndex++; 26 | } 27 | 28 | return indexOfFibonacci; 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e6/30793f8871f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballData { 3 | 4 | public static Game[] getAllPlayed() { 5 | Game[] played = new Game[3]; 6 | played[0] = new Game("Liverpool", 2, "Everton", 0); 7 | played[1] = new Game("Aston Villa", 1, "Liverpool", 1); 8 | played[2] = new Game("Liverpool", 3, "West Ham", 1); 9 | return played; 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e8/307f0b23d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount = 1; 7 | 8 | public Title(String name, String donorId) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | } 12 | 13 | protected int getCopyCount(Object[] title) { 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor(Object[] title) { 18 | return donorId; 19 | } 20 | 21 | protected String getTitleName(Object[] title) { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e9/603bb99070f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | if(game.getHomeTeam() == teamName){ 9 | total += game.getHomeTeamScore(); 10 | } 11 | if(game.getAwayTeam() == teamName){ 12 | total += game.getAwayTeamScore(); 13 | } 14 | } 15 | return total; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e9/6073413ad2fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | 7 | public Title(String name, String donorId) { 8 | this.name = name; 9 | this.donorId = donorId; 10 | } 11 | 12 | protected int getCopyCount(Object[] title) { 13 | int copyCount = (int)title[2]; 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor(Object[] title) { 18 | return donorId; 19 | } 20 | 21 | protected String getTitleName(Object[] title) { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/e9/a00380de38fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public enum SortKind { 3 | BUBBLE, QUICK, INSERTION 4 | 5 | } 6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/eb/e014ed28d5fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Collection; 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | 8 | public class Library { 9 | 10 | private Map<String, Title> titles = new HashMap<String, Title>(); 11 | 12 | public Map<String, Title> getTitles() { 13 | return titles; 14 | } 15 | 16 | public void donate(Title title) { 17 | titles.put(title.getTitleName(null), title); 18 | } 19 | 20 | public Collection<Title> getTitlesDonatedByMember(String donorMembershipId) { 21 | List<Title> memberTitles = new ArrayList<Title>(); 22 | for (Title title : titles.values()) { 23 | if(title.getDonor(null).equals(donorMembershipId)){ 24 | memberTitles.add(title); 25 | } 26 | } 27 | return memberTitles; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/ec/10e4cd4cccfb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import java.util.Map; 2 | 3 | 4 | public class Library { 5 | 6 | public Map<String, Object[]> getTitles() { 7 | // TODO Auto-generated method stub 8 | return null; 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/ef/00d41a00ecfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.assertEquals; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | import org.junit.Test; 7 | import org.junit.runners.Parameterized.Parameters; 8 | 9 | public class FibonacciIndexerBaseTests { 10 | 11 | protected final int expectedIndex; 12 | protected final long fibonacci; 13 | protected final FibonacciIndexer indexer; 14 | 15 | @Parameters 16 | public static List<Object[]> data() { 17 | return Arrays.asList(new Object[][] { 18 | { 0,0 }, {1,1}, {3,2}, {4,3}, {5,5}, {6,8}, {7,13}, {8,21}, {49, 7778742049L} 19 | }); 20 | } 21 | 22 | 23 | @Test 24 | public void findsIndexOfFibonacciNumber() { 25 | assertEquals(expectedIndex, indexer.findIndexOf(fibonacci)); 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/ef/a068bc7ad2fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorMembershipId = "Jason123"; 13 | Title title = new Title(titleName, donorMembershipId); 14 | library.donate(titleName, donorMembershipId ); 15 | Object[] donatedTitle = library.getTitles().get(titleName); 16 | assertEquals(titleName, title.getTitleName(donatedTitle)); 17 | assertEquals(donorMembershipId, title.getDonor(donatedTitle)); 18 | assertEquals(1, title.getCopyCount(donatedTitle)); 19 | assertEquals(1, library.getTitlesDonatedByMember(donorMembershipId).size()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/f0/6054e28b6ff900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | // TODO Auto-generated method stub 6 | return 0; 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/f1/2088963cecfb001515bcce532dee9874: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Arrays; 3 | import java.util.List; 4 | 5 | public class FibonacciIndexer { 6 | 7 | public int findIndexOf(long fibonacci) { 8 | if(fibonacci >= 0 && fibonacci < 2){ 9 | return (int)fibonacci; 10 | } 11 | int indexOfFibonacci = -1; 12 | int currentIndex = 2; 13 | long f = 0; 14 | List<Long> sequence = new ArrayList<Long>(); 15 | sequence.addAll(Arrays.asList(new Long[]{0L,1L})); 16 | while(f < fibonacci){ 17 | f = sequence.get(currentIndex - 1) + sequence.get(currentIndex - 2); 18 | if(f == fibonacci) 19 | indexOfFibonacci = currentIndex; 20 | sequence.add(f); 21 | currentIndex++; 22 | } 23 | 24 | return indexOfFibonacci; 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/f1/400e1565d6fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount = 1; 7 | 8 | public Title(String name, String donorId, Member donor) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | } 12 | 13 | protected int getCopyCount() { 14 | return copyCount; 15 | } 16 | 17 | protected String getDonor() { 18 | return donorId; 19 | } 20 | 21 | protected String getTitleName() { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/f2/804ca167d8fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Member { 2 | 3 | protected final String membershipId; 4 | 5 | public Member(String id) { 6 | membershipId = id; 7 | } 8 | 9 | public String getId() { 10 | return membershipId; 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/f8/804c894338fb00151b6fb62373bed4e9: -------------------------------------------------------------------------------- 1 | 2 | public class InsertionSort { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/fa/703cc14ad2fb00151cf686a16d520ddf: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private String donorId; 6 | private int copyCount; 7 | 8 | public Title(String name, String donorId) { 9 | this.name = name; 10 | this.donorId = donorId; 11 | } 12 | 13 | protected int getCopyCount(Object[] title) { 14 | copyCount = (int)title[2]; 15 | return copyCount; 16 | } 17 | 18 | protected String getDonor(Object[] title) { 19 | return donorId; 20 | } 21 | 22 | protected String getTitleName(Object[] title) { 23 | return name; 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/fa/d02d802b0ffb001514a6f02b616b228d: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class MathsTests { 7 | 8 | @Test 9 | public void rootOfOneIsOne() { 10 | int number = 1; 11 | assertEquals(number, Maths.sqrroot(number), 1e-15); 12 | } 13 | 14 | @Test 15 | public void rootOfFourIsTwo() { 16 | assertEquals(2, Maths.sqrroot(4), 1e-15); 17 | } 18 | 19 | @Test 20 | public void rootOfNineIsThree() { 21 | assertEquals(3, Maths.sqrroot(9), 1e-15); 22 | } 23 | 24 | @Test 25 | public void rootOfSixteenIsFour() { 26 | assertEquals(4, Maths.sqrroot(16), 1e-15); 27 | } 28 | 29 | @Test 30 | public void rootOfTwoFiveIsPointFive() { 31 | assertEquals(0.5, Maths.sqrroot(0.25), 1e-15); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/fc/909c58fb70f900151291e6e57074fb2f: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | if(game.getHomeTeam().equals(teamName)){ 9 | total += game.getHomeTeamScore(); 10 | } 11 | if(game.getAwayTeam().equals(teamName)){ 12 | total += game.getAwayTeamScore(); 13 | } 14 | } 15 | return total; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.history/fc/f06926e0e3fb001511408be01e52e74b: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FibonacciIndexTests { 7 | 8 | @Test 9 | public void indexOfZeroIsZero() { 10 | assertEquals(0, findIndexOf(0)); 11 | } 12 | 13 | @Test 14 | public void indexOfOneIsOne() { 15 | assertEquals(1, findIndexOf(1)); 16 | } 17 | 18 | 19 | private int findIndexOf(int fibonacci) { 20 | return 0; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_A/.indexes/92/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_A/.indexes/92/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_A/.indexes/af/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_A/.indexes/af/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_A/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_A/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_B/.indexes/92/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_B/.indexes/92/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_B/.indexes/af/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_B/.indexes/af/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_B/.indexes/e4/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_B/.indexes/e4/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_B/.markers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_B/.markers -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_B/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_1_B/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_A/.indexes/92/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_A/.indexes/92/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_A/.indexes/af/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_A/.indexes/af/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_A/.indexes/e4/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_A/.indexes/e4/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_A/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_A/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_B/.indexes/92/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_B/.indexes/92/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_B/.indexes/af/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_B/.indexes/af/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_B/.indexes/e4/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_B/.indexes/e4/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_B/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_2_B/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_A/.indexes/92/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_A/.indexes/92/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_A/.indexes/af/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_A/.indexes/af/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_A/.indexes/e4/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_A/.indexes/e4/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_A/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_A/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_B/.indexes/92/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_B/.indexes/92/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_B/.indexes/af/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_B/.indexes/af/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_B/.indexes/e4/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_B/.indexes/e4/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_B/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_3_B/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_A/.indexes/af/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_A/.indexes/af/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_A/.indexes/e4/e3/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_A/.indexes/e4/e3/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_A/.indexes/e4/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_A/.indexes/e4/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_A/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_A/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_B/.indexes/92/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_B/.indexes/92/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_B/.indexes/af/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_B/.indexes/af/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_B/.indexes/e4/e3/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_B/.indexes/e4/e3/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_B/.indexes/e4/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_B/.indexes/e4/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_B/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_4_B/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_A/.indexes/92/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_A/.indexes/92/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_A/.indexes/af/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_A/.indexes/af/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_A/.indexes/e4/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_A/.indexes/e4/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_A/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_A/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_B/.indexes/92/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_B/.indexes/92/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_B/.indexes/af/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_B/.indexes/af/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_B/.indexes/e4/history.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_B/.indexes/e4/history.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_B/org.eclipse.jdt.core/state.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.projects/ROUND_5_B/org.eclipse.jdt.core/state.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index: -------------------------------------------------------------------------------- 1 | ����/��org.eclipse.core.resources�contentCacheState�2�����contentCacheTimestamp� 1392896194269�org.eclipse.jdt.core�stateVersionNumber�27 -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.root/7.tree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.root/7.tree -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | version=1 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n 3 | preferredTargets=default\:default| 4 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.help.base.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | scope= 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.help.ui.prefs: -------------------------------------------------------------------------------- 1 | browser.h=768 2 | browser.maximized=true 3 | browser.w=1024 4 | browser.x=192 5 | browser.y=192 6 | eclipse.preferences.version=1 7 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.codeComplete.visibilityCheck=enabled 3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.source=1.7 9 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.launching.PREF_VM_XML=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<vmSettings defaultVM\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1459668780062" defaultVMConnector\="">\r\n<vmType id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">\r\n<vm id\="1459668780062" name\="jdk1.7.0_51" path\="C\:\\Program Files\\Java\\jdk1.7.0_51"/>\r\n</vmType>\r\n</vmSettings>\r\n 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.m2e.discovery.pref.projects= 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.pde.api.tools.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | knownEEFragments= 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.team.ui.first_time=false 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | overviewRuler_migration=migrated_3.1 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs: -------------------------------------------------------------------------------- 1 | EXIT_PROMPT_ON_CLOSE_LAST_WINDOW=false 2 | PROBLEMS_FILTERS_MIGRATE=true 3 | eclipse.preferences.version=1 4 | platformState=1392896194269 5 | quickStart=false 6 | tipsAndTricks=true 7 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | showIntro=false 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs: -------------------------------------------------------------------------------- 1 | PLUGINS_NOT_ACTIVATED_ON_STARTUP=org.eclipse.m2e.discovery; 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <section name="Workbench"> 3 | <section name="org.eclipse.debug.ui.SCOPED_SAVE_SELECTION_DIALOG"> 4 | <item value="343" key="DIALOG_WIDTH"/> 5 | <item value="434" key="DIALOG_HEIGHT"/> 6 | <item value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/> 7 | </section> 8 | </section> 9 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/1696548855.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/1696548855.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/1798035612.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/1798035612.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2151800701.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2151800701.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2280677819.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2280677819.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2286021782.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2286021782.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2307098273.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2307098273.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2362216484.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2362216484.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2366568979.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2366568979.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2403877962.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2403877962.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2480785936.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2480785936.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/277534491.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/277534491.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2818633721.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2818633721.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2832260077.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2832260077.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/289979692.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/289979692.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/2923255570.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/2923255570.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3127670531.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/3127670531.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/336047017.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/336047017.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3575595675.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/3575595675.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/365281694.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/365281694.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/373364208.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/373364208.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/3972768014.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/3972768014.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/4170630083.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/4170630083.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/741379379.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/741379379.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/859690871.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/859690871.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/927718159.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/927718159.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/958386498.index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/958386498.index -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/invalidArchivesCache: -------------------------------------------------------------------------------- 1 | ���� -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt: -------------------------------------------------------------------------------- 1 | java -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt: -------------------------------------------------------------------------------- 1 | INDEX VERSION 1.126+C:\Users\jasongorman\Documents\Java Projects\REFACTORING_GOLF\.metadata\.plugins\org.eclipse.jdt.core 2 | 859690871.index 3 | 2286021782.index 4 | 2832260077.index 5 | 3972768014.index 6 | 373364208.index 7 | 2280677819.index 8 | 4170630083.index 9 | 2403877962.index 10 | 2307098273.index 11 | 2366568979.index 12 | 2362216484.index 13 | 2480785936.index 14 | 1798035612.index 15 | 289979692.index 16 | 3127670531.index 17 | 2151800701.index 18 | 365281694.index 19 | 336047017.index 20 | 1696548855.index 21 | 958386498.index 22 | 3575595675.index 23 | 277534491.index 24 | 741379379.index 25 | 2923255570.index 26 | 927718159.index 27 | 2818633721.index 28 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.junit/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <section name="Workbench"> 3 | <section name="JUnitWizards"> 4 | </section> 5 | </section> 6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.launching/.install.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <dirs> 3 | <entry loc="C:\Program Files\Java\jdk1.7.0_51" stamp="1392895607856"/> 4 | </dirs> 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <typeInfoHistroy/> 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2016/4/13/refactorings.index: -------------------------------------------------------------------------------- 1 | 1459669872911 Rename Java project 'ROUND_1_AFTER' 2 | 1459669884149 Rename Java project 'ROUND_1_BEFORE' 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/ROUND_1_B/2016/4/14/refactorings.index: -------------------------------------------------------------------------------- 1 | 1459942303599 Extract superclass 'FibonacciIndexer' 2 | 1459942364562 Extract local variable 'indexer' 3 | 1459942376528 Convert local variable 'indexer' to field 4 | 1459942519497 Extract superclass 'FibonacciIndexerBaseTests' 5 | 1459942672036 Change method 'FibonacciIndexerBaseTests' 6 | 1459942739113 Rename type 'FibonacciIndexTests' 7 | 1459942753669 Rename type 'FibonacciIndexerBaseTests' 8 | 1459942775214 Move compilation unit 9 | 1459942964506 Extract method 'seek' 10 | 1459942975411 Inline local variable 'indexOfFibonacci' 11 | 1459943119480 Extract method 'buildInitialSequence' 12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/ROUND_2_A/2016/4/13/refactorings.index: -------------------------------------------------------------------------------- 1 | 1459669355353 Change method 'Game' 2 | 1459669793106 Delete element 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/ROUND_2_B/2016/4/13/refactorings.index: -------------------------------------------------------------------------------- 1 | 1459669935334 Extract method 'getTeamScore' 2 | 1459669967597 Change method 'getTeamScore' 3 | 1459670023070 Move method 'getTeamScore' 4 | 1459670182398 Extract local variable 'footballData' 5 | 1459670195242 Convert local variable 'footballData' to field 6 | 1459670223049 Introduce parameter for 'FootballScoreStats' 7 | 1459670275257 Extract interface 'GameData' 8 | 1459670310344 Rename local variable 'data' 9 | 1459670315834 Rename local variable 'gameDayta' 10 | 1459670353195 Inline method 'getHomeTeam' 11 | 1459670362652 Inline method 'getHomeTeamScore' 12 | 1459670373851 Inline method 'getAwayTeam' 13 | 1459670382468 Inline method 'getAwayTeamScore' 14 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/ROUND_3_A/2016/4/14/refactorings.index: -------------------------------------------------------------------------------- 1 | 1459865142385 Inline method 'sortRight' 2 | 1459865149888 Inline method 'sortLeft' 3 | 1459865159182 Inline method 'pivotElements' 4 | 1459865173240 Inline method 'partition' 5 | 1459865192558 Rename local variable 'i1' 6 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/ROUND_3_B/2016/4/14/refactorings.index: -------------------------------------------------------------------------------- 1 | 1459865528797 Rename compilation unit 'QuickSort.java' 2 | 1459865540571 Rename type 'Quicksort' 3 | 1459865551824 Rename method 'sortAsc' 4 | 1459865737442 Delete element 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/ROUND_4_A/2016/4/14/refactorings.index: -------------------------------------------------------------------------------- 1 | 1459929101125 Extract local variable 'donatedTitle' 2 | 1459929168508 Extract method 'getRentalCopyCount' 3 | 1459929194054 Rename local variable 'donatedTitle' 4 | 1459929261593 Extract method 'getTitleName' 5 | 1459929279221 Rename local variable 'donatedTitle' 6 | 1459929524566 Extract method 'getDonorId' 7 | 1459930678089 Inline method 'getTitleName' 8 | 1459930688009 Inline method 'getDonorId' 9 | 1459930696913 Inline method 'getRentalCopyCount' 10 | 1459930844517 Delete element 11 | 1459933551015 Rename local variable 'donorMembershipId' 12 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/ROUND_5_A/2016/4/13/refactorings.index: -------------------------------------------------------------------------------- 1 | 1459673141383 Move compilation unit 2 | 1459673179682 Rename type 'test' 3 | 1459673230829 Rename type 'MathTests' 4 | 1459673446456 Inline local variable 'c' 5 | 1459673515169 Extract constant 'ERROR_TOLERANCE' 6 | 1459673524520 Inline local variable 'epsilon' 7 | 1459674092762 Rename local variable 't' 8 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/ROUND_5_B/2016/4/13/refactorings.index: -------------------------------------------------------------------------------- 1 | 1459674434260 Extract local variable 'expected' 2 | 1459674477169 Extract local variable 'number' 3 | 1459674499263 Convert local variable 'expected' to field 4 | 1459674520010 Convert local variable 'number' to field 5 | 1459674680370 Introduce parameter for 'MathsTests' 6 | 1459674691275 Introduce parameter for 'MathsTests' 7 | 1459675045534 Rename method 'rootOfOneIsOne' 8 | 1459675141342 Change method 'MathsTests' 9 | 1459675171393 Extract local variable 'root' 10 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/ROUND_5_B/2016/4/14/refactorings.index: -------------------------------------------------------------------------------- 1 | 1459842048565 Extract local variable 'expected' 2 | 1459842070634 Convert local variable 'expected' to field 3 | 1459842135524 Rename field 'expected' 4 | 1459842153838 Rename method 'rootOfOneIsOne' 5 | 1459845678322 Introduce parameter for 'MathsTests' 6 | 1459847846392 Extract local variable 'expected' 7 | 1459847897484 Convert local variable 'expected' to field 8 | 1459847906854 Rename field 'expected' 9 | 1459847976911 Introduce parameter for 'MathsTests' 10 | 1459848042784 Rename method 'rootOfOneIsOne' 11 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log: -------------------------------------------------------------------------------- 1 | 2016-04-05 09:12:59,064 [Start Help Server] INFO org.eclipse.jetty.server.Server - jetty-8.1.10.v20130312 2 | 2016-04-05 09:12:59,120 [Start Help Server] INFO o.e.jetty.server.AbstractConnector - Started SelectChannelConnector@127.0.0.1:60105 3 | 2016-04-05 10:49:10,793 [Stop Help Server] INFO o.e.j.server.handler.ContextHandler - stopped o.e.j.s.ServletContextHandler{/help,null} 4 | 2016-04-05 10:53:16,307 [Start Help Server] INFO org.eclipse.jetty.server.Server - jetty-8.1.10.v20130312 5 | 2016-04-05 10:53:16,331 [Start Help Server] INFO o.e.jetty.server.AbstractConnector - Started SelectChannelConnector@127.0.0.1:61507 6 | 2016-04-05 11:02:11,028 [Stop Help Server] INFO o.e.j.server.handler.ContextHandler - stopped o.e.j.s.ServletContextHandler{/help,null} 7 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties: -------------------------------------------------------------------------------- 1 | #Cached timestamps 2 | #Wed Apr 06 13:27:56 BST 2016 3 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ui.intro/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <section name="Workbench"> 3 | <item value="1024" key="introLaunchBar.location"/> 4 | </section> 5 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <section name="Workbench"> 3 | <section name="org.eclipse.ui.internal.QuickAccess"> 4 | <item value="1440" key="dialogWidth"/> 5 | <item value="749" key="dialogHeight"/> 6 | <list key="orderedProviders"> 7 | </list> 8 | <list key="textArray"> 9 | </list> 10 | <list key="orderedElements"> 11 | </list> 12 | <list key="textEntries"> 13 | </list> 14 | </section> 15 | <section name="WorkbenchPreferenceDialogSettings"> 16 | <item value="9" key="DIALOG_Y_ORIGIN"/> 17 | <item value="591" key="DIALOG_X_ORIGIN"/> 18 | </section> 19 | </section> 20 | -------------------------------------------------------------------------------- /.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <workingSetManager> 3 | <workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1459668761282_0" label="Window Working Set" name="Aggregate for window 1459668761281"/> 4 | </workingSetManager> -------------------------------------------------------------------------------- /.metadata/version.ini: -------------------------------------------------------------------------------- 1 | org.eclipse.core.runtime=1 -------------------------------------------------------------------------------- /ROUND_1_A/.classpath: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <classpath> 3 | <classpathentry kind="src" path="src"/> 4 | <classpathentry kind="src" path="test"/> 5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 7 | <classpathentry kind="output" path="bin"/> 8 | </classpath> 9 | -------------------------------------------------------------------------------- /ROUND_1_A/.project: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <projectDescription> 3 | <name>ROUND_1_A</name> 4 | <comment></comment> 5 | <projects> 6 | </projects> 7 | <buildSpec> 8 | <buildCommand> 9 | <name>org.eclipse.jdt.core.javabuilder</name> 10 | <arguments> 11 | </arguments> 12 | </buildCommand> 13 | </buildSpec> 14 | <natures> 15 | <nature>org.eclipse.jdt.core.javanature</nature> 16 | </natures> 17 | </projectDescription> 18 | -------------------------------------------------------------------------------- /ROUND_1_A/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /ROUND_1_A/bin/FibonacciIndexTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_1_A/bin/FibonacciIndexTests.class -------------------------------------------------------------------------------- /ROUND_1_B/.classpath: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <classpath> 3 | <classpathentry kind="src" path="src"/> 4 | <classpathentry kind="src" path="test"/> 5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 7 | <classpathentry kind="output" path="bin"/> 8 | </classpath> 9 | -------------------------------------------------------------------------------- /ROUND_1_B/.project: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <projectDescription> 3 | <name>ROUND_1_B</name> 4 | <comment></comment> 5 | <projects> 6 | </projects> 7 | <buildSpec> 8 | <buildCommand> 9 | <name>org.eclipse.jdt.core.javabuilder</name> 10 | <arguments> 11 | </arguments> 12 | </buildCommand> 13 | </buildSpec> 14 | <natures> 15 | <nature>org.eclipse.jdt.core.javanature</nature> 16 | </natures> 17 | </projectDescription> 18 | -------------------------------------------------------------------------------- /ROUND_1_B/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /ROUND_1_B/bin/FibonacciIndexEdgeCaseTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_1_B/bin/FibonacciIndexEdgeCaseTests.class -------------------------------------------------------------------------------- /ROUND_1_B/bin/FibonacciIndexer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_1_B/bin/FibonacciIndexer.class -------------------------------------------------------------------------------- /ROUND_1_B/bin/FibonacciIndexerHappyPathTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_1_B/bin/FibonacciIndexerHappyPathTests.class -------------------------------------------------------------------------------- /ROUND_1_B/test/FibonacciIndexEdgeCaseTests.java: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.junit.runners.Parameterized; 6 | 7 | 8 | public class FibonacciIndexEdgeCaseTests { 9 | 10 | @Test 11 | public void whenNumberNotFoundThenIndexIsMinusOne() { 12 | assertEquals(-1, new FibonacciIndexer().findIndexOf(7)); 13 | } 14 | 15 | @Test 16 | public void cannotFindIndexOfNegativeNumber() { 17 | assertEquals(-1, new FibonacciIndexer().findIndexOf(-1)); 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /ROUND_2_A/.classpath: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <classpath> 3 | <classpathentry kind="src" path="src"/> 4 | <classpathentry kind="src" path="test"/> 5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 7 | <classpathentry kind="output" path="bin"/> 8 | </classpath> 9 | -------------------------------------------------------------------------------- /ROUND_2_A/.project: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <projectDescription> 3 | <name>ROUND_2_A</name> 4 | <comment></comment> 5 | <projects> 6 | </projects> 7 | <buildSpec> 8 | <buildCommand> 9 | <name>org.eclipse.jdt.core.javabuilder</name> 10 | <arguments> 11 | </arguments> 12 | </buildCommand> 13 | </buildSpec> 14 | <natures> 15 | <nature>org.eclipse.jdt.core.javanature</nature> 16 | </natures> 17 | </projectDescription> 18 | -------------------------------------------------------------------------------- /ROUND_2_A/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /ROUND_2_A/bin/FootballData.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_2_A/bin/FootballData.class -------------------------------------------------------------------------------- /ROUND_2_A/bin/FootballScoreStats.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_2_A/bin/FootballScoreStats.class -------------------------------------------------------------------------------- /ROUND_2_A/bin/FootballScoreStatsTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_2_A/bin/FootballScoreStatsTests.class -------------------------------------------------------------------------------- /ROUND_2_A/bin/Game.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_2_A/bin/Game.class -------------------------------------------------------------------------------- /ROUND_2_A/src/FootballData.java: -------------------------------------------------------------------------------- 1 | 2 | public class FootballData { 3 | 4 | public static Game[] getAllPlayed() { 5 | Game[] played = new Game[3]; 6 | played[0] = new Game("Liverpool", 2, "Everton", 0); 7 | played[1] = new Game("Aston Villa", 1, "Liverpool", 1); 8 | played[2] = new Game("Liverpool", 3, "West Ham", 1); 9 | return played; 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ROUND_2_A/src/FootballScoreStats.java: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | public int teamTotal(String teamName) { 5 | int total = 0; 6 | Game[] played = FootballData.getAllPlayed(); 7 | for (Game game : played) { 8 | if(game.getHomeTeam().equals(teamName)){ 9 | total += game.getHomeTeamScore(); 10 | } 11 | if(game.getAwayTeam().equals(teamName)){ 12 | total += game.getAwayTeamScore(); 13 | } 14 | } 15 | return total; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /ROUND_2_A/src/Game.java: -------------------------------------------------------------------------------- 1 | 2 | public class Game { 3 | 4 | private String homeTeam; 5 | private int homeTeamScore; 6 | private String awayTeam; 7 | private int awayTeamScore; 8 | 9 | public Game(String homeTeam, int homeTeamScore, String awayTeam, int awayTeamScore) { 10 | this.homeTeam = homeTeam; 11 | this.homeTeamScore = homeTeamScore; 12 | this.awayTeam = awayTeam; 13 | this.awayTeamScore = awayTeamScore; 14 | } 15 | 16 | public String getHomeTeam() { 17 | return homeTeam; 18 | } 19 | 20 | public int getHomeTeamScore() { 21 | return homeTeamScore; 22 | } 23 | 24 | public String getAwayTeam() { 25 | return awayTeam; 26 | } 27 | 28 | public int getAwayTeamScore() { 29 | return awayTeamScore; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ROUND_2_A/test/FootballScoreStatsTests.java: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FootballScoreStatsTests { 7 | 8 | @Test 9 | public void totalsFootballScoresForTeam() { 10 | FootballScoreStats stats = new FootballScoreStats(); 11 | assertEquals(6, stats.teamTotal("Liverpool")); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ROUND_2_B/.classpath: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <classpath> 3 | <classpathentry kind="src" path="src"/> 4 | <classpathentry kind="src" path="test"/> 5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 7 | <classpathentry kind="output" path="bin"/> 8 | </classpath> 9 | -------------------------------------------------------------------------------- /ROUND_2_B/.project: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <projectDescription> 3 | <name>ROUND_2_B</name> 4 | <comment></comment> 5 | <projects> 6 | </projects> 7 | <buildSpec> 8 | <buildCommand> 9 | <name>org.eclipse.jdt.core.javabuilder</name> 10 | <arguments> 11 | </arguments> 12 | </buildCommand> 13 | </buildSpec> 14 | <natures> 15 | <nature>org.eclipse.jdt.core.javanature</nature> 16 | </natures> 17 | </projectDescription> 18 | -------------------------------------------------------------------------------- /ROUND_2_B/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /ROUND_2_B/bin/FootballData.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_2_B/bin/FootballData.class -------------------------------------------------------------------------------- /ROUND_2_B/bin/FootballScoreStats.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_2_B/bin/FootballScoreStats.class -------------------------------------------------------------------------------- /ROUND_2_B/bin/FootballScoreStatsTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_2_B/bin/FootballScoreStatsTests.class -------------------------------------------------------------------------------- /ROUND_2_B/bin/Game.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_2_B/bin/Game.class -------------------------------------------------------------------------------- /ROUND_2_B/bin/GameData.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_2_B/bin/GameData.class -------------------------------------------------------------------------------- /ROUND_2_B/src/FootballData.java: -------------------------------------------------------------------------------- 1 | 2 | public class FootballData implements GameData { 3 | 4 | public Game[] getAllPlayed() { 5 | Game[] played = new Game[3]; 6 | played[0] = new Game("Liverpool", 2, "Everton", 0); 7 | played[1] = new Game("Aston Villa", 1, "Liverpool", 1); 8 | played[2] = new Game("Liverpool", 3, "West Ham", 1); 9 | return played; 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ROUND_2_B/src/FootballScoreStats.java: -------------------------------------------------------------------------------- 1 | 2 | public class FootballScoreStats { 3 | 4 | private final GameData footballData; 5 | 6 | public FootballScoreStats(GameData gameData) { 7 | footballData = gameData; 8 | } 9 | 10 | public int teamTotal(String teamName) { 11 | int total = 0; 12 | Game[] played = footballData.getAllPlayed(); 13 | for (Game game : played) { 14 | total += game.getTeamScore(teamName); 15 | } 16 | return total; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ROUND_2_B/src/Game.java: -------------------------------------------------------------------------------- 1 | 2 | public class Game { 3 | 4 | private String homeTeam; 5 | private int homeTeamScore; 6 | private String awayTeam; 7 | private int awayTeamScore; 8 | 9 | public Game(String homeTeam, int homeTeamScore, String awayTeam, int awayTeamScore) { 10 | this.homeTeam = homeTeam; 11 | this.homeTeamScore = homeTeamScore; 12 | this.awayTeam = awayTeam; 13 | this.awayTeamScore = awayTeamScore; 14 | } 15 | 16 | int getTeamScore(String teamName) { 17 | int total = 0; 18 | if(homeTeam.equals(teamName)){ 19 | total = homeTeamScore; 20 | } 21 | if(awayTeam.equals(teamName)){ 22 | total = awayTeamScore; 23 | } 24 | return total; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ROUND_2_B/src/GameData.java: -------------------------------------------------------------------------------- 1 | public interface GameData { 2 | 3 | public Game[] getAllPlayed(); 4 | 5 | } -------------------------------------------------------------------------------- /ROUND_2_B/test/FootballScoreStatsTests.java: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class FootballScoreStatsTests { 7 | 8 | @Test 9 | public void totalsFootballScoresForTeam() { 10 | FootballScoreStats stats = new FootballScoreStats(new FootballData()); 11 | assertEquals(6, stats.teamTotal("Liverpool")); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ROUND_3_A/.classpath: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <classpath> 3 | <classpathentry kind="src" path="src"/> 4 | <classpathentry kind="src" path="test"/> 5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 7 | <classpathentry kind="output" path="bin"/> 8 | </classpath> 9 | -------------------------------------------------------------------------------- /ROUND_3_A/.project: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <projectDescription> 3 | <name>ROUND_3_A</name> 4 | <comment></comment> 5 | <projects> 6 | </projects> 7 | <buildSpec> 8 | <buildCommand> 9 | <name>org.eclipse.jdt.core.javabuilder</name> 10 | <arguments> 11 | </arguments> 12 | </buildCommand> 13 | </buildSpec> 14 | <natures> 15 | <nature>org.eclipse.jdt.core.javanature</nature> 16 | </natures> 17 | </projectDescription> 18 | -------------------------------------------------------------------------------- /ROUND_3_A/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /ROUND_3_A/bin/SortKind.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_3_A/bin/SortKind.class -------------------------------------------------------------------------------- /ROUND_3_A/bin/Sorter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_3_A/bin/Sorter.class -------------------------------------------------------------------------------- /ROUND_3_A/bin/SorterTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_3_A/bin/SorterTests.class -------------------------------------------------------------------------------- /ROUND_3_A/src/SortKind.java: -------------------------------------------------------------------------------- 1 | 2 | public enum SortKind { 3 | BUBBLE, QUICK, INSERTION 4 | 5 | } 6 | -------------------------------------------------------------------------------- /ROUND_3_A/test/SorterTests.java: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class SorterTests { 7 | 8 | @Test 9 | public void bubblesortPutsArrayInAscendingOrder() { 10 | int[] array = {3,1,2}; 11 | array = new Sorter().sort(SortKind.BUBBLE, array); 12 | assertArrayEquals(new int[]{1,2,3}, array ); 13 | } 14 | 15 | @Test 16 | public void quicksortPutsArrayInAscendingOrder() { 17 | int[] array = {3,1,2}; 18 | array = new Sorter().sort(SortKind.QUICK, array); 19 | assertArrayEquals(new int[]{1,2,3}, array ); 20 | } 21 | 22 | @Test 23 | public void insertionsortPutsArrayInAscendingOrder() { 24 | int[] array = {3,1,2}; 25 | array = new Sorter().sort(SortKind.INSERTION, array); 26 | assertArrayEquals(new int[]{1,2,3}, array ); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /ROUND_3_B/.classpath: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <classpath> 3 | <classpathentry kind="src" path="src"/> 4 | <classpathentry kind="src" path="test"/> 5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 7 | <classpathentry kind="output" path="bin"/> 8 | </classpath> 9 | -------------------------------------------------------------------------------- /ROUND_3_B/.project: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <projectDescription> 3 | <name>ROUND_3_B</name> 4 | <comment></comment> 5 | <projects> 6 | </projects> 7 | <buildSpec> 8 | <buildCommand> 9 | <name>org.eclipse.jdt.core.javabuilder</name> 10 | <arguments> 11 | </arguments> 12 | </buildCommand> 13 | </buildSpec> 14 | <natures> 15 | <nature>org.eclipse.jdt.core.javanature</nature> 16 | </natures> 17 | </projectDescription> 18 | -------------------------------------------------------------------------------- /ROUND_3_B/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /ROUND_3_B/bin/BubbleSort.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_3_B/bin/BubbleSort.class -------------------------------------------------------------------------------- /ROUND_3_B/bin/InsertionSort.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_3_B/bin/InsertionSort.class -------------------------------------------------------------------------------- /ROUND_3_B/bin/QuickSort.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_3_B/bin/QuickSort.class -------------------------------------------------------------------------------- /ROUND_3_B/bin/Sort.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_3_B/bin/Sort.class -------------------------------------------------------------------------------- /ROUND_3_B/bin/Sorter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_3_B/bin/Sorter.class -------------------------------------------------------------------------------- /ROUND_3_B/bin/SorterTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_3_B/bin/SorterTests.class -------------------------------------------------------------------------------- /ROUND_3_B/src/BubbleSort.java: -------------------------------------------------------------------------------- 1 | 2 | public class BubbleSort extends Sort { 3 | 4 | public int[] sort(int[] input) { 5 | boolean sorted = false; 6 | while(!sorted){ 7 | sorted = true; 8 | for (int i = 0; i < input.length - 1; i++) { 9 | if(input[i] > input[i+1]){ 10 | swap(input, i, i+1); 11 | sorted = false; 12 | } 13 | } 14 | } 15 | return input; 16 | } 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /ROUND_3_B/src/InsertionSort.java: -------------------------------------------------------------------------------- 1 | 2 | public class InsertionSort extends Sort { 3 | 4 | public int[] sort(int[] input) { 5 | for (int i = 0; i < input.length - 1; i++) { 6 | for(int j = i+1;j > 0;j--){ 7 | if(input[j] < input[j-1]){ 8 | swap(input, j, j-1); 9 | } 10 | } 11 | } 12 | return input; 13 | } 14 | 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /ROUND_3_B/src/Sort.java: -------------------------------------------------------------------------------- 1 | 2 | public abstract class Sort { 3 | 4 | public abstract int[] sort(int[] input); 5 | 6 | protected void swap(int[] input, int index1, int index2) { 7 | int first = input[index1]; 8 | int second = input[index2]; 9 | input[index1] = second; 10 | input[index2] = first; 11 | } 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /ROUND_3_B/src/Sorter.java: -------------------------------------------------------------------------------- 1 | 2 | public class Sorter { 3 | 4 | public int[] sort(Sort sort, int[] input) { 5 | return sort.sort(input); 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /ROUND_3_B/test/SorterTests.java: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class SorterTests { 7 | 8 | @Test 9 | public void bubblesortPutsArrayInAscendingOrder() { 10 | int[] array = {3,1,2}; 11 | array = new Sorter().sort(new BubbleSort(), array); 12 | assertArrayEquals(new int[]{1,2,3}, array ); 13 | } 14 | 15 | @Test 16 | public void quicksortPutsArrayInAscendingOrder() { 17 | int[] array = {3,1,2}; 18 | array = new Sorter().sort(new QuickSort(), array); 19 | assertArrayEquals(new int[]{1,2,3}, array ); 20 | } 21 | 22 | @Test 23 | public void insertionsortPutsArrayInAscendingOrder() { 24 | int[] array = {3,1,2}; 25 | array = new Sorter().sort(new InsertionSort(), array); 26 | assertArrayEquals(new int[]{1,2,3}, array ); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /ROUND_4_A/.classpath: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <classpath> 3 | <classpathentry kind="src" path="src"/> 4 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 5 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 6 | <classpathentry kind="output" path="bin"/> 7 | </classpath> 8 | -------------------------------------------------------------------------------- /ROUND_4_A/.project: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <projectDescription> 3 | <name>ROUND_4_A</name> 4 | <comment></comment> 5 | <projects> 6 | </projects> 7 | <buildSpec> 8 | <buildCommand> 9 | <name>org.eclipse.jdt.core.javabuilder</name> 10 | <arguments> 11 | </arguments> 12 | </buildCommand> 13 | </buildSpec> 14 | <natures> 15 | <nature>org.eclipse.jdt.core.javanature</nature> 16 | </natures> 17 | </projectDescription> 18 | -------------------------------------------------------------------------------- /ROUND_4_A/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /ROUND_4_A/bin/Library.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_4_A/bin/Library.class -------------------------------------------------------------------------------- /ROUND_4_A/bin/LibraryTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_4_A/bin/LibraryTests.class -------------------------------------------------------------------------------- /ROUND_4_A/src/LibraryTests.java: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorId = "Jason123"; 13 | library.donate(titleName, donorId ); 14 | Object[] donatedTitle = library.getTitles().get(titleName); 15 | assertEquals(titleName, (String) donatedTitle[0]); 16 | assertEquals(donorId, (String)donatedTitle[1]); 17 | assertEquals(1, (int)donatedTitle[2]); 18 | assertEquals(1, library.getTitlesDonatedByMember(donorId).size()); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /ROUND_4_B/.classpath: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <classpath> 3 | <classpathentry kind="src" path="src"/> 4 | <classpathentry kind="src" path="test"/> 5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 7 | <classpathentry kind="output" path="bin"/> 8 | </classpath> 9 | -------------------------------------------------------------------------------- /ROUND_4_B/.project: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <projectDescription> 3 | <name>ROUND_4_B</name> 4 | <comment></comment> 5 | <projects> 6 | </projects> 7 | <buildSpec> 8 | <buildCommand> 9 | <name>org.eclipse.jdt.core.javabuilder</name> 10 | <arguments> 11 | </arguments> 12 | </buildCommand> 13 | </buildSpec> 14 | <natures> 15 | <nature>org.eclipse.jdt.core.javanature</nature> 16 | </natures> 17 | </projectDescription> 18 | -------------------------------------------------------------------------------- /ROUND_4_B/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /ROUND_4_B/bin/Library.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_4_B/bin/Library.class -------------------------------------------------------------------------------- /ROUND_4_B/bin/LibraryTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_4_B/bin/LibraryTests.class -------------------------------------------------------------------------------- /ROUND_4_B/bin/Member.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_4_B/bin/Member.class -------------------------------------------------------------------------------- /ROUND_4_B/bin/Title.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_4_B/bin/Title.class -------------------------------------------------------------------------------- /ROUND_4_B/src/Library.java: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.Collection; 3 | import java.util.HashMap; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | 8 | public class Library { 9 | 10 | private Map<String, Title> titles = new HashMap<String, Title>(); 11 | 12 | public Map<String, Title> getTitles() { 13 | return titles; 14 | } 15 | 16 | public void donate(Title title) { 17 | titles.put(title.getTitleName(), title); 18 | } 19 | 20 | public Collection<Title> getTitlesDonatedByMember(String donorMembershipId) { 21 | List<Title> memberTitles = new ArrayList<Title>(); 22 | for (Title title : titles.values()) { 23 | if(title.getDonorId().equals(donorMembershipId)){ 24 | memberTitles.add(title); 25 | } 26 | } 27 | return memberTitles; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /ROUND_4_B/src/Member.java: -------------------------------------------------------------------------------- 1 | public class Member { 2 | 3 | protected final String membershipId; 4 | 5 | public Member(String id) { 6 | membershipId = id; 7 | } 8 | 9 | public String getId() { 10 | return membershipId; 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /ROUND_4_B/src/Title.java: -------------------------------------------------------------------------------- 1 | public class Title { 2 | 3 | 4 | private String name; 5 | private int copyCount = 1; 6 | private Member donor; 7 | 8 | public Title(String name, Member donor) { 9 | this.name = name; 10 | this.donor = donor; 11 | } 12 | 13 | protected int getCopyCount() { 14 | return copyCount; 15 | } 16 | 17 | protected String getDonorId() { 18 | return donor.getId(); 19 | } 20 | 21 | protected String getTitleName() { 22 | return name; 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /ROUND_4_B/test/LibraryTests.java: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class LibraryTests { 7 | 8 | @Test 9 | public void donatedTitlesAreAddedToLibraryWithOneDefaultCopy() { 10 | Library library = new Library(); 11 | String titleName = "Jaws 3D"; 12 | String donorId = "Jason123"; 13 | Member donor = new Member(donorId); 14 | Title title = new Title(titleName, donor); 15 | library.donate(title ); 16 | title = library.getTitles().get(titleName); 17 | assertEquals(titleName, title.getTitleName()); 18 | assertEquals(donorId, title.getDonorId()); 19 | assertEquals(1, title.getCopyCount()); 20 | assertEquals(1, library.getTitlesDonatedByMember(donorId).size()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /ROUND_5_A/.classpath: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <classpath> 3 | <classpathentry kind="src" path="src"/> 4 | <classpathentry kind="src" path="test"/> 5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 7 | <classpathentry kind="output" path="bin"/> 8 | </classpath> 9 | -------------------------------------------------------------------------------- /ROUND_5_A/.project: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <projectDescription> 3 | <name>ROUND_5_A</name> 4 | <comment></comment> 5 | <projects> 6 | </projects> 7 | <buildSpec> 8 | <buildCommand> 9 | <name>org.eclipse.jdt.core.javabuilder</name> 10 | <arguments> 11 | </arguments> 12 | </buildCommand> 13 | </buildSpec> 14 | <natures> 15 | <nature>org.eclipse.jdt.core.javanature</nature> 16 | </natures> 17 | </projectDescription> 18 | -------------------------------------------------------------------------------- /ROUND_5_A/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /ROUND_5_A/bin/Maths.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_5_A/bin/Maths.class -------------------------------------------------------------------------------- /ROUND_5_A/bin/MathsTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_5_A/bin/MathsTests.class -------------------------------------------------------------------------------- /ROUND_5_A/src/Maths.java: -------------------------------------------------------------------------------- 1 | 2 | public class Maths { 3 | 4 | private static final double ERROR_TOLERANCE = 1e-15; 5 | 6 | public static double sqrroot(double number) { 7 | double guess = number; 8 | while (Math.abs(guess - number/guess) > ERROR_TOLERANCE*guess) { 9 | guess = (number/guess + guess) / 2.0; 10 | } 11 | return guess; 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ROUND_5_A/test/MathsTests.java: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import org.junit.Test; 4 | 5 | 6 | public class MathsTests { 7 | 8 | @Test 9 | public void rootOfOneIsOne() { 10 | assertEquals(1, Maths.sqrroot(1), 1e-15); 11 | } 12 | 13 | @Test 14 | public void rootOfFourIsTwo() { 15 | assertEquals(2, Maths.sqrroot(4), 1e-15); 16 | } 17 | 18 | @Test 19 | public void rootOfNineIsThree() { 20 | assertEquals(3, Maths.sqrroot(9), 1e-15); 21 | } 22 | 23 | @Test 24 | public void rootOfSixteenIsFour() { 25 | assertEquals(4, Maths.sqrroot(16), 1e-15); 26 | } 27 | 28 | @Test 29 | public void rootOfTwoFiveIsPointFive() { 30 | assertEquals(0.5, Maths.sqrroot(0.25), 1e-15); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /ROUND_5_B/.classpath: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <classpath> 3 | <classpathentry kind="src" path="src"/> 4 | <classpathentry kind="src" path="test"/> 5 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 7 | <classpathentry kind="output" path="bin"/> 8 | </classpath> 9 | -------------------------------------------------------------------------------- /ROUND_5_B/.project: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <projectDescription> 3 | <name>ROUND_5_B</name> 4 | <comment></comment> 5 | <projects> 6 | </projects> 7 | <buildSpec> 8 | <buildCommand> 9 | <name>org.eclipse.jdt.core.javabuilder</name> 10 | <arguments> 11 | </arguments> 12 | </buildCommand> 13 | </buildSpec> 14 | <natures> 15 | <nature>org.eclipse.jdt.core.javanature</nature> 16 | </natures> 17 | </projectDescription> 18 | -------------------------------------------------------------------------------- /ROUND_5_B/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /ROUND_5_B/bin/Maths.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_5_B/bin/Maths.class -------------------------------------------------------------------------------- /ROUND_5_B/bin/MathsTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasongorman/RefactoringGolfJava/5503fcbcbdd420ea4e79fe047288b6f774164a3f/ROUND_5_B/bin/MathsTests.class -------------------------------------------------------------------------------- /ROUND_5_B/src/Maths.java: -------------------------------------------------------------------------------- 1 | 2 | public class Maths { 3 | 4 | private static final double ERROR_TOLERANCE = 1e-15; 5 | 6 | public static double sqrroot(double number) { 7 | double guess = number; 8 | while (Math.abs(guess - number/guess) > ERROR_TOLERANCE*guess) { 9 | guess = (number/guess + guess) / 2.0; 10 | } 11 | return guess; 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ROUND_5_B/test/MathsTests.java: -------------------------------------------------------------------------------- 1 | import static org.junit.Assert.*; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | import org.junit.Test; 7 | import org.junit.runner.RunWith; 8 | import org.junit.runners.Parameterized; 9 | import org.junit.runners.Parameterized.Parameters; 10 | 11 | @RunWith(Parameterized.class) 12 | public class MathsTests { 13 | 14 | private final double number; 15 | 16 | public MathsTests(double input) { 17 | number = input; 18 | } 19 | 20 | @Parameters 21 | public static List<Object[]> data() { 22 | return Arrays.asList(new Object[][] { 23 | {1}, 24 | {4}, 25 | {9}, 26 | {16}, 27 | {0.25} 28 | }); 29 | } 30 | 31 | @Test 32 | public void rootSquaredIsOriginalNumber() { 33 | assertEquals(number, Maths.sqrroot(number) * Maths.sqrroot(number), 1e-15); 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------