de.agilecoders.wicket.jquery.util
Class CharSequenceWrapper

java.lang.Object
  extended by de.agilecoders.wicket.jquery.util.CharSequenceWrapper
All Implemented Interfaces:
CharSequence

public class CharSequenceWrapper
extends Object
implements CharSequence

cast given value to a CharSequence and provides same interface.


Constructor Summary
CharSequenceWrapper(Object raw)
          Construct.
 
Method Summary
 char charAt(int index)
           
 boolean equals(Object obj)
           
 int hashCode()
           
 int length()
           
 CharSequence subSequence(int start, int end)
           
static CharSequence toParameterValue(Boolean value)
          transform given value to a javascript parameter value
static CharSequence toParameterValue(Float value)
          transform given value to a javascript parameter value
static CharSequence toParameterValue(Integer value)
          transform given value to a javascript parameter value
static CharSequence toParameterValue(JavaScriptInlineFunction value)
          transform given value to a javascript parameter value
static CharSequence toParameterValue(Long value)
          transform given value to a javascript parameter value
static CharSequence toParameterValue(Object value)
          transform given value to a javascript parameter value
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharSequenceWrapper

public CharSequenceWrapper(Object raw)
Construct.

Parameters:
raw - the raw value
Method Detail

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toParameterValue

public static CharSequence toParameterValue(Object value)
transform given value to a javascript parameter value

Parameters:
value - The value to transform
Returns:
value as string

toParameterValue

public static CharSequence toParameterValue(JavaScriptInlineFunction value)
transform given value to a javascript parameter value

Parameters:
value - The value to transform
Returns:
value as string

toParameterValue

public static CharSequence toParameterValue(Long value)
transform given value to a javascript parameter value

Parameters:
value - The value to transform
Returns:
value as string

toParameterValue

public static CharSequence toParameterValue(Integer value)
transform given value to a javascript parameter value

Parameters:
value - The value to transform
Returns:
value as string

toParameterValue

public static CharSequence toParameterValue(Float value)
transform given value to a javascript parameter value

Parameters:
value - The value to transform
Returns:
value as string

toParameterValue

public static CharSequence toParameterValue(Boolean value)
transform given value to a javascript parameter value

Parameters:
value - The value to transform
Returns:
value as string


Copyright © 2017. All Rights Reserved.