001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 (the 006 * "License"); you may not use this file except in compliance with the 007 * License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.http.header; 018 019 020import java.util.function.*; 021 022/** 023 * Represents an HTTP <c>Debug</c> header. 024 * 025 * @since 9.2.1 026 */ 027public class Debug extends HttpBooleanHeader { 028 029 public static final String NAME = "Debug"; 030 031 public Debug(String value) { 032 super(NAME, value); 033 } 034 035 public Debug(boolean value) { 036 super(NAME, Boolean.valueOf(value)); 037 } 038 039 public Debug(Boolean value) { 040 super(NAME, value); 041 } 042 043 private Debug(Supplier<?> supplier, int lazyMode) { 044 super(NAME, supplier, lazyMode); 045 } 046 047 public static Debug of(String value) { 048 return new Debug(value); 049 } 050 051 public static Debug of(boolean value) { 052 return new Debug(value); 053 } 054 055 public static Debug of(Boolean value) { 056 return new Debug(value); 057 } 058 059 public static Debug ofLazyWire(Supplier<String> supplier) { 060 return new Debug(supplier, LAZY_WIRE_STRING); 061 } 062 063 public static Debug ofLazyParsed(Supplier<Boolean> supplier) { 064 return new Debug(supplier, LAZY_BOOLEAN); 065 } 066}