input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public status update status string status text throws twitter exception if status text length 160 throw new illegal argument exception status text must be 160 characters or less map string string vars as map status status text string result post http twitter com statuses update json true vars try return new status new jsonobject result null catch jsonexception e throw new twitter exception e | updates the authenticating users status |
public shop item add item shop item item shop item cur null int cmp 1 int i 0 while i items size cmp 0 cur shop item items element at i cmp cur compare to item i if cmp 0 if cmp 0 i items insert element at item i cur item invalidate return cur | add item to list |
public vector get sorted categories vector sorted new vector enumeration elems by name elements while elems has more elements category category category elems next element add category sorted sorted category return sorted | get all categories sorted by their priority |
public void add resource bundle class loader loader string name resource handle handle resources get name if handle null handle new resource handle name loader resources put name handle | registers a resource bundle with the localizer |
public string get string string key return get string key key | convenience method same as code get string key key code |
public string format string key object params return string format get string key params | convenience method same as |
public void add localized attributes string names for string name names add localized attribute name | adds the given attribute names to the list of localized attributes |
public void add localized attribute string name localized attributes add name to lower case | adds the given attribute name to the list of localized attributes |
public boolean is localized string name return localized attributes contains name to lower case | indicates if the given attribute is localized |
public void set client object client state set client client | change the client object |
public void register t element is dirty true for class c element supported classes if c null throw new runtime exception failed to register element get class get name error in implementation no supported classes found element set state state set t set elements get c if set null set new hash set t elements put c set set add element | registers a library element with the library |
public t get library element class template iterator t elements get library elements template iterator if elements has next return null return elements next | returns the first fitting library element |
public localizer get localizer return state localizer | returns the localizer |
public localizer localizer return state localizer | returns the localizer |
private void add resource bundle document doc add the resource bundle element element doc get document element string bundle element get attribute attr bundle if equals bundle localizer add resource bundle state get client get class get class loader bundle delete the attribute element remove attribute attr bundle | registers the resource bundle given in the top level element with the |
public api get api return state | returns the api a support class can register to |
public void register tag string name class template register tag name new default tag handler template | registers a tag handler to the library |
public void set locale locale locale locale set default locale for automatic window titles get localizer set locale locale localize | sets the locale for this engine |
public void register tag string name tag handler handler tags put name to lower case handler handlers register handler | registers a tag handler to the library |
public reflection helper get reflection helper class template return state get reflection helper template | returns a reflection helper for the given template class |
public tag handler get tag handler class template tag handler handler handlers get library element template if handler null handler new default tag handler template handlers register handler return handler | returns a tag handler for the given class |
public object find final string id return state get id map get id | returns the component with the specified id |
public void register converter converter helper register converter | registers a converter with the library |
public void set properties object obj map string string properties if properties null return for iterator string names properties key set iterator names has next string name names next try string value properties get name set obj name value names remove catch convert exception ignored | sets a bunch of properties or field values in the given object |
public void register appender appender helper register appender | registers an appender to the library |
public boolean has converter class template return helper get library element template null | checks if there is a converter for the given template class |
public boolean can append object component return component null | indicates if this appender is able to append the given component |
public string get attribute return attr | returns the raw attribute value as given in the xml document |
public void put string id object obj if id map contains key id to lower case throw new illegal argument exception object with the id id already exists id map put id obj | adds an object with the specified id |
public t get object try string value engine get localizer get string key return template cast engine get api converters convert template value catch convert exception e io error resource string key not found return null | returns the localized object |
public void forget final string id state get id map remove id | removes a component from the internal id map freeing the id for reuse |
public reflection helper get reflection helper class template reflection helper helper reflection helpers get template if helper null helper new reflection helper this template reflection helpers put template helper return helper | returns a reflection helper for the given template class |
public boolean is constraint string tag name return constraints contains tag name to lower case | indicates if the given tag name represents a constraint |
public object call constructor object s args throws convert exception if constructors null register constructors constructor ctor null for constructor c constructors class param types c get parameter types if param types length s args length continue object args try args converters convert param types s args catch convert exception e continue try return c new instance args catch exception e continue throw new convert exception localizer format no fitting constructor for class s and d arguments template get name s args length | calls the constructor of the given class with the given arguments |
public object get constant string key int k key index of if k 0 class pp constants get key substring 0 k try return pp get field key substring k 1 get pp catch exception ignored else for class pp static constants try return pp get field key get pp catch exception ignored return null | returns the constant value of the given key |
public default tree model localize final default tree model model engine add localize listener new localize listener public void localized model reload return model | registers the model so it localizes on the fly |
public void cleanup state get object handler cleanup state get id map | destroys all undisplayable components to free some memory |
public abstract table model localize final abstract table model model engine add localize listener new localize listener public void localized model fire table structure changed return model | registers the model so it localizes on the fly |
public void add localize listener localize listener listener listeners add listener | adds a localize listener to this engine |
public object localize string key return new localized object string engine string class key | conveniently returns a localized object instance which can be used in |
public void register t element is dirty true for class c element supported classes if c null throw new runtime exception failed to register element get class get name error in implementation no supported classes found set t set elements get c if set null set new hash set t elements put c set set add element | registers a library element with the library |
public object get object obj string name throws convert exception return get property name get obj | sets a property or field in the given object to the given value |
private string get directory string directory string value directory map get directory return value | action beigin path index index |
public string get warnings return warnings | get the warning messages from the read or write process |
public void set no cache boolean b this no cache b | if components have sizes or positions linked to the bounds of the parent |
public boolean is unset most common case by far is this zero pixel return this zero pixel pref null min null max null gap push false | returns if this bound size has no min preferred and maximum size set |
public void invalidate container size col flow specs null | if the container parent that this grid is laying out has changed its |
public string get ideutil version return 1 0 | returns the version of ideutil |
public unit value get align return align | returns the alignment used either as a default value for sub entities or |
public bound size get size return size | returns the min preferred max size for the entity in the dimension that |
public string get size group return size group | returns the size group that this entity should be in for the dimension |
public string get end group return end group | returns the end group that this entity should be in for the demension |
public void set fill boolean b fill b | sets if the component in the row column that this constraint should |
public boolean is no grid return no grid | returns if the row column should default to flow and not to grid |
private int increase int p int cnt return lc is flow x p 0 cnt p 1 cnt | go to next cell |
public void set layout constraints object constr if constr null constr instanceof string constr constraint parser prepare string constr lc constraint parser parse layout constraint string constr else if constr instanceof lc lc lc constr else throw new illegal argument exception illegal constraint type constr get class to string layout constraints constr dirty true | sets the layout constraints for the layout manager instance as a string |
private void wrap int cell xy bound size gap size boolean flowx lc is flow x cell xy 0 flowx 0 cell xy 0 1 cell xy 1 flowx cell xy 1 1 0 if gap size null if wrap gap map null wrap gap map new hash map integer bound size 8 wrap gap map put cell xy flowx 1 0 gap size add the row column so that the gap in the last row col will not be removed if flowx row indexes add cell xy 1 else col indexes add cell xy 0 | wraps to the next row or column depending on if horizontal flow or |
public void set column constraints object constr if constr null constr instanceof string constr constraint parser prepare string constr col specs constraint parser parse column constraints string constr else if constr instanceof ac col specs ac constr else throw new illegal argument exception illegal constraint type constr get class to string col constraints constr dirty true | sets the column layout constraints for the layout manager instance as a |
public void set row constraints object constr if constr null constr instanceof string constr constraint parser prepare string constr row specs constraint parser parse row constraints string constr else if constr instanceof ac row specs ac constr else throw new illegal argument exception illegal constraint type constr get class to string row constraints constr dirty true | sets the row layout constraints for the layout manager instance as a |
public void set constraint map map component object map scr constr map clear cc map clear for map entry component object e map entry set set component constraints impl e get key e get value true | sets the constraints map |
public void set pos unit value pos this pos pos null new unit value pos 0 pos 1 pos 2 pos 3 null link targets null | sets absolute positioning of one or more of the edges |
public void set component constraints component comp object constr set component constraints impl comp constr false | sets the component constraint for the component that already must be |
public void add layout callback layout callback callback if callback null throw new null pointer exception if callback list null callback list new array list layout callback 1 callback list add callback | adds the callback function that will be called at different stages of the |
public boolean is bounds in grid return bounds in grid | returns if the absolute code pos code value should be corrections to |
private int get debug millis int global debug millis layout util get global debug millis return global debug millis 0 global debug millis lc get debug millis | returns the debug millis |
public int get hide mode return hide mode | sets how a component that is hidden not visible should be treated by |
public void set hide mode int mode if mode 1 mode 3 throw new illegal argument exception wrong hide mode mode hide mode mode | sets how a component that is hidden not visible should be treated by |
public int get span x return span x | returns the number of cells the cell that this constraints component |
public void set span x int cells this span x cells | sets the number of cells the cell that this constraints component will |
public int get span y return span y | returns the number of cells the cell that this constraints component |
public float get push x return push x | pushx indicates that the column that this component is in this first |
public void set push x float weight this push x weight | pushx indicates that the column that this component is in this first |
public float get push y return push y | pushx indicates that the row that this component is in this first if |
public void set push y float weight this push y weight | pushx indicates that the row that this component is in this first if |
public int get split return split | returns in how many parts the current cell that this constraints |
public void set split int parts this split parts | sets in how many parts the current cell that this constraints component |
public action probe final boolean udp final string host return new action public void execute throws xdrexception rpcexception ioexception final rpccaller caller rpc caller udp host final call handler ch caller new call port mapper2 program port mapper2 version port mapper2 procedures dump ch send call ch join final map list image maps ch response decode any map list xdrer for map list image it maps it null it it next final mapping map it map system out print map prog t map vers t protocol map prot t map port n | just a call to dump |
public void test standards throws exception final file standards new file src x final file fs standards list files new filename filter public boolean accept final file dir final string name return name ends with x for int i 0 i fs length i system out println testing fs i parse fs i | this test tries |
public boolean is unresolved try return file exists file is socket catch ioexception e return true | check wether the socket file exists and is a unix socket |
public void test data reference throws exception final byte array new byte 1024 final datagram packet packet new datagram packet array array length assert same unexpected behaviour datagram packet copies the data array array packet get data | unix sockets suppose that |
public int read throws ioexception byte arr new byte 1 if this read arr 0 1 1 return 1 return arr 0 | reads the specified byte from this unixsocket input stream |
public void write int b throws ioexception im not sure what to do here byte bb byte b byte arr bb socket send arr | writes the specified byte to this unixsocket output stream |
public void write byte b throws ioexception socket send b | writes code b |
public void write byte b int off int len throws ioexception if len 0 off 0 off len b length if len 0 return throw new array index out of bounds exception byte msg new byte len for int k off k len k msg k b k socket send msg | writes code len code bytes from the specified byte array |
public void close throws ioexception this flush this socket close | closes this unixsocket output stream and releases any system resources |
public transfer timeout final int millis this timeout millis return this | non positive means no timeout |
protected int index size return index size 0 domain length | computes from entries and subtype the space needed to store the index |
protected void entries for size final int nodesize final int crcbs crc bytes with crc int datasize nodesize node header index header size int entrysize position bytes wide image crcbs if domain step 0 entrysize position bytes wide domain else datasize position bytes wide domain crcbs if datasize entrysize 0 system err println warning datasize entrysize bytes unusable at the end of the index area final int entries datasize entrysize domain new long entries image new long entries | computes from nodesize and subtype the number of entries that can be |
public object get value final object type return type2value get type | returns the first value for the object identifier tt type tt |
public void unlink if prev null prev next next if next null next prev prev next prev null | extract this node from the linked list where it lays |
public void link after final l before followed by before as l | links tt this tt after tt before tt |
public void recycle final l last recycling as l last | tt this tt and tt last tt are members of a cycle |
public static abstract class only counts implements stream spy public void read count long n throws ioexception public void write count long n throws ioexception public void read final int b throws ioexception read count 1 public void read final byte b final int off final int len throws ioexception read count len public void skipped final long n throws ioexception read count n public void written final int b throws ioexception write count 1 public void written final byte b final int off final int len throws ioexception write count len public void close throws ioexception | an intermediate step for those stream spies interested in the amount |
public void test to string final pair measure string cases new pair pair make new measure h 1 h m h s 1 00 00 000000001 1 01 00 1 00 01 pair make new measure m 11 s 777888999 s 777888999 777888999 1 11 777888999 1 777888999 0 777888999 for final pair measure string c cases final string f c get1 to string system out println f assert equals c get2 f | test human representation |
public void test jdk final string css a a a b z z b a z a b z x00 z a z a u ffff a z a a a z illegal ranges cannot be empty z a a z for final string cs css final string res cs 0 final string oks cs 1 final string kos cs 2 for final string re res system err println testing assumptions for re for final string ok oks assert true pattern matches re ok for final string ko kos assert false pattern matches re ko | test the meaning of some extreme regular expressions |
protected boolean is osm tile newer long file age throws ioexception url url url new url tile get uri http urlconnection url conn http urlconnection url open connection prepare http url connection url conn url conn set request method head url conn set read timeout 30000 30 seconds read timeout system out println tile age new date url conn get last modified new date file age long last modified url conn get last modified if last modified 0 return true no last modified time returned return last modified file age | performs a code head code request for retrieving the |
public void set map squares visible boolean map squares visible this map squares visible map squares visible repaint | enables or disables painting of the |
public string to string return javadoc attribute name name text text | return a pretty print textual description of the attribute |
public throwable get root cause return previous throwable | get the exception that caused this exception to be raised |
public string get stack trace string if there s no nested exception there s no stack trace if previous throwable null return null string buffer trace buffer new string buffer if previous throwable instanceof attribute exception trace buffer append attribute exception previous throwable get stack trace string trace buffer append nested by n trace buffer append stack trace string return trace buffer to string | return the stack trace including root cause exceptions |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.