Repository navigation
Expand file tree
/
Copy pathAddressSection.java
More file actions
103 lines (78 loc) · 2.55 KB
/
Copy pathAddressSection.java
File metadata and controls
103 lines (78 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
* Copyright 2017 Sean C Foley
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* or at
* https://github.com/seancfoley/IPAddress/blob/master/LICENSE
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package inet.ipaddr;
import java.util.Iterator;
/**
* @author sfoley
*
*/
public interface AddressSection extends AddressSegmentSeries {
/**
* Determines if one section contains another.
*
* Sections must have the same number of segments to be comparable.
*
* For sections which are aware of their position in an address (IPv6 and MAC), their respective positions must match to be comparable.
*
* @param other
* @return whether this section contains the given address section
*/
boolean contains(AddressSection other);
@Override
AddressSection getLower();
@Override
AddressSection getUpper();
@Override
AddressSection reverseSegments();
@Override
AddressSection reverseBits(boolean perByte);
@Override
AddressSection reverseBytes();
@Override
AddressSection reverseBytesPerSegment();
@Override
AddressSection toPrefixBlock();
@Override
AddressSection removePrefixLength();
@Override
AddressSection removePrefixLength(boolean zeroed);
@Override
AddressSection adjustPrefixBySegment(boolean nextSegment);
@Override
AddressSection adjustPrefixBySegment(boolean nextSegment, boolean zeroed);
@Override
AddressSection adjustPrefixLength(int adjustment);
@Override
AddressSection adjustPrefixLength(int adjustment, boolean zeroed);
@Override
AddressSection setPrefixLength(int prefixLength);
@Override
AddressSection setPrefixLength(int prefixLength, boolean zeroed);
@Override
AddressSection applyPrefixLength(int networkPrefixLength);
@Override
Iterable<? extends AddressSection> getIterable();
@Override
Iterator<? extends AddressSection> iterator();
@Override
Iterator<? extends AddressSection> prefixBlockIterator();
@Override
AddressSection increment(long increment);
@Override
AddressSection incrementBoundary(long increment);
}