MCPcopy Create free account
hub / github.com/FongMi/TV / format

Method format

app/src/main/java/com/fongmi/android/tv/bean/Catchup.java:110–115  ·  view source on GitHub ↗
(String url, EpgData data)

Source from the content-addressed store, hash-verified

108 }
109
110 public String format(String url, EpgData data) {
111 String result = getSource();
112 Matcher matcher = TOKEN_PATTERN.matcher(result);
113 while (matcher.find()) result = result.replace(matcher.group(1), format(matcher.group(1), data.getStartTime(), data.getEndTime()));
114 return isDefault() ? result : append(url, result);
115 }
116
117 private String formatTime(long millis, String fmt) {
118 if (fmt.equals("timestamp")) return String.valueOf(millis / 1000);

Callers 1

formatTimeMethod · 0.45

Calls 13

getSourceMethod · 0.95
isDefaultMethod · 0.95
appendMethod · 0.95
formatTimeMethod · 0.95
groupMethod · 0.80
getStartTimeMethod · 0.80
getEndTimeMethod · 0.80
valueOfMethod · 0.80
findMethod · 0.45
replaceMethod · 0.45
indexOfMethod · 0.45
startsWithMethod · 0.45

Tested by

no test coverage detected