本文整理汇总了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;
}