input
stringlengths
10
828
output
stringlengths
5
107
public boolean equals object o return o instanceof map entry equal or both null key map entry o get key equal or both null value map entry o get value
compares the specified object with this entry for equality
public int hash code return hash of key hash of value
returns the hash code value for this map entry
public void get lock if get lock true throw new bug logic error
this method does not return until the lock has been acquired
public boolean get lock if available return get lock false
this method returns immediately
public lock state get lock state return is current thread holding lock locked state unlocked state
this method returns an object that can be asked to restore the
public void release lock if held if is current thread holding lock release lock
releases the lock
public int get expected size return this expected size
gets the value of expected size
public void set expected size int expected size this expected size expected size
sets the value of expected size
public int get bytes received if start time 0 start time system current time millis return this bytes received
gets the value of bytes received
public void set bytes received int bytes received this bytes received bytes received
sets the value of bytes received
public void set closed boolean arg closed if arg closed true end time 0 end time system current time millis this closed arg closed
sets the value of closed
public exception get current exception return this current exception
gets the value of current exception
public void set current exception exception arg current exception this current exception arg current exception
sets the value of current exception
public ioexception get induced exception return this induced exception
gets the value of induced exception
public void set induced exception ioexception arg induced exception this induced exception arg induced exception
sets the value of induced exception
public dimension minimum layout size container parent return get component parent get minimum size
calculates the minimum size dimensions for the specified
public dimension preferred layout size container parent return get component parent get preferred size
calculates the preferred size dimensions for the specified
public void add layout component string name component comp add layout component comp null
adds the specified component with the specified name to
public void add layout component component comp object constraints if constraints instanceof label strip constraints comp list add comp constraint map put comp constraints else throw new illegal argument exception label strip constraints object required
adds the specified component to the layout using the specified
public void remove layout component component comp comp list remove comp list index of comp constraint map remove comp
removes the specified component from the layout
public dimension minimum layout size container target dimension inside size new dimension new layout totals direction2 d x minimum total new layout totals direction2 d y minimum total return util add insets inside size target
calculates the minimum size dimensions for the specified
public dimension preferred layout size container target dimension inside size new dimension new layout totals direction2 d x preferred total new layout totals direction2 d y preferred total system out println ls pref x inside size get width pref y inside size get height return util add insets inside size target
calculates the preferred size dimensions for the specified
public void invalidate layout container target system out println ls invalidate memo minimum size clear memo preferred size clear
invalidates the layout indicating that if the layout manager
public void state changed change event e update components
invoked when the target of the listener has changed its state
public void action performed action event e int new index polarity math max 0 model get selected index model set selected index math max 0 math min index range 1 new index
invoked when an action occurs
public void paint icon component c graphics g int x int y graphics2 d g2 d graphics2 d g paint saved paint g2 d get paint g2 d set paint c is enabled color dark gray color gray int x values x x tail x x head x x head x x tail int y values y 1 y height 2 1 y height 2 y height g2 d fill polygon x values y values x values length g2 d set paint saved paint
draw the icon at the specified location
public void action performed action event e if read text field string message no such number get trimmed text joption pane show message dialog root pane message invalid number joption pane error message
invoked when an action occurs on the field text field
public void state changed change event e write text field text field set border text border text field set background text background text field set foreground text foreground
invoked when the model for this number ticker has changed its state
public void mouse pressed mouse event e if read text field return now pressed true set border border factory create lowered bevel border repaint model set value is adjusting true model apply delta polarity single step mode true step size 1 num steps taken 1 timer set delay tick interval timer restart obsolete tick initialization logical interval initial action interval actual interval int logical interval step size 1 duration 0 timer set delay actual interval timer restart
invoked when a mouse button has been pressed on a component
public void mouse released mouse event e now pressed false timer stop model set value is adjusting false set border border factory create raised bevel border repaint
invoked when a mouse button has been released on a component
public void close throws ioexception move position past end of file page num int math min long max value page size 1 integer max value
closes this input stream and releases any system resources
public int read throws ioexception byte bytes new byte 1 return read bytes 1 1 bytes 0 0xff
reads the next byte of data from the input stream
public int read byte b int off int len throws ioexception system out println read off len if off 0 len 0 off len b length throw new index out of bounds exception int block sizes get block sizes len int amount read 0 for int i 0 i block sizes length i int target block sizes i int actual read within page b off target amount read actual off actual if actual target break return amount read
reads up to code len code bytes of data from the input stream
public boolean accept file dir string name return path util get which extension name extensions 0
tests if a specified file should be included in a file
public boolean accept file dir string name return matcher reset name matches
tests if a specified file should be included in a file
public string to variable precision string double x string guess to string x return guess index of 0 guess index of e 0 has exponent x long to string math round x guess
equivalent to code to string double x code except when the number
protected int get num significant digits boolean is negative int exponent return math min get nsd is negative exponent max sig digs
returns the number of significant digits with which a number
public boolean equals object obj return obj instanceof measurement equals measurement obj
returns true if the argument is a code measurement code that has
public boolean equals measurement other return numeric value other numeric value original units equals other original units
returns true if the argument code measurement code has the same
public int hash code return new double numeric value hash code original units hash code
returns the hash code for this code measurement code
public string get canonical equivalent string return equivalent arg unit as unit expression return equivalent arg unit to string
yields string containing the equivalent unit expression using si reduced
public string get canonical unit string return equivalent arg unit get canonical unit string
yields string containing compatible unit expression using si reduced base
public void set value int value delegate set value value
sets the current em value em of this code spring code to
protected int get probe value spring probe probe return probe get range value delegate
this method is for internal use only and should be invoked only
public void set value int value if value spring unset throw new unsupported operation exception cannot set value of biased length instance
sets the current em value em of this code spring code to
protected int get probe value spring probe probe if probe spring probe value throw new usage exception improper use of dual spring int bias bias spring null 0 probe get range value bias spring return bias probe get range value get delegate
this method is for internal use only and should be invoked only
public int get maximum value return get probe value is stretchable spring probe max spring probe pref
returns the em maximum em value of this code spring code
public int get minimum value return get probe value is compressible spring probe min spring probe pref
returns the em minimum em value of this code spring code
public int get preferred value return get probe value spring probe pref
returns the em preferred em value of this code spring code
public int get value return get probe value spring probe value
returns the current em value em of this code spring code
protected int get probe value spring probe probe return probe get range value component axis
this method is for internal use only and should be invoked only
public int get maximum value return max enforced super get maximum value math max super get preferred value 1 super get maximum value
returns the em maximum em value of this code spring code
public int get minimum value return min enforced super get minimum value math min super get preferred value 1 super get minimum value
returns the em minimum em value of this code spring code
public int get value return true value
returns the current em value em of this code spring code
public void set value final int new value true value new value if new value spring unset super set value spring unset bias set value spring unset else int limit value new value if min enforced limit value math max limit value get minimum value if max enforced limit value math min limit value get maximum value int excess new value limit value note may be negative super set value limit value bias set value int math round alignment excess
sets the current em value em of this code spring code to
public void set value int value if springs is empty get default spring set value value for iterator u springs iterator u has next spring u next set value value
sets the current em value em of this code spring code to
public virtual spring get cell length direction2 d axis int i return axis is x width springs height springs i
returns a code virtual spring code representing the width of the
protected int get probe value spring probe probe if springs is empty return probe get range value get default spring int value integer min value for iterator u springs iterator u has next value math max value probe get range value spring u next return value
this method is for internal use only and should be invoked only
public boolean contains object o check for null o for iterator u iterator u has next if u next o return true return false
returns tt true tt if this collection contains the specified
public boolean remove object o check for null o for iterator u iterator u has next if u next o u remove return true return false
removes a single instance of the specified element from this
public long get num bytes mapped or cached lock manager lm file access synchronizer get master lock manager lock state lock state lm get lock state try lm get lock return niopages manager get shared instance compute num bytes mapped finally lock state restore
primarily for diagnostic and statistical purposes
public boolean is current thread holding lock return lock holder thread current thread
returns true if the current thread holds the lock
public void release lock if is current thread holding lock throw new usage exception this thread does not hold lock synchronized synchronizer lock holder null synchronizer notify all
releases the lock
protected page accessor wrap page accessor as needed page accessor pa return pa
this is the unsafe version no wrapping
protected page accessor wrap page accessor as needed page accessor pa return new duplicating page accessor pa
this is the safe version
public int get num file accessors lock state lock state lock manager get lock state try lock manager get lock return pool get pool size finally lock state restore
primarily for diagnostic and statistical purposes
public long get num bytes mapped or cached lock manager lm file access synchronizer get master lock manager lock state lock state lm get lock state try lm get lock return heap pages manager get shared instance compute num bytes cached finally lock state restore
primarily for diagnostic and statistical purposes
public int read throws ioexception try ioexception induced exception monitor receive exception this if induced exception null throw induced exception int c in read if c 0 monitor set bytes read this nread return c catch ioexception ioe monitor declare exception this ioe throw ioe
overrides code filter input stream
public int read byte b throws ioexception try ioexception induced exception monitor receive exception this if induced exception null throw induced exception int nr in read b if nr 0 monitor set bytes read this nread nr return nr catch ioexception ioe monitor declare exception this ioe throw ioe
overrides code filter input stream
public long skip long n throws ioexception try ioexception induced exception monitor receive exception this if induced exception null throw induced exception long nr in skip n if nr 0 monitor set bytes read this nread nr return nr catch ioexception ioe monitor declare exception this ioe throw ioe
overrides code filter input stream
public void close throws ioexception try in close monitor declare closed this catch ioexception ioe monitor declare exception this ioe throw ioe
overrides code filter input stream
private boolean file contains string file f string s try file reader file reader null buffered reader br null file reader new file reader f br new buffered reader file reader string line br read line while line null if line index of s 0 return true line br read line catch ioexception e fail return false
return true if file contains the string
public string time stamp msg string message string new msg message try if my level log 1 my out log file my out out and file date now new date new msg now to string message catch exception e new msg message return new msg
pre pend a time stamp to all log and debug messages
public void out string message int level out level filter message level
begin the filtering before actually outputting the msg
public void repeat filter string message boolean same false if last message null last message equals message repeat count same true if repeat count repeat threshold if same if we are past the threshold but still repeating just return the count was already incremented return else otherwise reset the count and output the repeat msg int temp repeat count repeat count 0 out previous message repeated temp times then go on to handle the current different message last message message out message
handle repeated messages rather spam the output
private double get depicted size normalized int i return depicted size normalized i
the normalized size is not currently in use
private double get depicted size normalized int dim num return overlay depicted size dim num
the normalized size is not currently in use
public void apply delta int num quanta double value super get value double delta num quanta get effective delta quantum double new value math max get minimum math min get maximum get extent value delta super set value math abs new value value 0 5 value math floor new value 0 5
comments to be added
public double get round number bias return 0 5
comments to be added
public double get value return is discrete time series math floor super get value super get value
comments to be added
public boolean is discrete time series return get maximum 1 5
comments to be added
public void set value double new value super set value is discrete time series math floor new value 0 5 new value
comments to be added
public void state changed change event e swing utilities invoke later new runnable public void run update picture filter
invoked when the target of the listener has changed its state
public void state changed change event e set under mouse false if cross hair model get value is adjusting if pane is hidden graphics2 d g2 d pane get graphics2 d paint adjusting g2 d true g2 d dispose else pane repaint
invoked when the target of the listener has changed its state
public void mouse clicked mouse event e try mouse moved e if e get click count 1 cross hair model set value corresponding value pane map from display e get point null set under mouse true catch uncalibrated sizing exception ex
invoked when the mouse has been clicked on a component
public void mouse pressed mouse event e try mouse moved e if e get modifiers mouse event button1 mask 0 under mouse being dragged true cross hair model set value is adjusting true drag offset cross hair model get value corresponding value pane map from display e get point null paint on pane pane set cursor cursor get predefined cursor cursor hand cursor catch uncalibrated sizing exception ex
invoked when a mouse button has been pressed on a component
public void mouse released mouse event e if being dragged e get modifiers mouse event button1 mask 0 cross hair model set value is adjusting false mouse dragged e being dragged false pane set cursor cursor get predefined cursor cursor default cursor mouse moved e
invoked when a mouse button has been released on a component
public void mouse entered mouse event e mouse moved e
invoked when the mouse enters a component
public void mouse exited mouse event e set under mouse false
invoked when the mouse exits a component
public void mouse dragged mouse event e try mouse moved e if being dragged e get modifiers mouse event button1 mask 0 cross hair model set value drag offset corresponding value pane map from display e get point null catch uncalibrated sizing exception ex
invoked when a mouse button is pressed on a component and then
public void mouse moved mouse event e try set under mouse this is adjacent to e get point catch uncalibrated sizing exception ex
invoked when the mouse button has been moved on a component
public void state changed change event e request data refresh
invoked when the target of the listener has changed its state
public void anchor coterminal object object x coterminal objects add x
this method ensures that any object passed to it will survive as long
public void remove layout component component comp image grid constraints igc image grid constraints constraint map get comp if igc null position set remove new dimension igc gridx igc gridy constraint map remove comp
removes the specified component from the layout
public dimension preferred layout size container target image grid layout axis x axis new image grid layout axis direction2 d x image grid layout axis y axis new image grid layout axis direction2 d y double scale math max x axis get raw scale x axis preferred length y axis get raw scale y axis preferred length dimension inside size new dimension x axis length requirement scale y axis length requirement scale system out println ig pref x inside size get width pref y inside size get height return util add insets inside size target
calculates the preferred size dimensions for the specified
public void invalidate layout container target system out println ig invalidate memo minimum size clear memo preferred size clear
invalidates the layout indicating that if the layout manager
public void dispose replace current voxel cache null
note the caller should terminate the data service before invoking
public double get single voxel int idx throws data file exception int m0 idx 0 image origin 0 int m1 idx 1 image origin 1 int m2 idx 2 image origin 2 return get data point m0 m1 m2
the data points are measured from an origin at
public string get image path bogus temporary implementation return analyze file format map to image name header path
if this header came from a file
public xmlvalidation error get selected error if selected index 0 return error list selected index ve return null
return the selected error item