本文整理汇总了Java中com.google.samples.apps.iosched.util.HashUtils.computeWeakHash方法的典型用法代码示例。如果您正苦于以下问题:Java HashUtils.computeWeakHash方法的具体用法?Java HashUtils.computeWeakHash怎么用?Java HashUtils.computeWeakHash使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.samples.apps.iosched.util.HashUtils
的用法示例。
在下文中一共展示了HashUtils.computeWeakHash方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getImportHashcode
import com.google.samples.apps.iosched.util.HashUtils; //导入方法依赖的package包/类
public String getImportHashcode() {
StringBuilder sb = new StringBuilder();
sb.append("id").append(id == null ? "" : id)
.append("year").append(year)
.append("title").append(title == null ? "" : title)
.append("desc").append(desc == null ? "" : desc)
.append("vid").append(vid == null ? "" : vid)
.append("topic").append(topic == null ? "" : topic)
.append("speakers").append(speakers == null ? "" : speakers)
.append("thumbnailUrl").append(thumbnailUrl == null ? "" : thumbnailUrl);
return HashUtils.computeWeakHash(sb.toString());
}
示例2: getImportHashcode
import com.google.samples.apps.iosched.util.HashUtils; //导入方法依赖的package包/类
public String getImportHashcode() {
StringBuilder sb = new StringBuilder();
sb.append("id").append(id == null ? "" : id)
.append("publicPlusId").append(publicPlusId == null ? "" : publicPlusId)
.append("bio").append(bio == null ? "" : bio)
.append("name").append(name == null ? "" : name)
.append("company").append(company== null ? "" : company)
.append("plusoneUrl").append(plusoneUrl == null ? "" : plusoneUrl)
.append("twitterUrl").append(twitterUrl == null ? "" : twitterUrl)
.append("thumbnailUrl").append(thumbnailUrl == null ? "" : thumbnailUrl);
return HashUtils.computeWeakHash(sb.toString());
}
示例3: getImportHashCode
import com.google.samples.apps.iosched.util.HashUtils; //导入方法依赖的package包/类
public String getImportHashCode() {
StringBuilder sb = new StringBuilder();
sb.append("id").append(id == null ? "" : id)
.append("description").append(description == null ? "" : description)
.append("title").append(title == null ? "" : title)
.append("url").append(url == null ? "" : url)
.append("startTimestamp").append(startTimestamp == null ? "" : startTimestamp)
.append("endTimestamp").append(endTimestamp == null ? "" : endTimestamp)
.append("youtubeUrl").append(youtubeUrl == null ? "" : youtubeUrl)
.append("subtype").append(subtype == null ? "" : subtype)
.append("room").append(room == null ? "" : room)
.append("hashtag").append(hashtag == null ? "" : hashtag)
.append("isLivestream").append(isLivestream ? "true" : "false")
.append("mainTag").append(mainTag)
.append("captionsUrl").append(captionsUrl)
.append("photoUrl").append(photoUrl)
.append("relatedContent").append(relatedContent)
.append("color").append(color)
.append("groupingOrder").append(groupingOrder);
for (String tag : tags) {
sb.append("tag").append(tag);
}
for (String speaker : speakers) {
sb.append("speaker").append(speaker);
}
return HashUtils.computeWeakHash(sb.toString());
}
示例4: getImportHashCode
import com.google.samples.apps.iosched.util.HashUtils; //导入方法依赖的package包/类
public String getImportHashCode() {
StringBuilder sb = new StringBuilder();
sb.append("id").append(id == null ? "" : id)
.append("plusId").append(plusId == null ? "" : plusId)
.append("bio").append(bio == null ? "" : bio)
.append("name").append(name == null ? "" : name)
.append("title").append(title == null ? "" : title)
.append("url").append(url == null ? "" : url)
.append("imageUrl").append(imageUrl == null ? "" : imageUrl)
.append("country").append(country == null ? "" : country)
.append("city").append(city == null ? "" : city)
.append("attending").append(attending);
return HashUtils.computeWeakHash(sb.toString());
}
示例5: getImportHashcode
import com.google.samples.apps.iosched.util.HashUtils; //导入方法依赖的package包/类
public String getImportHashcode() {
StringBuilder sb = new StringBuilder();
sb.append("id").append(id == null ? "" : id)
.append("publicPlusId").append(publicPlusId == null ? "" : publicPlusId)
.append("bio").append(bio == null ? "" : bio)
.append("name").append(name == null ? "" : name)
.append("company").append(company== null ? "" : company)
.append("plusoneUrl").append(plusoneUrl == null ? "" : plusoneUrl)
.append("thumbnailUrl").append(thumbnailUrl == null ? "" : thumbnailUrl);
return HashUtils.computeWeakHash(sb.toString());
}
示例6: getCacheKey
import com.google.samples.apps.iosched.util.HashUtils; //导入方法依赖的package包/类
/**
* Returns the cache key to be used to store the given URL. The cache key is the
* file name under which the contents of the URL are stored.
* @param url The URL.
* @return The cache key (guaranteed to be a valid filename)
*/
private String getCacheKey(String url) {
return HashUtils.computeWeakHash(url.trim()) + String.format("%04x", url.length());
}
示例7: getCacheKey
import com.google.samples.apps.iosched.util.HashUtils; //导入方法依赖的package包/类
/**
* Returns the cache key to be used to store the given URL. The cache key is the file name under
* which the contents of the URL are stored.
*
* @param url The URL.
* @return The cache key (guaranteed to be a valid filename)
*/
private String getCacheKey(String url) {
return HashUtils.computeWeakHash(url.trim()) + String.format("%04x", url.length());
}