Метод | Описание | |
---|---|---|
AddListener ( object bag, object listener ) : object |
Add listener to bag of listeners. Add listener to bag of listeners. The function does not modify bag and return a new collection containing listener and all listeners from bag. Bag without listeners always represented as the null value. Usage example: private volatile Object changeListeners; public void addMyListener(PropertyChangeListener l) { synchronized (this) { changeListeners = Kit.addListener(changeListeners, l); } } public void removeTextListener(PropertyChangeListener l) { synchronized (this) { changeListeners = Kit.removeListener(changeListeners, l); } } public void fireChangeEvent(Object oldValue, Object newValue) { // Get immune local copy Object listeners = changeListeners; if (listeners != null) { PropertyChangeEvent e = new PropertyChangeEvent( this, "someProperty" oldValue, newValue); for (int i = 0; ; ++i) { Object l = Kit.getListener(listeners, i); if (l == null) break; ((PropertyChangeListener)l).propertyChange(e); } } } |
|
ClassOrNull ( ClassLoader loader, string className ) : |
Attempt to load the class of the given name. Attempt to load the class of the given name. Note that the type parameter isn't checked. |
|
ClassOrNull ( string className ) : |
||
CodeBug ( ) : |
Throws RuntimeException to indicate failed assertion. Throws RuntimeException to indicate failed assertion. The function never returns and its return type is RuntimeException only to be able to write throw Kit.codeBug() if plain Kit.codeBug() triggers unreachable code error. |
|
CodeBug ( string msg ) : |
Throws RuntimeException to indicate failed assertion. Throws RuntimeException to indicate failed assertion. The function never returns and its return type is RuntimeException only to be able to write throw Kit.codeBug() if plain Kit.codeBug() triggers unreachable code error. |
|
GetListener ( object bag, int index ) : object |
Get listener at index position in bag or null if index equals to number of listeners in bag. Get listener at index position in bag or null if index equals to number of listeners in bag. For usage example, see |
|
InitCause ( |
If initCause methods exists in Throwable, call ex.initCause(cause) or otherwise do nothing. If initCause methods exists in Throwable, call ex.initCause(cause) or otherwise do nothing. |
|
MakeHashKeyFromPair ( object key1, object key2 ) : object | ||
ReadReader ( |
||
ReadStream ( Stream @is, int initialBufferCapacity ) : byte[] | ||
RemoveListener ( object bag, object listener ) : object |
Remove listener from bag of listeners. Remove listener from bag of listeners. The function does not modify bag and return a new collection containing all listeners from bag except listener. If bag does not contain listener, the function returns bag. For usage example, see |
|
XDigitToInt ( int c, int accumulator ) : int |
If character c is a hexadecimal digit, return accumulator * 16 plus corresponding number. If character c is a hexadecimal digit, return accumulator * 16 plus corresponding number. Otherise return -1. |
Метод | Описание | |
---|---|---|
InitHash ( object>.IDictionary | ||
Kit ( ) : System | ||
NewInstanceOrNull ( |
||
TestIfCanLoadRhinoClasses ( ClassLoader loader ) : bool |
Check that testClass is accessible from the given loader. Check that testClass is accessible from the given loader. |
public static AddListener ( object bag, object listener ) : object | ||
bag | object | Current collection of listeners. |
listener | object | Listener to add to bag |
Результат | object |
public static ClassOrNull ( ClassLoader loader, string className ) : |
||
loader | ClassLoader | |
className | string | |
Результат |
public static ClassOrNull ( string className ) : |
||
className | string | |
Результат |
public static CodeBug ( ) : |
||
Результат |
public static CodeBug ( string msg ) : |
||
msg | string | |
Результат |
public static GetListener ( object bag, int index ) : object | ||
bag | object | Current collection of listeners. |
index | int | Index of the listener to access. |
Результат | object |
public static InitCause ( |
||
ex | ||
cause | ||
Результат |
public static MakeHashKeyFromPair ( object key1, object key2 ) : object | ||
key1 | object | |
key2 | object | |
Результат | object |
public static ReadReader ( |
||
r | ||
Результат | string |
public static ReadStream ( Stream @is, int initialBufferCapacity ) : byte[] | ||
@is | Stream | |
initialBufferCapacity | int | |
Результат | byte[] |
public static RemoveListener ( object bag, object listener ) : object | ||
bag | object | Current collection of listeners. |
listener | object | Listener to remove from bag |
Результат | object |
public static XDigitToInt ( int c, int accumulator ) : int | ||
c | int | |
accumulator | int | |
Результат | int |