gpt4 book ai didi

com.anrisoftware.sscontrol.core.yesno.YesNoFlag类的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 06:46:49 28 4
gpt4 key购买 nike

本文整理了Java中com.anrisoftware.sscontrol.core.yesno.YesNoFlag类的一些代码示例,展示了YesNoFlag类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YesNoFlag类的具体详情如下:
包路径:com.anrisoftware.sscontrol.core.yesno.YesNoFlag
类名称:YesNoFlag

YesNoFlag介绍

[英]Yes/no flag.
[中]是/否标志。

代码示例

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd

private Map<String, Object> convertYesno(Map<String, Object> map) {
  Map<String, Object> result = new HashMap<String, Object>(map);
  for (Map.Entry<String, Object> entry : map.entrySet()) {
    if (entry.getValue() instanceof YesNoFlag) {
      YesNoFlag flag = (YesNoFlag) entry.getValue();
      result.put(entry.getKey(), flag.asBoolean());
    }
  }
  return result;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-core

/**
 * Returns the value of the flag.
 * 
 * @param flag
 *            the {@link Object} flag.
 * 
 * @return the flag value.
 */
public static boolean valueOf(Object flag) {
  if (flag instanceof YesNoFlag) {
    return ((YesNoFlag) flag).asBoolean();
  }
  if (flag instanceof Boolean) {
    return (Boolean) flag;
  } else {
    try {
      return YesNoFlag.valueOf(flag.toString()).asBoolean();
    } catch (IllegalArgumentException e) {
      return Boolean.valueOf(flag.toString());
    }
  }
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-gitit

boolean caching(GititService service, Map<String, Object> args) {
  Object caching = args.get(ENABLED);
  notNull(caching, caching_null.toString(), service);
  return YesNoFlag.valueOf(caching);
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-gitit

boolean idleGc(GititService service, Map<String, Object> args) {
  Object gc = args.get(GC);
  notNull(gc, gc_null.toString(), service);
  return YesNoFlag.valueOf(gc);
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-gitit

public Boolean getCaching() {
  Object value = statementsMap.mapValue(CACHING, ENABLED);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  return (Boolean) value;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-wordpress

@Override
public Boolean getForceSslAdmin() {
  Object value = statementsMap.mapValue(FORCE_KEY, ADMIN_KEY);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  if (value instanceof Boolean) {
    return (Boolean) value;
  }
  return null;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd

@Override
public Boolean getEnabledAccessLog() {
  Object value = statementsMap.mapValue(ACCESS_KEY, LOG_KEY);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  return (Boolean) value;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-gitit

public Boolean getCompressResponses() {
  Object value = statementsMap.mapValue(COMPRESS, RESPONSES);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  return (Boolean) value;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-gitit

public Boolean getRecaptchaEnable() {
  Object value = statementsMap.mapValue(RECAPTCHA, ENABLED);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  return (Boolean) value;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-gitit

public Boolean getFeedsEnabled() {
  Object value = statementsMap.mapValue(FEEDS, ENABLED);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  return (Boolean) value;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-wordpress

@Override
public Boolean getForceSslLogin() {
  Object value = statementsMap.mapValue(FORCE_KEY, LOGIN_KEY);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  if (value instanceof Boolean) {
    return (Boolean) value;
  }
  return null;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-yourls

@Override
public Boolean getUniqueUrls() {
  Object value = statementsMap.mapValue(UNIQUE_KEY, URLS_KEY);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  } else {
    return (Boolean) value;
  }
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-mail

private void setResetAliases(Object flag) {
  log.checkFlag(flag);
  if (flag instanceof YesNoFlag) {
    this.resetAliases = ((YesNoFlag) flag).asBoolean();
  } else {
    this.resetAliases = (Boolean) flag;
  }
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-gitit

public Boolean getTableOfContents() {
  Object value = statementsMap.value(TABLEOFCONTENTS);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  return (Boolean) value;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-gitit

public Boolean getIdleGc() {
  Object value = statementsMap.mapValue(IDLE, GC);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  return (Boolean) value;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-wordpress

@Override
public Boolean getCacheEnabled() {
  Object value = statementsMap.mapValue(CACHE_KEY, ENABLED_KEY);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  if (value instanceof Boolean) {
    return (Boolean) value;
  }
  return null;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd

/**
 * Returns whether authorization and authentication are passed to lower
 * level modules.
 *
 * @return {@code true} if enabled or {@code null}.
 */
public Boolean getAuthoritative() {
  Object value = statementsMap.mapValue(TYPE_KEY, AUTHORITATIVE_KEY);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  return (Boolean) value;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd-wordpress

@Override
public OverrideMode getOverrideMode() {
  Object value = statementsMap.mapValue(OVERRIDE_KEY, MODE_KEY);
  if (value instanceof OverrideMode) {
    return (OverrideMode) value;
  }
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean() ? override : no;
  }
  if (value instanceof Boolean) {
    return (Boolean) value ? override : no;
  }
  return null;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd

/**
 * Returns allows empty passwords.
 * <p>
 *
 * <pre>
 * httpd {
 *     domain "test1.com", address: "192.168.0.51", {
 *         setup "auth-db", auth: "Private Directory", location: "/private", {
 *             allow emptyPasswords: no
 *         }
 *     }
 * }
 * </pre>
 *
 * @return the {@link String} name or {@code null}.
 */
public Boolean getAllowEmptyPasswords() {
  Object value = statementsMap.mapValue(ALLOW_KEY, EMPTY_PASSWORDS_KEY);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  return (Boolean) value;
}

代码示例来源:origin: com.anrisoftware.sscontrol/sscontrol-httpd

/**
 * Returns whether authorization and authentication are passed to lower
 * level modules.
 *
 * <p>
 *
 * <pre>
 * httpd {
 *     domain "test1.com", address: "192.168.0.51", {
 *         setup "auth-ldap", auth: "Private Directory", location: "/private", {
 *             type AuthType.basic, satisfy: AuthType.any, authoritative: no
 *         }
 *     }
 * }
 * </pre>
 *
 * @return {@code true} if enabled or {@code null}.
 */
public Boolean getAuthoritative() {
  Object value = statementsMap.mapValue(TYPE_KEY, AUTHORITATIVE_KEY);
  if (value instanceof YesNoFlag) {
    return ((YesNoFlag) value).asBoolean();
  }
  return (Boolean) value;
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com