File tree Expand file tree Collapse file tree
src/main/java/org/glavo/nbt/tag Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,4 +30,9 @@ public final boolean isEmpty() {
3030
3131 /// Returns the size of the array.
3232 public abstract int size ();
33+
34+ /// Returns the element at the given index.
35+ ///
36+ /// @throws IndexOutOfBoundsException if the index is out of bounds.
37+ public abstract E getValue (int index ) throws IndexOutOfBoundsException ;
3338}
Original file line number Diff line number Diff line change @@ -64,6 +64,11 @@ public byte get(int index) throws IndexOutOfBoundsException {
6464 return value [index ];
6565 }
6666
67+ @ Override
68+ public Byte getValue (int index ) throws IndexOutOfBoundsException {
69+ return get (index );
70+ }
71+
6772 /// Sets the element at the given index.
6873 ///
6974 /// @throws IndexOutOfBoundsException if the index is out of bounds.
Original file line number Diff line number Diff line change @@ -64,6 +64,11 @@ public int get(int index) throws IndexOutOfBoundsException {
6464 return value [index ];
6565 }
6666
67+ @ Override
68+ public Integer getValue (int index ) throws IndexOutOfBoundsException {
69+ return get (index );
70+ }
71+
6772 /// Sets the element at the given index.
6873 ///
6974 /// @throws IndexOutOfBoundsException if the index is out of bounds.
Original file line number Diff line number Diff line change @@ -65,6 +65,11 @@ public long get(int index) throws IndexOutOfBoundsException {
6565 return value [index ];
6666 }
6767
68+ @ Override
69+ public Long getValue (int index ) throws IndexOutOfBoundsException {
70+ return get (index );
71+ }
72+
6873 /// Sets the element at the given index.
6974 ///
7075 /// @throws IndexOutOfBoundsException if the index is out of bounds.
You can’t perform that action at this time.
0 commit comments