Skip to content

Package: EmptyIterator

EmptyIterator

nameinstructionbranchcomplexitylinemethod
getInstance()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hasNext()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
next()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
remove()
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3: *
4: * Copyright (c) 2004-2018 Oracle and/or its affiliates. All rights reserved.
5: *
6: * Oracle licenses this file to You under the Apache License, Version 2.0
7: * (the "License"); you may not use this file except in compliance with
8: * the License. You may obtain a copy of the License at
9: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: package com.sun.xml.fastinfoset.stax.events;
20: import java.util.Iterator;
21: import com.sun.xml.fastinfoset.CommonResourceBundle;
22: import java.util.NoSuchElementException;
23:
24:
25: public class EmptyIterator implements Iterator {
26: public static final EmptyIterator instance = new EmptyIterator();
27: /** Creates a new instance of EmptyIterator */
28: private EmptyIterator() {
29: }
30: public static EmptyIterator getInstance() {
31: return instance;
32: }
33: public boolean hasNext() {
34: return false;
35: }
36: public Object next() throws NoSuchElementException {
37: throw new NoSuchElementException();
38: }
39: public void remove() {
40: throw new UnsupportedOperationException(CommonResourceBundle.getInstance().getString("message.emptyIterator"));
41: }
42: }