org.crsh.util
Class BlankSequence

java.lang.Object
  extended by 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

Field Summary
private static BlankSequence[] CACHE
          .
private  int length
          .
private  String value
          .
 
Constructor Summary
private BlankSequence(int length)
          Build a new blank sequence.
 
Method Summary
 char charAt(int index)
           
private  void checkIndex(String name, int index)
           
static BlankSequence create(int length)
           
 int length()
           
 CharSequence subSequence(int start, int end)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CACHE

private static final BlankSequence[] CACHE
.


length

private final int length
.


value

private String value
.

Constructor Detail

BlankSequence

private BlankSequence(int length)
               throws IllegalArgumentException
Build a new blank sequence.

Parameters:
length - the length
Throws:
IllegalArgumentException - when length is negative
Method Detail

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.