Skip to content

Package: SimpleListDescriptorImpl

SimpleListDescriptorImpl

nameinstructionbranchcomplexitylinemethod
SimpleListDescriptorImpl(NamedResource, Assertion, Assertion)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
equals(Object)
M: 25 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
getContext()
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getListOwner()
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getListProperty()
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getNextNode()
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
hashCode()
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
setContext(URI)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
toString()
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%

Coverage

1: /*
2: * JOPA
3: * Copyright (C) 2024 Czech Technical University in Prague
4: *
5: * This library is free software; you can redistribute it and/or
6: * modify it under the terms of the GNU Lesser General Public
7: * License as published by the Free Software Foundation; either
8: * version 3.0 of the License, or (at your option) any later version.
9: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library.
17: */
18: package cz.cvut.kbss.ontodriver.descriptor;
19:
20: import cz.cvut.kbss.ontodriver.model.Assertion;
21: import cz.cvut.kbss.ontodriver.model.NamedResource;
22:
23: import java.net.URI;
24:
25: /**
26: * Describes a simple sequence.
27: * <p>
28: * Simple lists are classic Lisp-style lists (singly-linked lists), where each node is a subject for axiom referencing
29: * the next node.
30: */
31: public class SimpleListDescriptorImpl implements SimpleListDescriptor {
32:
33: protected final ListDescriptor descriptor;
34:
35: public SimpleListDescriptorImpl(NamedResource listOwner, Assertion listProperty,
36: Assertion nextNodeProperty) {
37: this.descriptor = new BaseListDescriptorImpl(listOwner, listProperty, nextNodeProperty);
38: }
39:
40: @Override
41: public void setContext(URI context) {
42: descriptor.setContext(context);
43: }
44:
45: @Override
46: public URI getContext() {
47: return descriptor.getContext();
48: }
49:
50: @Override
51: public NamedResource getListOwner() {
52: return descriptor.getListOwner();
53: }
54:
55: @Override
56: public Assertion getListProperty() {
57: return descriptor.getListProperty();
58: }
59:
60: @Override
61: public Assertion getNextNode() {
62: return descriptor.getNextNode();
63: }
64:
65: @Override
66: public int hashCode() {
67: final int prime = 31;
68: int result = 1;
69: result = prime * result + descriptor.hashCode();
70: return result;
71: }
72:
73: @Override
74: public boolean equals(Object obj) {
75:• if (this == obj)
76: return true;
77:• if (obj == null)
78: return false;
79:• if (getClass() != obj.getClass())
80: return false;
81: SimpleListDescriptorImpl other = (SimpleListDescriptorImpl) obj;
82: return descriptor.equals(other.descriptor);
83: }
84:
85: @Override
86: public String toString() {
87: return "[SimpleList: " + descriptor + "]";
88: }
89: }