org.crsh.util
Class BlankSequence
java.lang.Object
org.crsh.util.BlankSequence
- All Implemented Interfaces:
- Serializable, CharSequence
-
public class BlankSequence
- extends Object
-
- implements CharSequence, Serializable
-
An immutable sequence of white spaces.
- See Also:
- Serialized Form
Constructor Summary |
private |
BlankSequence(int length)
Build a new blank sequence. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CACHE
private static final BlankSequence[] CACHE
-
.
length
private final int length
-
.
value
private String value
-
.
BlankSequence
private BlankSequence(int length)
throws IllegalArgumentException
-
Build a new blank sequence.
- Parameters:
length
- the length
- Throws:
IllegalArgumentException
- when length is negative
create
public static BlankSequence create(int length)
-
-
length
public int length()
-
- Specified by:
length
in interface CharSequence
-
charAt
public char charAt(int index)
-
- Specified by:
charAt
in interface CharSequence
-
subSequence
public CharSequence subSequence(int start,
int end)
-
- Specified by:
subSequence
in interface CharSequence
-
toString
public String toString()
-
- Specified by:
toString
in interface CharSequence
- Overrides:
toString
in class Object
-
checkIndex
private void checkIndex(String name,
int index)
-
-
Copyright © 2015 eXo Platform SAS. All Rights Reserved.