input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public object clone return new oriented box data | copies the box |
public void set yzoom double y zoom if this line zoom y zoom double old zoom this line zoom this line zoom y zoom reset line layer get overlay redo height fire property change y zoom old zoom y zoom | sets the y direction zoom ratio |
public int get line num int start if multi int i 0 try while start string lines get i length start string lines get i length i catch index out of bounds exception ioobx throw new string index out of bounds exception column specified beyond end of line return line number i lines size else return line number | this finds the line number of a specific character |
public int get x return data x pos | gets the x coordinate of the box origin |
public boolean intersects range r if this get extrema intersects r get extrema return false else return this intersect r size 0 | tests to see if the this intersects the other range |
public int get y return data y pos | gets the y coordinate of the box origin |
public int get width return data width | gets the width of the box |
public int get height return data height | gets the height of the box |
public int get rotation return data rotation | gets the rotation around the origin |
public string to string if done string buffer ret val new string buffer lines get 0 to string for int i 1 i lines size i ret val append lines get i return ret val to string else return current | returns the string representation of the current line or mutliline |
public boolean intersects interval s if this is empty s is empty return false sorted map m spans sub map s get start s get end if m is empty return true else m spans head map s get start interval last interval m get m last key return last intersects s | checks to see if some interval of this |
public pnt get centroid return centroid | gets the approximate center of the box |
public object clone return new poly line this | constructs a copy of this object |
public double get view offset x return label length | gets where the timelines actually start in the view |
public string to string if lines size 1 string buffer buf new string buffer for iterator iter lines iterator iter has next buf append append squiggle iter next to string append return buf to string else if lines size 1 return squiggle lines get 0 to string else return | gets a list of the points as a string usually for debugging |
public void clear lines clear current null multi false done true | this clears the current multiline |
public bounding box get bounding box if bbox null init bbox if bbox null bbox new bounding box return bbox | gets the nearest bounding box that contains the line |
public iterator get points if lines null lines size 0 return squiggle lines get 0 get points else return null | gets an iterator through all the points on the |
public boolean equals object o if o this return true else if o instanceof poly line poly line that poly line o iterator my pts lines iterator iterator yer pts that lines iterator boolean matching true boolean searching true while matching searching searching my pts has next matching searching yer pts has next if searching matching matching my pts next equals yer pts next return matching searching else return false | tests to see if the two objects refer to |
public boolean add vertex pnt v if lines null lines size 0 squiggle lines get 0 add point v else squiggle nl new squiggle nl add point v lines new linked list lines add nl return true | adds the given vertex to the end of the polyline |
public action listener get import config action listener return import config listener | gets an action object that will import the viper schema of an existing |
public double get view offset y return get ruler height | gets where the timelines actually start in the view |
public boolean starts with string prefix if empty return false else if done return current starts with prefix else int i 0 do if prefix length string lines get i length if string lines get i equals prefix substring 0 string lines get i length return false else prefix prefix substring string lines get i length i else return string lines get i starts with prefix while prefix length 0 i lines size return prefix length 0 | equivalent to to string |
public double get view length return view length | gets the actual length of the view in pixels |
public void test rational equals assert true zero equals 0 assert true one equals 1 temp rational1 set to 9 9 assert equals one temp rational1 assert true temp rational1 equals 1 rational minus zero one temp rational2 temp rational1 negate assert equals temp rational1 temp rational2 assert true temp rational1 equals 1 assert true temp rational2 equals 1 temp rational1 new rational two temp rational1 reciprocate assert true two equals 2 assert true temp rational1 equals two assert true temp rational1 equals zero | tests the rational data types equality methods |
public void set output print writer pw out pw | sets the output stream |
public void set output print stream ps out new print writer ps true | sets the output stream |
public double get visible view height return get bounds get height get view offset y | gets the height of the scroll window aperture |
public object clone squiggle nl new squiggle for iterator iter segments iterator iter has next nl segments add new pnt pnt iter next nl bbox bounding box this bbox clone return nl | copies the squiggle |
public range union range o range u new range u add all this iterator u add all o iterator return u | gets the union of this and the specified range |
public void close throws ioexception while include handles empty random access file include handles pop close | closes the input file |
public string to string string buffer buf new string buffer for iterator iter segments iterator iter has next buf append iter next to string return buf to string | gets a string representation |
public iterator get points return segments iterator | gets an iterator through all the |
public void add point pnt p segments add p this bbox null | adds a new point at the end of the squiggle |
public void test rational infinity temp rational1 set to 100 0 assert true temp rational1 greater than 1000 assert true temp rational1 greater than one temp rational1 negate assert true inf 0 temp rational1 zero temp rational1 less than zero assert true inf 1000 temp rational1 1000 temp rational1 less than 1000 boolean passed xtest false temp rational1 set to 0 0 try one less than temp rational1 catch arithmetic exception ax passed xtest true assert true passed xtest | tests the rational data types ability to handle values outside the |
public range intersect complement range o range r new range r add all this iterator r remove all o return r | gets all elements from this that are not elements |
public squiggle reverse squiggle s2 new squiggle list iterator li segments list iterator segments size while li has previous s2 add point pnt li previous return s2 | returns this squiggle with the points in the opposite order |
public boolean is clockwise if segments size 3 return true return signed area less than 0 | determine the direction of the points in the squiggle assuming a closed |
public boolean diagonalie pnt a pnt b if segments size 2 return true iterator iter get points pnt c pnt iter next while iter has next pnt d pnt iter next skip vertex points if c equals a d equals a c equals b d equals b else if util intersects a b c d return false c d return true | determines if the segment ab is a diagonal that doesnt intersect the |
public double get view height return math max get preferred view height get visible view height | gets the overall view height |
public void set prefs prefs manager manager prefs manager event queue invoke later new runnable public void run check for lost file | sets the associated preference manager |
public boolean equals object o if o this return true else if o instanceof polygon polygon that polygon o iterator my pts lines iterator iterator yer pts that lines iterator boolean matching true boolean searching true while matching searching searching my pts has next matching searching yer pts has next if searching matching matching my pts next equals yer pts next return matching searching else return false | tests to see if the other object contains the same |
public object clone return new polygon this | constructs a copy of this object |
protected void init bbox if bbox null return iterator iter lines iterator if iter null iter has next bbox squiggle iter next get bounding box copy while iter has next bbox extend to contain squiggle iter next get bounding box if poly list carve polys init poly | creates a bounding box around this for use by get bounding box etc |
public boolean file handle set return include handles empty | checks to see if any file handles remain |
public void reset totals total err total warn total generr 0 | reset the count of warning and errors |
public void set view length double view width if this view length view width double old view width this view length this view length view width reset view get overlay redo length fire property change view length old view width view width | sets the actual view length |
public void test cpoly equals assert equals unit square unit square assert equals big square big square assert true big square equals unit square assert true unit square equals big square | tests the convex polygons equality methods |
public interval create interval comparable s comparable e return new simple interval s e | creates a new interval |
public int get current line number return current line get line num | gets the current line number of the cursor |
public object clone return new convex polygon this | gets a copy of this polygon |
public string get current line return current line to string | get the current line as a string |
public poly list get intersection poly list other if other composed other instanceof convex polygon return poly list intersection this other else if this composed return poly list intersection other this else if get bounding box intersects other get bounding box return convex polygon intersection this convex polygon other else return new convex polygon | gets the region shared between this polygon and all those in the |
public string advance to next real line throws ioexception eofexception goto next real line return get current line | like goto next real line but also returns the line |
public file history manager get history manager return history manager | gets the mru file history manager |
public boolean equals object o if o this return true else if o instanceof ellipse ellipse other ellipse o return origin equals other origin diagonal equals other diagonal rotation other rotation else return false | tests to see the two objects are equal |
public pnt get centroid if this instanceof box information return box information this get centroid else return this get bounding box get centroid | gets the center of the bounding box of the polygon for now |
public string to string return origin x origin y diagonal x diagonal y rotation | prints out the circle in the vi per format |
public object clone return new ellipse this | copies the ellipse |
public void goto next real line throws ioexception eofexception do goto next line while current line real | advances the cursor to the next line |
public boolean contains pnt point todo test to see if the point is within the ellipse throw new unsupported operation exception ellipse contains pnt not yet implemented | tests to see if the point is within this ellipse |
public bounding box get bounding box return new bounding box origin x int value origin y int value diagonal x int value diagonal y int value | gets the bounding box around the ellipse |
public double area todo calculate the area of the ellipse throw new unsupported operation exception ellipse area not yet implemented | approximates the area of the ellipse |
public double intersect area ellipse other todo calculate the area shared between two ellipses throw new unsupported operation exception ellipse intersect area not yet implemented | computes the area shared between the two ellipses |
public rational get x return origin x | gets the x coordinate of the origin |
public rational get y return origin y | gets the y coordinate of the origin |
public chronicle view model get model return model | gets the data model behind this chronicle view |
public rational get width return diagonal x | gets the width of the ellipse |
public rational get height return diagonal y | gets the height of the ellipse |
public void set history manager file history manager manager history manager manager | sets the file history manager to use with the application |
public boolean is inside convex polygon p boolean has points false for iterator iter get verteces iter has next has points true pnt curr pnt iter next if p contains curr return false return has points | tests to see if the specified polygon is completely contained within |
public boolean equals object o if o instanceof pnt pnt c pnt o rational mine new rational rational other new rational rational divide x t mine rational divide c x c t other if mine equals other return false rational divide y t mine rational divide c y c t other if mine equals other return false return true else return super equals o | tests the equality of this with another component |
public int hash code rational x new rational rational y new rational rational divide x t x rational divide y t y return x hash code y hash code | generates a hash code for this object |
public void pay attention to string name search type name | the block type to look for |
public point point value return new point x int value y int value | gets the point representation of this point |
public rational get x return x | gets the x coordinate of the point |
public rational get y return y | gets the y coordinate of the point |
public moveable move int direction int distance switch direction case moveable north return shift 0 distance case moveable northeast return shift distance distance case moveable east return shift distance 0 case moveable southeast return shift distance distance case moveable south return shift 0 distance case moveable southwest return shift distance distance case moveable west return shift distance 0 case moveable northwest return shift distance distance throw new illegal argument exception not a cardinal direction direction | moves the box in the given direction |
public void set model chronicle view model cm if this model cm chronicle view model old model this model if this model null this model remove chronicle view listener cl this model cm if cm null this model add chronicle view listener cl reset view get overlay redo length get overlay redo height fire property change model old model cm | sets the model to display |
public string advance to begin directive try while is begin directive current line goto next line catch ioexception iox return null return current line to string substring begin length | advances to next begin directive noop if current line is a begin |
static public double snap angle to major direction double angle return math round 4 angle math pi math pi 4 | snaps the angle in radians to a multiple of pi 4 |
public action history pane get action history return undo history manager | gets the undo redo action history |
static public boolean collinear and overlap pnt a pnt b pnt c pnt d if collinear a b c return false else return c between a b d between a b | tests to see if two line segments are collinear and overlap |
public boolean current line is begin directive return is begin directive current line | checks to see if the current line contains a |
public void set renderer catalogue renderer catalogue cat if this factory cat renderer catalogue old this factory this factory cat fire property change renderer catalogue old cat | sets the factory used to generate timeline factories |
public object clone return new poly list this | constructs a copy of this object |
public boolean equals object other if this other return true else if other instanceof poly list return poly list other area equals area poly list intersection this poly list other area equals area else return false | checks to see if this equals the other space |
public void test bbox equals temp poly new bounding box 0 0 1 1 assert equals unit square temp poly assert equals temp poly unit square assert true temp poly equals big square assert true big square equals temp poly | tests the bounding boxs equality methods |
public int hash code return area hash code | get a hashcode for this region |
public string to string list of points iterator iter get polys string buffer buf new string buffer while iter has next poly list temp poly list iter next buf append append convex polygon temp to string list of points append buf append return buf to string | gets a list of the points as a string usually for debugging |
public string to string iterator iter get polys string buffer buf new string buffer while iter has next poly list temp poly list iter next buf append append temp to string append buf append return buf to string | returns a string representation of this list of convex polygons |
public boolean current line is end directive return is end directive current line | checks to see if the current line contains an |
public rational area if area null return area iterator iter get polys area new rational 0 while iter has next poly list curr poly list iter next rational plus area curr area area return area | get the area of coverage by these polygons |
public poly list get intersection poly list other return poly list intersection this other | get the intersection of this poly list with another |
public renderer catalogue get renderer catalogue return this factory | gets the timeline view metafactory |
public void set action history action history pane ahp undo history manager ahp | sets the action history panel |
protected void init bbox if bbox null return iterator iter if originals size 0 iter originals iterator else iter polys iterator if iter has next bbox poly list iter next get bounding box copy while iter has next bbox extend to contain poly list iter next get bounding box else bbox new bounding box | creates a bounding box around this for use by get bounding box |
public bounding box get bounding box init bbox return bbox | gets the closest box around the set of polygons |
public boolean current line is descriptor return vreader is descriptor line current line | tests to see if the cursor is on a descriptor line |
protected iterator get polys init bbox return polys iterator | gets an iterator that goes through a list of polygons |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.