FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove public scope from interface · fdinoff/msgpack-java@301ae10 · GitHub

Commit 301ae10

Browse files
committed
Remove public scope from interface
1 parent 775379d commit 301ae10

11 files changed

Lines changed: 35 additions & 58 deletions

File tree

‎msgpack-core/src/main/java/org/msgpack/value/ArrayValue.java‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@
2424
* MessagePack's Array type can represent sequence of values.
2525
*/
2626
public interface ArrayValue extends Value, Iterable<Value> {
27-
@Override
28-
public ImmutableArrayValue toImmutable();
2927

3028
/**
3129
* Returns number of elements in this array.
3230
*/
33-
public int size();
31+
int size();
3432

3533
/**
3634
* Returns the element at the specified position in this array.
@@ -39,21 +37,21 @@ public interface ArrayValue extends Value, Iterable<Value> {
3937
* If the index is out of range
4038
* (<tt>index &lt; 0 || index &gt;= size()</tt>)
4139
*/
42-
public Value get(int index);
40+
Value get(int index);
4341

4442
/**
4543
* Returns the element at the specified position in this array.
4644
* This method returns an ImmutableNilValue if the index is out of range.
4745
*/
48-
public Value getOrNilValue(int index);
46+
Value getOrNilValue(int index);
4947

5048
/**
5149
* Returns an iterator over elements.
5250
*/
53-
public Iterator<Value> iterator();
51+
Iterator<Value> iterator();
5452

5553
/**
5654
* Returns the value as {@code List}.
5755
*/
58-
public List<Value> list();
56+
List<Value> list();
5957
}

‎msgpack-core/src/main/java/org/msgpack/value/BinaryValue.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,4 @@
2323
* @see org.msgpack.value.RawValue
2424
*/
2525
public interface BinaryValue extends RawValue {
26-
@Override
27-
public ImmutableBinaryValue toImmutable();
2826
}

‎msgpack-core/src/main/java/org/msgpack/value/BooleanValue.java‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@
2121
* MessagePack's Boolean type can represent {@code true} or {@code false}.
2222
*/
2323
public interface BooleanValue extends Value {
24-
@Override
25-
public ImmutableBooleanValue toImmutable();
26-
2724
/**
2825
* Returns the value as a {@code boolean}.
2926
*/
30-
public boolean getBoolean();
27+
boolean getBoolean();
3128
}

‎msgpack-core/src/main/java/org/msgpack/value/ExtensionValue.java‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@
2424
* As the type information, applications can use 0 to 127 as the application-specific types. -1 to -128 is reserved for MessagePack's future extension.
2525
*/
2626
public interface ExtensionValue extends Value {
27-
@Override
28-
public ImmutableExtensionValue toImmutable();
27+
byte getType();
2928

30-
public byte getType();
31-
32-
public byte[] getData();
29+
byte[] getData();
3330
}

‎msgpack-core/src/main/java/org/msgpack/value/FloatValue.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,4 @@
2323
* @see org.msgpack.value.NumberValue
2424
*/
2525
public interface FloatValue extends NumberValue {
26-
@Override
27-
public ImmutableFloatValue toImmutable();
2826
}

‎msgpack-core/src/main/java/org/msgpack/value/ImmutableArrayValue.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ public interface ImmutableArrayValue extends ArrayValue, ImmutableValue {
2424
* Returns an iterator over elements.
2525
* Returned Iterator does not support {@code remove()} method since the value is immutable.
2626
*/
27-
public Iterator<Value> iterator();
27+
Iterator<Value> iterator();
2828

2929
/**
3030
* Returns the value as {@code List}.
3131
* Returned List is immutable. It does not support {@code put()}, {@code clear()}, or other methods that modify the value.
3232
*/
33-
public List<Value> list();
33+
List<Value> list();
3434
}

‎msgpack-core/src/main/java/org/msgpack/value/IntegerValue.java‎

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,70 +16,68 @@
1616
package org.msgpack.value;
1717

1818
import java.math.BigInteger;
19+
import org.msgpack.core.MessageOverflowException;
1920

