input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void stop super cancel flush | stop cancels the resolution timer and flush es the cache |
public long and long b value long value b return value | i and i s the current value with the specified value |
public string to string string buffer buff new string buffer if running the watch has not been stopped format elapsed time buff get time add the current lap time too if there is more than one lap if count 1 buff append count append count buff append current format elapsed time buff get lap time else the watch has been stopped format elapsed time buff get time add extra info if there is more than one lap if count 1 buff append count append count buff append average format elapsed time buff get average lap time return buff to string | return a string representation |
public boolean equals final object obj if obj this return true if obj null obj get class get class return value hash code obj value return false | test the equality of this tt hash code tt and another object |
public byte negate value byte value return value | set the value to the negative of its current value |
public long or long b value long value b return value | i or i s the current value with the specified value |
public void destroy entry map clear | clears the cache of all entries |
public long xor long b value long value b return value | i xor i s the current value with the specified value |
public byte complement value byte value return value | set the value to its complement |
public object get object key timed entry entry timed entry entry map get key if entry null return null if entry is current now false try to refresh the entry if entry refresh false failed remove the entry and return null entry destroy entry map remove key return null object value entry get value return value | get the cache value for key if it has not expired |
public long shift right int bits value bits return value | shift the current value to the i right i |
public void set value object obj if obj instanceof number value number obj short value else throw new not coercible exception can not convert to short obj | set the value of this mutable short integer |
public byte and byte b value byte value b return value | i and i s the current value with the specified value |
public long shift right zero int bits value bits return value | shift the current value to the i right i with a zero extension |
static public timeout create timeout long time timeout target target if time 0 throw new illegal argument exception time not positive if target null throw new illegal argument exception null target return singleton new timeout time target | schedule a new timeout |
public object peek object key timed entry entry timed entry entry map get key object value null if entry null value entry get value return value | get the cache value for key |
public void test string2 short 1 try message message sender session create message message set string property prop 0 assert equals short 0 message get short property prop catch jmsexception e fail e | if a property is set as a code java |
public byte or byte b value byte value b return value | i or i s the current value with the specified value |
public object get value return new short value | return the value of this mutable short integer |
public long shift left int bits value bits return value | shift the current value to the i left i |
public void insert object key object value if entry map contains key key throw new illegal state exception attempt to insert duplicate entry timed entry entry null if value instanceof timed entry false wrap the value in a default timed entry entry new default timed entry default lifetime value else entry timed entry value entry init now entry map put key entry | insert a value into the cache |
public byte xor byte b value byte value b return value | i xor i s the current value with the specified value |
protected void write stream header throws ioexception this reset | reset the stream does not write headers |
public int compare to long other return value other 1 value other 0 1 | compares this object with the specified long for order |
public byte shift right int bits value bits return value | shift the current value to the i right i |
public int read final byte bytes final int offset final int length return 1 | always returns 1 |
public int read final byte bytes return 1 | always returns 1 |
public void remove object key timed entry entry timed entry entry map remove key if entry null entry destroy | remove the entry associated with key and call destroy on the entry |
public long skip final long n return 0 | always returns zero |
public byte shift right zero int bits value bits return value | shift the current value to the i right i with a zero extension |
public int compare to object obj return compare to mu long obj | compares this object with the specified object for order |
public void set value object obj if obj instanceof number value number obj double value else throw new not coercible exception can not convert to double obj | set the value of this mutable double |
public void create m map new hash map m list create list m list m max capacity m max capacity m list m min capacity m min capacity m list m capacity m max capacity | initializes the cache creating all required objects and initializing their |
public void flush map tmp map null synchronized this tmp map entry map if thread safe entry map collections synchronized map new hash map else entry map new hash map notify the entries of their removal iterator iter tmp map values iterator while iter has next timed entry entry timed entry iter next entry destroy tmp map clear | remove all entries from the cache |
public byte shift left int bits value bits return value | shift the current value to the i left i |
public int compare to byte other return value other 1 value other 0 1 | compares this object with the specified byte for order |
public boolean equals object obj if obj this return true if obj null obj get class get class return value mu long obj long value return false | test the equality of this mutable long integer and another object |
public void test string2 byte 2 try message message sender session create message message set string property pi 3 14159 message get byte property pi fail 3 5 4 the string to numeric conversions must throw the java lang number format exception if the numeric s value of method does not accept the string value as a valid representation n catch java lang number format exception e catch jmsexception e fail e | if a property is set as a code java |
public void stop if m list null flush | stops this cache thus |
public int compare to object obj throws class cast exception return compare to mu byte obj | compares this object with the specified object for order |
public list get valid keys array list valid keys new array list synchronized entry map iterator iter entry map entry set iterator while iter has next map entry entry map entry iter next timed entry value timed entry entry get value if value is current now true valid keys add entry get key return valid keys | get the list of keys for entries that are not expired |
public void destroy if m map null m map clear if m list null m list clear | destroys the cache that is now unusable |
public void set reset after int after if after 0 throw new illegal argument exception after 0 this after after | set the number of objects that must be written before resetting |
protected void write object override object obj throws ioexception super write object override obj count if count after reset | write the given object and reset if the number of objects written |
public void reset throws ioexception out reset count 0 | resets the object counter as well as the nested stream |
public boolean equals object obj if obj this return true if obj null obj get class get class return value mu byte obj byte value return false | test the equality of this mutable byte and another object |
protected void invoke setter string value try coerce value to field type class type descriptor get property type object coerced objects coerce value type system out println type type system out println coerced coerced invoke the setter method setter invoke instance new object coerced catch invocation target exception e throwable target e get target exception if target instanceof property exception throw property exception target else throw new property exception target catch exception e throw new property exception e | coerce and invoke the property setter method on the instance |
public void property added final property event event invoke setter event get property value | notifies that a property has been added |
public void test string2 byte 1 try message message sender session create message message set string property prop 0 assert equals byte 0 message get byte property prop catch jmsexception e fail e | if a property is set as a code java |
public void property changed final property event event invoke setter event get property value | notifies that a property has changed |
public string to string return super to string name name value value | return a string representation of this event |
public void property added final property event event | notifies that a property was added |
public void property removed final property event event | notifies that a property was removed |
public void property changed final property event event | notifies that a property has changed |
public void property bound final property map map only set the field if the map contains the property already if map contains property property name invoke setter map get property property name | notifies that this listener was bound to a property |
public void property bound final property map map | notifies that this listener was bound to a property |
public void property unbound final property map map | notifies that this listener was unbound from a property |
public string filter value string value return value | filter the property value prior to coercing and binding to field |
public void set value object obj if obj instanceof number value number obj long value else throw new not coercible exception can not convert to long obj | set the value of this mutable long integer |
protected void set field value string value try filter property value value filter value value coerce value to field type class type field instance get field get type object coerced objects coerce value type bind value to field field instance set coerced catch illegal access exception e throw new property exception e catch coercion exception e throw new property exception e | coerce and set specified value to field |
private string make property name final string suffix return basename property map property name separator suffix | make a fully qualified property name |
public void property added final property event event set field value event get property value | notifies that a property has been added |
public timed entry peek entry object key timed entry entry timed entry entry map get key return entry | get the raw timed entry for key without performing any expiration check |
public void property changed final property event event set field value event get property value | notifies that a property has changed |
private string make property name final object suffix return make property name string value of suffix | make a fully qualified property name |
protected input stream get input stream string filename throws ioexception file file new file filename return new file input stream file | get an input stream for the given filename |
public void property bound final property map map only set the field if the map contains the property already if map contains property property name set field value map get property property name | notifies that this listener was bound to a property |
public boolean contains key final object name if name null throw new null argument exception name return super contains key make property name name | check if this tt property map tt contains a given property name |
public void schedule timer task t schedule t 0 | schedules the given timer task for immediate execution |
public float set float f float old value value f return old | set the value |
public void test string2 boolean 2 try message message sender session create message message set string property prop test assert equals false message get boolean property prop catch message format exception e catch jmsexception e fail e | if a property is set as a code java |
public void schedule timer task t long delay if t null throw new illegal argument exception can t schedule a null timer task if delay 0 delay 0 t set next execution time system current time millis delay put job t | schedule the given timer task to be executed after code delay code |
public object put final object name final object value if name null throw new null argument exception name return super put make property name name value | set a property |
public boolean equals final object obj if obj this return true return obj null obj get class get class | check if the given object is a null instance or tt null tt |
public object get final object name if name null throw new null argument exception name return super get make property name name | get a property |
public boolean commit float assumed float b boolean success primitives equals assumed value if success value b return success | set the value to value only if the current value is equal to |
public object remove final object name if name null throw new null argument exception name return super remove make property name name | remove a property |
protected lrulist create list return new lrulist | factory method for the linked list used by this cache implementation |
public object peek if m count 1 return null else return m nodes 0 | returns without removing it the least element of this heap |
public float swap mu float b if b this return value float temp value value b value b value temp return value | swap values with another mutable float |
public object put object name object value if name null throw new null argument exception name value can be null check if this is a new addition or not prior to updating the hash boolean add contains key name object prev super put name value property event event new property event this string value of name string value of value fire property added or property changed if add fire property added event else fire property changed event return prev | set a property |
public void clear m count 0 m nodes new object 10 | empties this heap |
public float add float amount return value amount | add the specified amount |
public void set value object obj if obj instanceof number value number obj byte value else value byte obj hash code | set the value of this mutable byte |
protected void age out lrucache entry entry remove entry m key | callback method called when the cache algorithm ages out of the cache |
protected int compare object o1 object o2 if m comparator null return m comparator compare o1 o2 else if o1 null if o2 null return 0 else return comparable o2 compare to o1 else return comparable o1 compare to o2 | compares the given objects using the comparator if available |
public float subtract float amount return value amount | subtract the specified amount |
public boolean cancel synchronized get lock boolean ret m state scheduled m state cancelled return ret | cancels the next execution of this timer task if any |
protected int parent int index return index 1 1 | returns the parent index of code index code |
public boolean commit int assumed int i boolean success assumed value if success value i return success | set the value to value only if the current value is equal to |
public int compare to object other if other this return 0 timer task t timer task other long diff get next execution time t get next execution time return int diff | a timer task is less than another if it will be scheduled before |
public object get value return new byte value | get the byte value of this mutable byte |
protected void cache miss | callback method called when a cache miss happens |
public float multiply float factor return value factor | multiply by the specified factor |
protected int left int index return index index 1 | returns the left child index of code index code |
protected long get period return m period | returns the period of this timer task |
public int swap mu integer i if i this return i value int temp value value i value i value temp return value | swap values with another mutable integer |
public void test string2 boolean 1 try message message sender session create message message set string property prop true assert equals true message get boolean property prop catch jmsexception e fail e | if a property is set as a code java |
public object get object name if name null name equals throw new illegal argument exception name object obj super get name string value obj instanceof string string obj null return value | get a property |
protected int right int index return index index 2 | returns the right child index of code index code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.