mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
classlib: add CharSequence.isEmpty support (#683)
This commit is contained in:
parent
79df39fca0
commit
5dee60eec6
|
@ -559,6 +559,11 @@ class TAbstractStringBuilder implements TSerializable, TCharSequence {
|
|||
return buffer[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return length == 0;
|
||||
}
|
||||
|
||||
protected TAbstractStringBuilder append(TCharSequence s, int start, int end) {
|
||||
return insert(length, s, start, end);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ public interface TCharSequence {
|
|||
|
||||
char charAt(int index);
|
||||
|
||||
boolean isEmpty();
|
||||
|
||||
TCharSequence subSequence(int start, int end);
|
||||
|
||||
@Override
|
||||
|
|
|
@ -151,6 +151,7 @@ public class TString extends TObject implements TSerializable, TComparable<TStri
|
|||
return characters.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return characters.length == 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user