本文整理匯總了Java中nl.basjes.parse.core.Casts.STRING_OR_LONG屬性的典型用法代碼示例。如果您正苦於以下問題:Java Casts.STRING_OR_LONG屬性的具體用法?Java Casts.STRING_OR_LONG怎麽用?Java Casts.STRING_OR_LONG使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類nl.basjes.parse.core.Casts
的用法示例。
在下文中一共展示了Casts.STRING_OR_LONG屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: prepareForDissect
@Override
public EnumSet<Casts> prepareForDissect(final String inputname, final String outputname) {
String name = extractFieldName(inputname, outputname);
if ("epoch".equals(name)) {
wantTime = true;
return Casts.STRING_OR_LONG;
}
if ("ip".equals(name)) {
wantIp = true;
return Casts.STRING_OR_LONG;
}
if ("processid".equals(name)) {
wantProcessId = true;
return Casts.STRING_OR_LONG;
}
if ("counter".equals(name)) {
wantCounter = true;
return Casts.STRING_OR_LONG;
}
if ("threadindex".equals(name)) {
wantThreadIndex = true;
return Casts.STRING_OR_LONG;
}
return null;
}
示例2: prepareForDissect
@Override
public EnumSet<Casts> prepareForDissect(final String inputname, final String outputname) {
String name = extractFieldName(inputname, outputname);
switch (name) {
case "value": return Casts.STRING_ONLY;
case "expires": return Casts.STRING_OR_LONG;
case "path": return Casts.STRING_ONLY;
case "domain": return Casts.STRING_ONLY;
case "comment": return Casts.STRING_ONLY;
default: return Casts.STRING_ONLY;
}
}
示例3: prepareForDissect
@Override
public EnumSet<Casts> prepareForDissect(String inputname, String outputname) {
String name = extractFieldName(inputname, outputname);
if ("width".equals(name)) {
wantWidth = true;
return Casts.STRING_OR_LONG;
}
if ("height".equals(name)) {
wantHeight = true;
return Casts.STRING_OR_LONG;
}
return null;
}
示例4: prepareForDissect
@Override
public EnumSet<Casts> prepareForDissect(final String inputname, final String outputname) {
String name = extractFieldName(inputname, outputname);
if ("protocol".equals(name)) {
wantProtocol = true;
return Casts.STRING_ONLY;
}
if ("userinfo".equals(name)) {
wantUserinfo = true;
return Casts.STRING_ONLY;
}
if ("host".equals(name)) {
wantHost = true;
return Casts.STRING_ONLY;
}
if ("port".equals(name)) {
wantPort = true;
return Casts.STRING_OR_LONG;
}
if ("path".equals(name)) {
wantPath = true;
return Casts.STRING_ONLY;
}
if ("query".equals(name)) {
wantQuery = true;
return Casts.STRING_ONLY;
}
if ("ref".equals(name)) {
wantRef = true;
return Casts.STRING_ONLY;
}
return null;
}