This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/groovy | |
| s = [ | |
| 'a': '1', | |
| 'b': '2', | |
| 'c': '3', | |
| 'd': '4', | |
| 'e': '5' | |
| ] | |
| p = [ 'c', 'd' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/groovy | |
| s = [ | |
| 'a': '1', | |
| 'b': '2', | |
| 'c': '3', | |
| 'd': '4', | |
| 'e': '5' | |
| ] | |
| p = [ 'c', 'd' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/groovy | |
| s = [ | |
| 'a': '1', | |
| 'b': '2', | |
| 'c': '3', | |
| 'd': '4', | |
| 'e': '5' | |
| ] | |
| p = [ 'c', 'd' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/groovy | |
| s = [ | |
| 'a': '1', | |
| 'b': '2', | |
| 'c': '3', | |
| 'd': '4', | |
| 'e': '5' | |
| ] | |
| p = [ 'c', 'd' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/groovy | |
| s = [ | |
| 'a': '1', | |
| 'b': '2', | |
| 'c': '3', | |
| 'd': '4', | |
| 'e': '5' | |
| ] | |
| p = [ 'c', 'd' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/groovy | |
| s = "something" | |
| t = "${s} else" | |
| println t //something else | |
| println s.getClass().name //java.lang.String | |
| Map m = [s: t] | |
| println m[s].getClass().name //org.codehaus.groovy.runtime.NullObject | |
| println m[s] //null | |
| m.each{k, v-> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/groovy | |
| s = "something" | |
| t = "${s} else" | |
| println "${s}".getClass().name //org.codehaus.groovy.runtime.GStringImpl | |
| Map mm = ["${s}": "${t}"] | |
| println mm["${s}"].getClass().name //org.codehaus.groovy.runtime.NullObject | |
| println mm["${s}"] //null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| s = "something" | |
| t = "${s} else" | |
| Map m = [:] // [s: t] | |
| m[s] = t | |
| println m[s].getClass().name //org.codehaus.groovy.runtime.GStringImpl | |
| println m[s] //something else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/groovy | |
| s = "something" | |
| t = "${s} else" | |
| println t //something else | |
| println s.getClass().name //java.lang.String | |
| Map m = [s: t] | |
| println m[s].getClass().name //org.codehaus.groovy.runtime.NullObject | |
| println m[s] //null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/groovy | |
| s = "something" | |
| t = "something else" | |
| //println s // something | |
| //println t // something else | |
| //println s, t // failed with exceptions | |
| println [s, t] |
NewerOlder