input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public t get directory path if f path trailing separator return cast return remove last path segments 1 | returns the path without file name |
public string get uri boolean encode return get uri true encode | returns the string representation of this uri strong without strong |
public string get file name if f path trailing separator return null return get last path segment | returns the name of the file |
public string get uri boolean escape boolean encode string buffer result new string buffer get uri result escape encode return result to string | returns the string representation of the full uri |
public string get file name without extension if f path trailing separator return null string segment get last path segment if segment null return null int id segment last index of return id 0 segment substring 0 id segment | returns the name of the file without extension |
public void get uri string buffer result boolean escape boolean encode if f scheme segments null f scheme segments is empty for string segment f scheme segments if segment null segment encode segment escape encode result append segment result append if has authority result append append authority result append full path result escape encode | appends the full string representation of the full uri to the given |
public string get last path segment if f path segments is empty return null string segment f path segments get f path segments size 1 return segment | returns the last segment of this path |
public t get parent if f path segments is empty return cast t result get clone int idx result f path segments size 1 if idx 0 result f path segments remove idx result f path trailing separator idx 0 return result check clone path | returns a new instance with the parent path |
public string get path segment int pos if pos 0 pos f path segments size return null return f path segments get pos | returns a path segment from the given position |
public t get resolved t result get clone int len result f path segments size for int i 0 i len i string segment result f path segments get i if equals segment equals segment equals segment result f path segments remove i len i if equals segment i 0 result f path segments remove i len i return result check clone path | resolves all relative path segments like |
public boolean has absolute path return f path absolute | returns code true code if this path is absolute i |
public boolean has trailing separator return f path trailing separator | returns code true code if this path has a trailing separator |
public t new uri return new copy null | returns a new uri of this type |
public t make relative path if f path absolute return cast t result get clone result f path absolute false return result check clone path | create if it is possible a new relative |
public t remove first path segments int count if f path segments is empty return cast t result get clone count math max 0 math min count result f path segments size for int i 0 i count i result f path segments remove 0 return result check clone path | returns a copy of this path with removed first path segments |
public t remove last path segments int count return remove last path segments count false | returns a copy of this path with removed last path segments |
public t remove last path segments int count boolean folder segments only count math max 0 math min count f path segments size if count 0 return cast t result get clone int len result f path segments size folder segments only result f path trailing separator if folder segments only len for int i len 1 i 0 i len count i result f path segments remove i return result check clone path | returns a copy of this path with removed last path segments |
public void register string key string resource key normalize key key f map put key new resource info resource | registers a new resource |
public void unregister string key key normalize key key f map remove key | removes a resource with the given name |
public t set file name string file name t result get clone int len result f path segments size if result f path trailing separator len 0 result f path segments remove len 1 if len 1 result f path trailing separator true if file name null result f path trailing separator false result f path segments add file name return result | sets a new file name |
public t set full path string path return set full path path decode path | creates and returns a new path with the specified path query and |
public t set full path string path boolean decode t result get clone result f path absolute false result f path segments clear result f path trailing separator false parse path path result decode true return result check clone path | creates and returns a new instance with the specified path query and |
public t set path string path return set path path decode path | creates and returns a new path with the specified path |
public t set path string path boolean decode t result get clone result f path absolute false result f path trailing separator false parse path path result decode false return result check clone path | creates and returns a new instance with the specified path |
public t remove first scheme segments int count return remove scheme segments count true | returns a copy of this uri with removed first scheme segments |
public t remove last scheme segments int count return remove scheme segments count false | returns a copy of this uri with removed last scheme segments |
public t remove scheme segments int count boolean begin t uri get clone int len uri f scheme segments size count math max 0 math min count len int pos begin 0 len count for int i 0 i count i uri f scheme segments remove pos return uri | returns a copy of this uri with removed scheme segments |
public t set authority string host int port return set authority null host port | returns a new uri with the specified host and port |
public t set authority string user info string host int port t uri get clone uri f user info user info uri f host host uri f port port return uri check clone path | returns a new uri with the specified host port and user info |
public t set fragment string fragment if f fragment fragment return cast if f fragment null f fragment equals fragment return cast t uri get clone uri f fragment fragment return uri | returns a new uri with the specified fragment part |
private void set internal query list list query item query f query query null new array list query item query null f query cache null | the internal method used to initialize the |
protected int add int x int y int l x 0x ffff y 0x ffff int h x 16 y 16 l 16 return h 16 l 0x ffff return x y 0x0ffffffff | this method adds two values using 16 bit operations |
private void set internal query string string query if query null return if f query null f query new array list query item string array query split for string str array string pair str split string name pair 0 trim if equals name continue string value pair length 1 pair 1 query item item new query item name value f query add item f query cache null | the internal method used to initialize the |
public t set port int port t uri get clone uri f port port return uri check clone path | returns a new uri with the specified port |
public void copy from rdfmodel model copy mode mode if model this return if mode copy mode replace all rdfresource resource get model resource f map clear f map put resource get uri resource for rdfresource resource model string uri resource get uri rdfresource new resource get resource uri true new resource copy from resource mode string uri model get uri set uri uri | copies all resources from the given model |
public t set query map string string params t uri get clone uri set internal query list null uri append internal params params return uri | returns a new uri with the specified query part |
public t set query string query t uri get clone uri set internal query string query return uri | returns a new uri with the specified query part |
public t set scheme string scheme t uri get clone parse scheme uri scheme return uri | returns a new uri with the specified scheme |
public t set scheme and authority string host part t uri get clone uri f scheme segments clear uri f user info null uri f host null uri f port 0 if host part null parse scheme and authority uri host part return uri check clone path | returns a new uri with the given scheme and authority parts scheme user |
public t set user info string user info t uri get clone uri f user info user info return uri check clone path | returns a new uri with the specified user information |
public void clear f errors null f event manager null f callbacks null | clears all internal fields event manager callbacks errors |
public ievent manager get event manager return f event manager | returns the event manager dispatching this event |
public void add observer ievent observer observer array list ievent observer list new array list ievent observer f list if list add observer f list list | adds a new event observer to the internal list |
public boolean has errors return f errors null | returns code true code if some errors fired by event listeners where |
public void on error throwable error if f errors null f errors new hash set throwable f errors add error | this method is used to add an error or exception to this event |
protected void report errors set throwable errors | this method could be overloaded in subclasses to handle report errors |
public void remove observer ievent observer observer array list ievent observer list new array list ievent observer f list if list remove observer f list list | removes the specified event observer from the internal list |
public boolean has response return f has response | returns code true code if the response was already stored in this |
public void set request q request f request request | this method is used to set a new request object |
protected void init default observers add observer new dispatching event observer | adds default observers to this event manager |
private boolean is udml boolean b is udml false try file reader fr nq udml new file reader f nq udml buffered reader br udml new buffered reader fr nq udml if br udml read line index of declare 0 b is udml true br udml close fr nq udml close catch ioexception e system out println io exception e if b is udml system out println f nq udml is a valid file return b is udml | validates the files udml content |
public void add node final node node path add node | adds a node to the path |
public void add filelist file list list filelists add list | add a filelist to touch |
private expression expression return operator | parses a single expression |
private expression operator expression expression atomic keep building operator expressions as long as we have operators while match token type operator match token type equals char operator last 1 text char at 0 expression right atomic expression new operator expression expression operator right return expression | parses a series of binary operator expressions into a single |
private boolean match token type type1 token type type2 if get 0 type type1 return false if get 1 type type2 return false position 2 return true | consumes the next two tokens if they are the given type in order |
private boolean match token type type if get 0 type type return false position return true | consumes the next token if its the given type |
private boolean match string name if get 0 type token type word return false if get 0 text equals name return false position return true | consumes the next token if its a word token with the given name |
private token consume token type type if get 0 type type throw new error expected type return tokens get position | consumes the next token if its the given type |
private token consume string name if match name throw new error expected name return last 1 | consumes the next token if its a word with the given name |
private token last int offset return tokens get position offset | gets a previously consumed token indexing backwards |
private token get int offset if position offset tokens size return new token token type eof return tokens get position offset | gets an unconsumed token indexing forward |
public void interpret string source tokenize list token tokens tokenize source parse parser parser new parser tokens list statement statements parser parse labels interpret until we re done current statement 0 while current statement statements size int this statement current statement current statement statements get this statement execute | this is where the magic happens |
public array list get all diagram shapes array list shapes new array list shapes add all this get shapes iterator shapes it this get composite shapes iterator while shapes it has next composite diagram shape comp shape composite diagram shape shapes it next shapes add all comp shape get shapes return shapes | returns a list of all diagram shapes in the diagram including |
public int compare object object1 object object2 if object1 instanceof diagram shape object2 instanceof diagram shape throw new runtime exception this comparator can only compare diagram shape s diagram shape shape1 diagram shape object1 diagram shape shape2 diagram shape object2 double y1 shape1 make into path get bounds get center y double y2 shape2 make into path get bounds get center y if y1 y2 return 1 if y1 y2 return 1 return 0 | puts diagram shapes in pseudo 3d order starting from back to front |
public array list break into distinct boundaries text grid grid array list result abstraction grid temp new abstraction grid grid this result temp get distinct shapes return result | takes into account character info from the grid |
public boolean is inside graph point point double x point get x double y point get y return min x x x max x min y y y max y | returns tt true tt if the specified point is inside this |
public clipping rectangle get bounding box return this | returns this instance |
public void render with renderer renderer if renderer instanceof oval renderer oval renderer renderer render this else throw new illegal argument exception renderer does not implements oval renderer | renders this oval with the specified |
public clipping shape get clipping shape return clipping shape | returns the clipping shape |
public void add element graphical element element if element null throw null pointer exception else elements add element element | adds the specified element at the end of the list of elements |
public void replace element at int index graphical element element if element null throw null pointer exception else elements set element at element index | replaces the specified element at the specified index of |
public graph point get point int index return graph point points element at index | returns the point for the specified index |
public double get orientation angle return orientation angle | returns the orientation angle in degree |
public void add point graph point point points add element point | adds a new point to the end of the list of points |
public void remove all points points remove all elements | removes all points |
public anchor get horizontal anchor return horizontal anchor | returns the anchor for horizontal position of the text |
public void replace point at int index graph point point points set element at point index | replaces the point at the specified index by a new one |
public void render with renderer renderer if renderer instanceof polygon renderer polygon renderer renderer render this else throw new illegal argument exception renderer does not implements polygon renderer | renders this line with the specified |
public anchor get vertical anchor return vertical anchor | returns the anchor for vertical position of the text |
public graph point get center return center | returns the center of this element |
public graphic attributes get graphic attributes return attributes | returns the drawing attributes |
public graph point get position return position | returns the position |
public void render with renderer renderer if renderer instanceof rectangle renderer rectangle renderer renderer render this else throw new illegal argument exception renderer does not implements rectangle renderer | renders this rectangle with the specified |
public void render with renderer renderer if renderer instanceof text renderer text renderer renderer render this else throw new illegal argument exception renderer does not implements text renderer | renders this line with the specified |
public data container get container return null | returns always tt null tt |
public void paint dimension size new dimension img3 get width img3 get height g3 set color background g3 fill rect 0 0 size width 1 size height 1 init size transformation apply g3 plot plot get plot draw coordinate system size plot draw plot plot if marker null marker render with create renderer | paints the plot |
protected boolean is valid data element element return element instanceof data curve | returns tt true tt if tt element tt is an instance of |
protected boolean is valid data element element return element instanceof data point | returns tt true tt if tt element tt is an instance of |
public data container get container return container | returns the container |
public data element get deleted element return deleted element | returns the deleted element |
public int get number of elements return container size | returns the number of elements of this container |
protected void calculate transformation dimension size transformation new transformation size width size height get paper get horizontal anchor get vertical anchor | calculate the transformation form device independent coordinates into |
public string get full key string key return path null key path key | returns the full key |
public data element get element int index return data element container element at index | returns the element for the specified index |
protected renderer create renderer return graphics2 drenderer factory create renderer init g3 return graphics renderer factory create renderer init g null transformation | creates an appropriated |
public string get string key return get path key 0 | returns the value associated with this key |
public int get index of data element element return container index of element | returns the index of the specified element |
public void set renderer string class name renderer class name | sets the renderer used to render the plot |
public config data get node string key string path path null key path key return create config data path | returns the tt config data tt object associated with this key |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.