2021
/**
2122
* The interface {@code IntegerValue} represents MessagePack's Integer type.
2223
*
2324
* MessagePack's Integer type can represent from -2<sup>63</sup> to 2<sup>64</sup>-1.
2425
*/
2526
public interface IntegerValue extends NumberValue {
26-
@Override
27-
public ImmutableIntegerValue toImmutable();
28-
2927
/**
3028
* Returns true if the value is in the range of [-2<sup>7</sup> to 2<sup>7</sup>-1].
3129
*/
32-
public boolean isInByteRange();
30+
boolean isInByteRange();
3331

3432
/**
3533
* Returns true if the value is in the range of [-2<sup>15</sup> to 2<sup>15</sup>-1]
3634
*/
37-
public boolean isInShortRange();
35+
boolean isInShortRange();
3836

3937
/**
4038
* Returns true if the value is in the range of [-2<sup>31</sup> to 2<sup>31</sup>-1]
4139
*/
42-
public boolean isInIntRange();
40+
boolean isInIntRange();
4341

4442
/**
4543
* Returns true if the value is in the range of [-2<sup>63</sup> to 2<sup>63</sup>-1]
4644
*/
47-
public boolean isInLongRange();
45+
boolean isInLongRange();
4846

4947
/**
5048
* Returns the value as a {@code byte}, otherwise throws an exception.
5149
*
52-
* @throws MessageIntegerOverflowException
50+
* @throws MessageOverflowException
5351
* If the value does not fit in the range of {@code byte} type.
5452
*/
55-
public byte getByte();
53+
byte getByte();
5654

5755
/**
5856
* Returns the value as a {@code short}, otherwise throws an exception.
5957
*
60-
* @throws MessageIntegerOverflowException
58+
* @throws MessageOverflowException
6159
* If the value does not fit in the range of {@code short} type.
6260
*/
63-
public short getShort();
61+
short getShort();
6462

6563
/**
6664
* Returns the value as an {@code int}, otherwise throws an exception.
6765
*
68-
* @throws MessageIntegerOverflowException
66+
* @throws MessageOverflowException
6967
* If the value does not fit in the range of {@code int} type.
7068
*/
71-
public int getInt();
69+
int getInt();
7270

7371
/**
7472
* Returns the value as a {@code long}, otherwise throws an exception.
7573
*
76-
* @throws MessageIntegerOverflowException
74+
* @throws MessageOverflowException
7775
* If the value does not fit in the range of {@code long} type.
7876
*/
79-
public long getLong();
77+
long getLong();
8078

8179
/**
8280
* Returns the value as a {@code BigInteger}.
8381
*/
84-
public BigInteger getBigInteger();
82+
BigInteger getBigInteger();
8583
}

‎msgpack-core/src/main/java/org/msgpack/value/MapValue.java‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,21 @@
2525
* MessagePack's Map type can represent sequence of key-value pairs.
2626
*/
2727
public interface MapValue extends Value {
28-
@Override
29-
public ImmutableMapValue toImmutable();
30-
3128
/**
3229
* Returns number of key-value pairs in this array.
3330
*/
34-
public int size();
31+
int size();
3532

36-
public Set<Value> keySet();
33+
Set<Value> keySet();
3734

38-
public Set<Map.Entry<Value, Value>> entrySet();
35+
Set<Map.Entry<Value, Value>> entrySet();
3936

40-
public Collection<Value> values();
37+
Collection<Value> values();
4138

4239
/**
4340
* Returns the value as {@code Map}.
4441
*/
45-
public Map<Value, Value> map();
42+
Map<Value, Value> map();
4643

4744
/**
4845
* Returns the key-value pairs as an array of {@code Value}.
@@ -51,5 +48,5 @@ public interface MapValue extends Value {
5148
*
5249
* For example, if this value represents <code>{"k1": "v1", "k2": "v2"}</code>, this method returns ["k1", "v1", "k2", "v2"].
5350
*/
54-
public Value[] getKeyValueArray();
51+
Value[] getKeyValueArray();
5552
}

‎msgpack-core/src/main/java/org/msgpack/value/NilValue.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@
1919
* The interface {@code NilValue} represents MessagePack's Nil type.
2020
*/
2121
public interface NilValue extends Value {
22-
@Override
23-
public ImmutableNilValue toImmutable();
2422
}

‎msgpack-core/src/main/java/org/msgpack/value/RawValue.java‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package org.msgpack.value;
1717

1818
import java.nio.ByteBuffer;
19+
import org.msgpack.core.MessageStringCodingException;
1920

2021
/**
2122
* The interface {@code RawValue} represents MessagePack's Raw type, which means Binary or String type.
@@ -26,23 +27,20 @@
2627
* @see org.msgpack.value.BinaryValue
2728
*/
2829
public interface RawValue extends Value {
29-
@Override
30-
public ImmutableRawValue toImmutable();
31-
3230
/**
3331
* Returns the value as {@code byte[]}.
3432
*
3533
* This method copies the byte array.
3634
*/
37-
public byte[] getByteArray();
35+
byte[] getByteArray();
3836

3937
/**
4038
* Returns the value as {@code ByteBuffer}.
4139
*
4240
* Returned ByteBuffer is read-only. See {@code#asReadOnlyBuffer()}.
4341
* This method doesn't copy the byte array as much as possible.
4442
*/
45-
public ByteBuffer getByteBuffer();
43+
ByteBuffer getByteBuffer();
4644

4745
/**
4846
* Returns the value as {@code String}.
@@ -52,12 +50,12 @@ public interface RawValue extends Value {
5250
* @throws MessageStringCodingException
5351
* If this value includes invalid UTF-8 byte sequence.
5452
*/
55-
public String getString();
53+
String getString();
5654

5755
/**
5856
* Returns the value as {@code String}.
5957
*
6058
* This method replaces an invalid UTF-8 byte sequence with <code>U+FFFD replacement character</code>.
6159
*/
62-
public String stringValue();
60+
String stringValue();
6361
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL