View Javadoc
1   /*
2    * Copyright 2014 The Netty Project
3    *
4    * The Netty Project licenses this file to you under the Apache License, version 2.0 (the
5    * "License"); you may not use this file except in compliance with the License. You may obtain a
6    * 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 distributed under the License
11   * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing permissions and limitations under
13   * the License.
14   */
15  package io.netty.handler.codec;
16  
17  import java.util.Collections;
18  import java.util.Comparator;
19  import java.util.Iterator;
20  import java.util.List;
21  import java.util.Map.Entry;
22  import java.util.Set;
23  
24  public class EmptyConvertibleHeaders<UnconvertedType, ConvertedType> extends
25          EmptyHeaders<UnconvertedType> implements ConvertibleHeaders<UnconvertedType, ConvertedType> {
26  
27      @Override
28      public ConvertedType getAndConvert(UnconvertedType name) {
29          return null;
30      }
31  
32      @Override
33      public ConvertedType getAndConvert(UnconvertedType name, ConvertedType defaultValue) {
34          return defaultValue;
35      }
36  
37      @Override
38      public ConvertedType getAndRemoveAndConvert(UnconvertedType name) {
39          return null;
40      }
41  
42      @Override
43      public ConvertedType getAndRemoveAndConvert(UnconvertedType name, ConvertedType defaultValue) {
44          return defaultValue;
45      }
46  
47      @Override
48      public List<ConvertedType> getAllAndConvert(UnconvertedType name) {
49          return Collections.emptyList();
50      }
51  
52      @Override
53      public List<ConvertedType> getAllAndRemoveAndConvert(UnconvertedType name) {
54          return Collections.emptyList();
55      }
56  
57      @Override
58      public List<Entry<ConvertedType, ConvertedType>> entriesConverted() {
59          return Collections.emptyList();
60      }
61  
62      @Override
63      public Iterator<Entry<ConvertedType, ConvertedType>> iteratorConverted() {
64          return entriesConverted().iterator();
65      }
66  
67      @Override
68      public Set<ConvertedType> namesAndConvert(Comparator<ConvertedType> comparator) {
69          return Collections.emptySet();
70      }
71  }