View Javadoc
1   /*
2    * Copyright 2014 The Netty Project
3    *
4    * The Netty Project licenses this file to you under the Apache License,
5    * version 2.0 (the "License"); you may not use this file except in compliance
6    * with the License. You may obtain a copy of the License at:
7    *
8    *   http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13   * License for the specific language governing permissions and limitations
14   * under the License.
15   */
16  
17  package io.netty.handler.codec.http;
18  
19  import io.netty.handler.codec.EmptyTextHeaders;
20  import io.netty.handler.codec.TextHeaders;
21  
22  public class EmptyHttpHeaders extends EmptyTextHeaders implements HttpHeaders {
23  
24      public static final EmptyHttpHeaders INSTANCE = new EmptyHttpHeaders();
25  
26      protected EmptyHttpHeaders() {
27      }
28  
29      @Override
30      public HttpHeaders add(CharSequence name, CharSequence value) {
31          super.add(name, value);
32          return this;
33      }
34  
35      @Override
36      public HttpHeaders add(CharSequence name, Iterable<? extends CharSequence> values) {
37          super.add(name, values);
38          return this;
39      }
40  
41      @Override
42      public HttpHeaders add(CharSequence name, CharSequence... values) {
43          super.add(name, values);
44          return this;
45      }
46  
47      @Override
48      public HttpHeaders addObject(CharSequence name, Object value) {
49          super.addObject(name, value);
50          return this;
51      }
52  
53      @Override
54      public HttpHeaders addObject(CharSequence name, Iterable<?> values) {
55          super.addObject(name, values);
56          return this;
57      }
58  
59      @Override
60      public HttpHeaders addObject(CharSequence name, Object... values) {
61          super.addObject(name, values);
62          return this;
63      }
64  
65      @Override
66      public HttpHeaders addBoolean(CharSequence name, boolean value) {
67          super.addBoolean(name, value);
68          return this;
69      }
70  
71      @Override
72      public HttpHeaders addChar(CharSequence name, char value) {
73          super.addChar(name, value);
74          return this;
75      }
76  
77      @Override
78      public HttpHeaders addByte(CharSequence name, byte value) {
79          super.addByte(name, value);
80          return this;
81      }
82  
83      @Override
84      public HttpHeaders addShort(CharSequence name, short value) {
85          super.addShort(name, value);
86          return this;
87      }
88  
89      @Override
90      public HttpHeaders addInt(CharSequence name, int value) {
91          super.addInt(name, value);
92          return this;
93      }
94  
95      @Override
96      public HttpHeaders addLong(CharSequence name, long value) {
97          super.addLong(name, value);
98          return this;
99      }
100 
101     @Override
102     public HttpHeaders addFloat(CharSequence name, float value) {
103         super.addFloat(name, value);
104         return this;
105     }
106 
107     @Override
108     public HttpHeaders addDouble(CharSequence name, double value) {
109         super.addDouble(name, value);
110         return this;
111     }
112 
113     @Override
114     public HttpHeaders addTimeMillis(CharSequence name, long value) {
115         super.addTimeMillis(name, value);
116         return this;
117     }
118 
119     @Override
120     public HttpHeaders add(TextHeaders headers) {
121         super.add(headers);
122         return this;
123     }
124 
125     @Override
126     public HttpHeaders set(CharSequence name, CharSequence value) {
127         super.set(name, value);
128         return this;
129     }
130 
131     @Override
132     public HttpHeaders set(CharSequence name, Iterable<? extends CharSequence> values) {
133         super.set(name, values);
134         return this;
135     }
136 
137     @Override
138     public HttpHeaders set(CharSequence name, CharSequence... values) {
139         super.set(name, values);
140         return this;
141     }
142 
143     @Override
144     public HttpHeaders setObject(CharSequence name, Object value) {
145         super.setObject(name, value);
146         return this;
147     }
148 
149     @Override
150     public HttpHeaders setObject(CharSequence name, Iterable<?> values) {
151         super.setObject(name, values);
152         return this;
153     }
154 
155     @Override
156     public HttpHeaders setObject(CharSequence name, Object... values) {
157         super.setObject(name, values);
158         return this;
159     }
160 
161     @Override
162     public HttpHeaders setBoolean(CharSequence name, boolean value) {
163         super.setBoolean(name, value);
164         return this;
165     }
166 
167     @Override
168     public HttpHeaders setChar(CharSequence name, char value) {
169         super.setChar(name, value);
170         return this;
171     }
172 
173     @Override
174     public HttpHeaders setByte(CharSequence name, byte value) {
175         super.setByte(name, value);
176         return this;
177     }
178 
179     @Override
180     public HttpHeaders setShort(CharSequence name, short value) {
181         super.setShort(name, value);
182         return this;
183     }
184 
185     @Override
186     public HttpHeaders setInt(CharSequence name, int value) {
187         super.setInt(name, value);
188         return this;
189     }
190 
191     @Override
192     public HttpHeaders setLong(CharSequence name, long value) {
193         super.setLong(name, value);
194         return this;
195     }
196 
197     @Override
198     public HttpHeaders setFloat(CharSequence name, float value) {
199         super.setFloat(name, value);
200         return this;
201     }
202 
203     @Override
204     public HttpHeaders setDouble(CharSequence name, double value) {
205         super.setDouble(name, value);
206         return this;
207     }
208 
209     @Override
210     public HttpHeaders setTimeMillis(CharSequence name, long value) {
211         super.setTimeMillis(name, value);
212         return this;
213     }
214 
215     @Override
216     public HttpHeaders set(TextHeaders headers) {
217         super.set(headers);
218         return this;
219     }
220 
221     @Override
222     public HttpHeaders setAll(TextHeaders headers) {
223         super.setAll(headers);
224         return this;
225     }
226 
227     @Override
228     public HttpHeaders clear() {
229         super.clear();
230         return this;
231     }
232 }