FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
zstack/utils/src/main/java/org/zstack/utils/StringBind.java at master · zstackio/zstack · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
zstackio
/
zstack
Public
Notifications
You must be signed in to change notification settings
Fork
399
Star
1.4k
Code
Issues
163
Pull requests
13
Actions
Projects
Wiki
Security and quality
4
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
zstack
/
utils
/
src
/
main
/
java
/
org
/
zstack
/
utils
/
StringBind.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
29 lines (22 loc) · 578 Bytes
Breadcrumbs
zstack
/
utils
/
src
/
main
/
java
/
org
/
zstack
/
utils
/
StringBind.java
Copy path
File metadata and controls
executable file
·
29 lines (22 loc) · 578 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package
org
.
zstack
.
utils
;
import
java
.
util
.
HashMap
;
import
java
.
util
.
Map
;
import
static
org
.
zstack
.
utils
.
StringDSL
.
ln
;
/**
* Created by xing5 on 2016/6/16.
*/
public
class
StringBind
{
private
String
template
;
private
Map
<
String
,
Object
>
tokens
=
new
HashMap
<>();
public
StringBind
(
String
template
) {
this
.
template
=
template
;
}
public
StringBind
bind
(
String
key
,
Object
value
) {
tokens
.
put
(
key
,
value
);
return
this
;
}
@
Override
public
String
toString
() {
return
ln
(
template
).
formatByMap
(
tokens
);
}
}
Back
|
FazBrowse Home
|
New Git URL