signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class DeltaEvictor { /** * Creates a { @ code DeltaEvictor } from the given threshold and { @ code DeltaFunction } . * Eviction is done before the window function . * @ param threshold The threshold * @ param deltaFunction The { @ code DeltaFunction } */ public static < T , W extends Window > DeltaEvictor ...
return new DeltaEvictor < > ( threshold , deltaFunction ) ;
public class DistributedLogSession { /** * Returns the current primary term . * @ return the current primary term */ private CompletableFuture < PrimaryTerm > term ( ) { } }
CompletableFuture < PrimaryTerm > future = new CompletableFuture < > ( ) ; threadContext . execute ( ( ) -> { if ( term != null ) { future . complete ( term ) ; } else { primaryElection . getTerm ( ) . whenCompleteAsync ( ( term , error ) -> { if ( term != null ) { this . term = term ; future . complete ( term ) ; } el...
public class IPOImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setOvlyOrent ( Integer newOvlyOrent ) { } }
Integer oldOvlyOrent = ovlyOrent ; ovlyOrent = newOvlyOrent ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . IPO__OVLY_ORENT , oldOvlyOrent , ovlyOrent ) ) ;
public class ClusterState { /** * Returns a list of passive members . * @ param comparator A comparator with which to sort the members list . * @ return The sorted members list . */ List < MemberState > getPassiveMemberStates ( Comparator < MemberState > comparator ) { } }
List < MemberState > passiveMembers = new ArrayList < > ( getPassiveMemberStates ( ) ) ; Collections . sort ( passiveMembers , comparator ) ; return passiveMembers ;
public class WorkDuration { /** * Return the duration using the following format DDHHMM , where DD is the number of days , HH is the number of months , and MM the number of minutes . * For instance , 3 days and 4 hours will return 030400 ( if hoursIndDay is 8 ) . */ public long toLong ( ) { } }
int workingDays = days ; int workingHours = hours ; if ( hours >= hoursInDay ) { int nbAdditionalDays = hours / hoursInDay ; workingDays += nbAdditionalDays ; workingHours = hours - ( nbAdditionalDays * hoursInDay ) ; } return 1L * workingDays * DAY_POSITION_IN_LONG + workingHours * HOUR_POSITION_IN_LONG + minutes * MI...
public class ISPNCacheableLockManagerImpl { /** * { @ inheritDoc } */ @ Override protected synchronized void internalLock ( String sessionId , String nodeIdentifier ) throws LockException { } }
CacheableSessionLockManager session = sessionLockManagers . get ( sessionId ) ; if ( session != null && session . containsPendingLock ( nodeIdentifier ) ) { LockData lockData = session . getPendingLock ( nodeIdentifier ) ; // this will return null if success . And old data if something exists . . . LockData oldLockData...
public class Long { /** * Returns the { @ code long } value of the system property with * the specified name . The first argument is treated as the name * of a system property . System properties are accessible through * the { @ link java . lang . System # getProperty ( java . lang . String ) } * method . The s...
String v = null ; try { v = System . getProperty ( nm ) ; } catch ( IllegalArgumentException | NullPointerException e ) { } if ( v != null ) { try { return Long . decode ( v ) ; } catch ( NumberFormatException e ) { } } return val ;
public class CloseableIterables { /** * Creates a { @ link CloseableIterable } from a standard { @ link Iterable } . If { @ code iterable } is already * a { @ link CloseableIterable } it will simply be returned as is . */ public static < T > CloseableIterable < T > fromIterable ( Iterable < T > iterable ) { } }
requireNonNull ( iterable ) ; if ( iterable instanceof CloseableIterable ) return ( CloseableIterable < T > ) iterable ; return new FluentCloseableIterable < T > ( ) { @ Override protected void doClose ( ) { if ( iterable instanceof AutoCloseable ) { try { ( ( AutoCloseable ) iterable ) . close ( ) ; } catch ( RuntimeE...
public class WorkflowEngineOperationsProcessor { /** * Handle the state changes for the rule engine * @ param changes */ private void processStateChanges ( final Map < String , String > changes ) { } }
workflowEngine . event ( WorkflowSystemEventType . WillProcessStateChange , String . format ( "saw state changes: %s" , changes ) , changes ) ; workflowEngine . getState ( ) . updateState ( changes ) ; boolean update = Rules . update ( workflowEngine . getRuleEngine ( ) , workflowEngine . getState ( ) ) ; workflowEngin...
public class ModuleApiKeys { /** * Create a new delivery api key . * @ param spaceId the id of the space this is valid on . * @ param key the key to be created . * @ return the just created key , containing the delivery token . * @ throws IllegalArgumentException if spaceId is null . * @ throws IllegalArgumen...
assertNotNull ( spaceId , "spaceId" ) ; assertNotNull ( key , "key" ) ; return service . create ( spaceId , key ) . blockingFirst ( ) ;
public class PrcGoodsLossLineSave { /** * < p > Process entity request . < / p > * @ param pAddParam additional param , e . g . return this line ' s * document in " nextEntity " for farther process * @ param pRequestData Request Data * @ param pEntity Entity to process * @ return Entity processed for farther ...
if ( pEntity . getIsNew ( ) ) { if ( pEntity . getItsQuantity ( ) . doubleValue ( ) <= 0 && pEntity . getReversedId ( ) == null ) { throw new ExceptionWithCode ( ExceptionWithCode . WRONG_PARAMETER , "quantity_less_or_equal_zero::" + pAddParam . get ( "user" ) ) ; } // Beige - Orm refresh : pEntity . setInvItem ( getSr...
public class Choice8 { /** * Static factory method for wrapping a value of type < code > D < / code > in a { @ link Choice8 } . * @ param d the value * @ param < A > the first possible type * @ param < B > the second possible type * @ param < C > the third possible type * @ param < D > the fourth possible typ...
return new _D < > ( d ) ;
public class CachedInfo { /** * Get the ending time of this service . */ public Date getEndDate ( ) { } }
if ( ( m_startTime != null ) && ( m_endTime != null ) ) { if ( m_endTime . before ( m_startTime ) ) return m_startTime ; } return m_endTime ;
public class CmsJspImageBean { /** * Creates a ratio scaled version of the current image . < p > * @ param ratioStr the rato variation to generate , for example " 4-3 " or " 1-1 " . < p > * @ return a ratio scaled version of the current image */ public CmsJspImageBean createRatioVariation ( String ratioStr ) { } }
CmsJspImageBean result = null ; try { int i = ratioStr . indexOf ( '-' ) ; if ( i > 0 ) { ratioStr = ratioStr . replace ( ',' , '.' ) ; double ratioW = Double . valueOf ( ratioStr . substring ( 0 , i ) ) . doubleValue ( ) ; double ratioH = Double . valueOf ( ratioStr . substring ( i + 1 ) ) . doubleValue ( ) ; int targ...
public class AbstractAmazonSNSAsync { /** * Simplified method form for invoking the SetSubscriptionAttributes operation with an AsyncHandler . * @ see # setSubscriptionAttributesAsync ( SetSubscriptionAttributesRequest , com . amazonaws . handlers . AsyncHandler ) */ @ Override public java . util . concurrent . Futur...
return setSubscriptionAttributesAsync ( new SetSubscriptionAttributesRequest ( ) . withSubscriptionArn ( subscriptionArn ) . withAttributeName ( attributeName ) . withAttributeValue ( attributeValue ) , asyncHandler ) ;
public class ExceptionUtils { /** * Create an install exception from a repository exception and feature names * @ param e * @ param featureNames * @ param installingAsset * @ param proxy * @ param defaultRepo * @ return */ static InstallException create ( RepositoryException e , Collection < String > featur...
Throwable cause = e ; Throwable rootCause = e ; // Check the list of causes of the exception for connection issues while ( ( rootCause = cause . getCause ( ) ) != null && cause != rootCause ) { if ( rootCause instanceof UnknownHostException || rootCause instanceof FileNotFoundException || rootCause instanceof ConnectEx...
public class Credentials { /** * The resulting string is base64 encoded ( YWxhZGRpbjpvcGVuc2VzYW1l ) . * @ return encoded string */ public String encode ( ) { } }
byte [ ] credentialsBytes = combine ( ) . getBytes ( UTF_8 ) ; return Base64 . getEncoder ( ) . encodeToString ( credentialsBytes ) ;
public class FessMessages { /** * Add the created action message for the key ' constraints . Min . message ' with parameters . * < pre > * message : { item } must be greater than or equal to { value } . * < / pre > * @ param property The property name for the message . ( NotNull ) * @ param value The paramete...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( CONSTRAINTS_Min_MESSAGE , value ) ) ; return this ;
public class RelationalOperationsMatrix { /** * the geometry and / or a boundary index of the geometry . */ private static void markClusterEndPoints_ ( int geometry , TopoGraph topoGraph , int clusterIndex ) { } }
int id = topoGraph . getGeometryID ( geometry ) ; for ( int cluster = topoGraph . getFirstCluster ( ) ; cluster != - 1 ; cluster = topoGraph . getNextCluster ( cluster ) ) { int cluster_parentage = topoGraph . getClusterParentage ( cluster ) ; if ( ( cluster_parentage & id ) == 0 ) continue ; int first_half_edge = topo...
public class RTMPHandler { /** * Create and send SO message stating that a SO could not be created . * @ param conn * @ param message * Shared object message that incurred the failure */ private void sendSOCreationFailed ( RTMPConnection conn , SharedObjectMessage message ) { } }
log . debug ( "sendSOCreationFailed - message: {} conn: {}" , message , conn ) ; // reset the object so we can re - use it message . reset ( ) ; // add the error event message . addEvent ( new SharedObjectEvent ( ISharedObjectEvent . Type . CLIENT_STATUS , "error" , SO_CREATION_FAILED ) ) ; if ( conn . isChannelUsed ( ...
public class HBaseMenuScreen { /** * Code to display a Menu . * @ param out The html out stream . * @ param iHtmlAttributes The HTML attributes . * @ return true If fields have been found . * @ exception DBException File exception . */ public boolean printData ( PrintWriter out , int iHtmlAttributes ) { } }
boolean bFieldsFound = false ; Record recMenu = ( ( BaseMenuScreen ) this . getScreenField ( ) ) . getMainRecord ( ) ; String strCellFormat = this . getHtmlString ( recMenu ) ; XMLParser parser = ( ( BaseMenuScreen ) this . getScreenField ( ) ) . getXMLParser ( recMenu ) ; parser . parseHtmlData ( out , strCellFormat )...
public class ByteArrayUtil { /** * Write a double to the byte array at the given offset . * @ param array Array to write to * @ param offset Offset to write to * @ param v data * @ return number of bytes written */ public static int writeDouble ( byte [ ] array , int offset , double v ) { } }
return writeLong ( array , offset , Double . doubleToLongBits ( v ) ) ;
public class StartRserve { /** * R batch to check Rserve is installed * @ param Rcmd command necessary to start R * @ return Rserve is already installed */ public static boolean isRserveInstalled ( String Rcmd ) { } }
Process p = doInR ( "is.element(set=installed.packages(lib.loc='" + RserveDaemon . app_dir ( ) + "'),el='Rserve')" , Rcmd , "--vanilla --silent" , false ) ; if ( p == null ) { Log . Err . println ( "Failed to ask if Rserve is installed" ) ; return false ; } try { StringBuffer result = new StringBuffer ( ) ; // we need ...
public class ConfigUtils { /** * reset cookieName to default value if it is not valid * @ param cookieName * @ param quiet * don ' t emit any error messages * @ return original name or default if original was invalid */ public String validateCookieName ( String cookieName , boolean quiet ) { } }
if ( cookieName == null || cookieName . length ( ) == 0 ) { if ( ! quiet ) { Tr . error ( tc , "COOKIE_NAME_CANT_BE_EMPTY" ) ; } return CFG_DEFAULT_COOKIENAME ; } String cookieNameUc = cookieName . toUpperCase ( ) ; boolean valid = true ; for ( int i = 0 ; i < cookieName . length ( ) ; i ++ ) { String eval = cookieName...
public class Logger { /** * Log . */ public void trace ( String message , Throwable t ) { } }
if ( getLevel ( ) > Level . TRACE . ordinal ( ) ) return ; logMessage ( Level . TRACE , message , t ) ;
public class appqoeaction { /** * Use this API to update appqoeaction . */ public static base_response update ( nitro_service client , appqoeaction resource ) throws Exception { } }
appqoeaction updateresource = new appqoeaction ( ) ; updateresource . name = resource . name ; updateresource . priority = resource . priority ; updateresource . altcontentsvcname = resource . altcontentsvcname ; updateresource . altcontentpath = resource . altcontentpath ; updateresource . polqdepth = resource . polqd...
public class BooleanCondition { /** * { @ inheritDoc } */ public Set < String > postProcessingFields ( ) { } }
Set < String > fields = new LinkedHashSet < > ( ) ; must . forEach ( condition -> fields . addAll ( condition . postProcessingFields ( ) ) ) ; should . forEach ( condition -> fields . addAll ( condition . postProcessingFields ( ) ) ) ; return fields ;
public class SPSMMappingFilter { /** * Increments by 1 the Integer of the given list of integers at the index position . * @ param array array list of integers . * @ param index index of the element to be incremented . */ private void inc ( ArrayList < Integer > array , int index ) { } }
array . set ( index , array . get ( index ) + 1 ) ;
public class TimeMetaData { /** * Is the given object valid for this column , * given the column type and any * restrictions given by the * ColumnMetaData object ? * @ param input object to check * @ return true if value , false if invalid */ @ Override public boolean isValid ( Object input ) { } }
long epochMillisec ; try { epochMillisec = Long . parseLong ( input . toString ( ) ) ; } catch ( NumberFormatException e ) { return false ; } if ( minValidTime != null && epochMillisec < minValidTime ) return false ; return ! ( maxValidTime != null && epochMillisec > maxValidTime ) ;
public class DateField { /** * Converts a millisecond time to a string suitable for indexing . * Supported date range is : 30 BC - 3189 * @ throws IllegalArgumentException if the given < code > time < / code > is not * within the supported date range . */ public static String timeToString ( long time ) { } }
time += DATE_SHIFT ; if ( time < 0 ) { throw new IllegalArgumentException ( "time too early" ) ; } String s = Long . toString ( time , Character . MAX_RADIX ) ; if ( s . length ( ) > DATE_LEN ) { throw new IllegalArgumentException ( "time too late" ) ; } // Pad with leading zeros if ( s . length ( ) < DATE_LEN ) { Stri...
public class ODatabaseRecordAbstract { /** * Deletes the record without checking the version . */ public ODatabaseRecord delete ( final ORID iRecord ) { } }
executeDeleteRecord ( iRecord , - 1 , true , true , OPERATION_MODE . SYNCHRONOUS ) ; return this ;
public class MergedParameterization { /** * Rewind the configuration to the initial situation */ public void rewind ( ) { } }
synchronized ( used ) { for ( ParameterPair pair : used ) { current . addParameter ( pair ) ; } used . clear ( ) ; }
public class BuilderSyncSetup { /** * Method unlocks the write lock and notifies the change to the internal data holder . * In case the thread is externally interrupted , no InterruptedException is thrown but instead the interrupted flag is set for the corresponding thread . * Please use the service method Thread ....
logger . debug ( "order write unlock" ) ; writeLockTimeout . cancel ( ) ; writeLock . unlock ( ) ; writeLockConsumer = "Unknown" ; logger . debug ( "write unlocked" ) ; if ( notifyChange ) { try { try { holder . notifyChange ( ) ; } catch ( InterruptedException ex ) { Thread . currentThread ( ) . interrupt ( ) ; } } ca...
public class MatrixFunctions { /** * Element - wise power function . Replaces each element with its * power of < tt > d < / tt > . Note that this is an in - place operation . * @ param d the exponent * @ see MatrixFunctions # pow ( DoubleMatrix , double ) * @ return this matrix */ public static DoubleMatrix pow...
if ( d == 2.0 ) return x . muli ( x ) ; else { for ( int i = 0 ; i < x . length ; i ++ ) x . put ( i , ( double ) Math . pow ( x . get ( i ) , d ) ) ; return x ; }
public class Converter { /** * Converts the value parameter to a Date . If the value is null or invalid , it returns null . If the value is a String , * it has to have one of the following syntax : * < ul > * < li > yyyy - MM - dd < / li > * < li > yyyy - MM - dd ' T ' HH : mmZ < / li > * < li > yyyy - MM - d...
Date result = null ; try { if ( value instanceof String ) { String date = ( ( String ) value ) . toUpperCase ( ) ; for ( Matcher matcher : mapMatcherDateFormat . keySet ( ) ) { if ( matcher . reset ( date ) . matches ( ) ) { SimpleDateFormat sdf = mapMatcherDateFormat . get ( matcher ) ; if ( sdf != null ) { if ( date ...
public class MessagingUtils { /** * Removes unnecessary slashes and transforms the others into dots . * @ param instancePath an instance path * @ return a non - null string */ public static String escapeInstancePath ( String instancePath ) { } }
String result ; if ( Utils . isEmptyOrWhitespaces ( instancePath ) ) result = "" ; else result = instancePath . replaceFirst ( "^/*" , "" ) . replaceFirst ( "/*$" , "" ) . replaceAll ( "/+" , "." ) ; return result ;
public class SSLWriteServiceContext { /** * Reuse the buffers used to send data out to the network . If existing buffer * is available , grow the array by one . * @ throws IOException - if allocation failed */ protected void increaseEncryptedBuffer ( ) throws IOException { } }
final int packetSize = getConnLink ( ) . getPacketBufferSize ( ) ; if ( null == this . encryptedAppBuffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Allocating encryptedAppBuffer, size=" + packetSize ) ; } this . encryptedAppBuffer = SSLUtils . allocateByteBuffer...
public class UnicodeSet { /** * for internal use , after checkFrozen has been called */ private UnicodeSet add_unchecked ( int start , int end ) { } }
if ( start < MIN_VALUE || start > MAX_VALUE ) { throw new IllegalArgumentException ( "Invalid code point U+" + Utility . hex ( start , 6 ) ) ; } if ( end < MIN_VALUE || end > MAX_VALUE ) { throw new IllegalArgumentException ( "Invalid code point U+" + Utility . hex ( end , 6 ) ) ; } if ( start < end ) { add ( range ( s...
public class AbstractXbaseSemanticSequencer { /** * Contexts : * XExpression returns XWhileExpression * XAssignment returns XWhileExpression * XAssignment . XBinaryOperation _ 1_1_0_0_0 returns XWhileExpression * XOrExpression returns XWhileExpression * XOrExpression . XBinaryOperation _ 1_0_0_0 returns XWhil...
if ( errorAcceptor != null ) { if ( transientValues . isValueTransient ( semanticObject , XbasePackage . Literals . XABSTRACT_WHILE_EXPRESSION__PREDICATE ) == ValueTransient . YES ) errorAcceptor . accept ( diagnosticProvider . createFeatureValueMissing ( semanticObject , XbasePackage . Literals . XABSTRACT_WHILE_EXPRE...
public class SystemProperties { /** * Set a system property value under consideration of an eventually present * { @ link SecurityManager } . * @ param sKey * The key of the system property . May not be < code > null < / code > . * @ param sValue * The value of the system property . If the value is < code > n...
boolean bChanged ; if ( sValue == null ) { // Was something removed ? bChanged = removePropertyValue ( sKey ) != null ; } else { final String sOld = IPrivilegedAction . systemSetProperty ( sKey , sValue ) . invokeSafe ( ) ; bChanged = sOld != null && ! sValue . equals ( sOld ) ; if ( LOGGER . isDebugEnabled ( ) && bCha...
public class ResourceAssignment { /** * Generates timephased costs from timephased work where multiple cost rates * apply to the assignment . * @ param standardWorkList timephased work * @ param overtimeWorkList timephased work * @ return timephased cost */ private List < TimephasedCost > getTimephasedCostMulti...
List < TimephasedWork > standardWorkResult = new LinkedList < TimephasedWork > ( ) ; List < TimephasedWork > overtimeWorkResult = new LinkedList < TimephasedWork > ( ) ; CostRateTable table = getCostRateTable ( ) ; ProjectCalendar calendar = getCalendar ( ) ; Iterator < TimephasedWork > iter = overtimeWorkList . iterat...
public class RtedAlgorithm { /** * Computes an array where preorder / rev . preorder of a subforest of given * subtree is stored and can be accessed for given i and j . * @ param it * @ param subtreePreorder * @ param subtreeRevPreorder * @ param subtreeSize * @ param aStrategy * @ param treeSize */ priva...
int change ; int [ ] post2pre = it . info [ POST2_PRE ] ; int [ ] rpost2post = it . info [ RPOST2_POST ] ; if ( aStrategy == LEFT ) { for ( int x = 0 ; x < subtreeSize ; x ++ ) { ij [ 0 ] [ x ] = x + subtreePreorder ; } for ( int x = 1 ; x < subtreeSize ; x ++ ) { change = post2pre [ ( treeSize - 1 - ( x - 1 + subtreeR...
public class ObjectEditorTable { /** * Change the value of the specified row . */ public void updateDatum ( Object element , int row ) { } }
_data . set ( row , element ) ; _model . fireTableRowsUpdated ( row , row ) ;
public class SdkComponentInstaller { /** * Install a component . * @ param component component to install * @ param progressListener listener to action progress feedback * @ param consoleListener listener to process console feedback */ public void installComponent ( SdkComponent component , ProgressListener progr...
progressListener . start ( "Installing " + component . toString ( ) , ProgressListener . UNKNOWN ) ; Map < String , String > environment = null ; if ( pythonCopier != null ) { environment = pythonCopier . copyPython ( ) ; } Path workingDirectory = gcloudPath . getRoot ( ) ; List < String > command = Arrays . asList ( g...
public class DrawableUtils { /** * Enlarge value from startValue to endValue * @ param startValue start size * @ param endValue end size * @ param time time of animation * @ return new size value */ public static float enlarge ( float startValue , float endValue , float time ) { } }
if ( startValue > endValue ) throw new IllegalArgumentException ( "Start size can't be larger than end size." ) ; return startValue + ( endValue - startValue ) * time ;
public class GenericMessageImpl { /** * Marshall a message . * @ return WsByteBuffer [ ] * @ throws MessageSentException */ public WsByteBuffer [ ] marshallMessage ( ) throws MessageSentException { } }
final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; if ( bTrace && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "marshallMessage" ) ; } preMarshallMessage ( ) ; WsByteBuffer [ ] marshalledObj = hasFirstLineChanged ( ) ? marshallLine ( ) : null ; headerComplianceCheck ( ) ; marshalledObj = marshallHeaders...
public class CmsWidgetDialog { /** * Returns the html for a button to add an optional element . < p > * @ param elementName name of the element * @ param insertAfter the index of the element after which the new element should be created * @ param enabled if true , the button to add an element is shown , otherwise...
if ( enabled ) { StringBuffer href = new StringBuffer ( 4 ) ; href . append ( "javascript:addElement('" ) ; href . append ( elementName ) ; href . append ( "', " ) ; href . append ( insertAfter ) ; href . append ( ");" ) ; return button ( href . toString ( ) , null , "new.png" , Messages . GUI_DIALOG_BUTTON_ADDNEW_0 , ...
public class UIUtils { /** * helper method to set the background depending on the android version * @ param v * @ param d */ @ SuppressLint ( "NewApi" ) public static void setBackground ( View v , Drawable d ) { } }
if ( Build . VERSION . SDK_INT < Build . VERSION_CODES . JELLY_BEAN ) { v . setBackgroundDrawable ( d ) ; } else { v . setBackground ( d ) ; }
public class UICommands { /** * A name of the form " foo - bar - whatnot " is turned into " Foo : Bar Whatnot " */ public static String unshellifyName ( String name ) { } }
if ( Strings . isNotBlank ( name ) ) { if ( name . indexOf ( '-' ) >= 0 && name . toLowerCase ( ) . equals ( name ) ) { String [ ] split = name . split ( "-" ) ; StringBuffer buffer = new StringBuffer ( ) ; int idx = 0 ; for ( String part : split ) { if ( idx == 1 ) { buffer . append ( ": " ) ; } else if ( idx > 1 ) { ...
public class CollationRuleParser { /** * Sets str to a contraction of U + FFFE and ( U + 2800 + Position ) . * @ return rule index after the special reset position * @ throws ParseException */ private int parseSpecialPosition ( int i , StringBuilder str ) throws ParseException { } }
int j = readWords ( i + 1 , rawBuilder ) ; if ( j > i && rules . charAt ( j ) == 0x5d && rawBuilder . length ( ) != 0 ) { // words end with ] ++ j ; String raw = rawBuilder . toString ( ) ; str . setLength ( 0 ) ; for ( int pos = 0 ; pos < positions . length ; ++ pos ) { if ( raw . equals ( positions [ pos ] ) ) { str ...
public class GetDevEndpointsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetDevEndpointsRequest getDevEndpointsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getDevEndpointsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getDevEndpointsRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ; protocolMarshaller . marshall ( getDevEndpointsRequest . getNextToken ( ) , NEXTTOKEN_BINDING ...
public class FuncSum { /** * Execute the function . The function must return * a valid object . * @ param xctxt The current execution context . * @ return A valid XObject . * @ throws javax . xml . transform . TransformerException */ public XObject execute ( XPathContext xctxt ) throws javax . xml . transform ....
DTMIterator nodes = m_arg0 . asIterator ( xctxt , xctxt . getCurrentNode ( ) ) ; double sum = 0.0 ; int pos ; while ( DTM . NULL != ( pos = nodes . nextNode ( ) ) ) { DTM dtm = nodes . getDTM ( pos ) ; XMLString s = dtm . getStringValue ( pos ) ; if ( null != s ) sum += s . toDouble ( ) ; } nodes . detach ( ) ; return ...
public class Reflect { /** * Create reflect . * @ param types the types * @ param args the args * @ return the reflect * @ throws ReflectionException the reflection exception */ public Reflect create ( Class [ ] types , Object ... args ) throws ReflectionException { } }
try { return on ( clazz . getConstructor ( types ) , accessAll , args ) ; } catch ( NoSuchMethodException e ) { for ( Constructor constructor : getConstructors ( ) ) { if ( ReflectionUtils . typesMatch ( constructor . getParameterTypes ( ) , types ) ) { return on ( constructor , accessAll , args ) ; } } throw new Refle...
public class Request { /** * Creates a new Request configured to delete a resource through the Graph API . * @ param session * the Session to use , or null ; if non - null , the session must be in an opened state * @ param id * the id of the object to delete * @ param callback * a callback that will be call...
return new Request ( session , id , null , HttpMethod . DELETE , callback ) ;
public class Triangle { /** * determinates if this triangle contains the point p . * @ param p the query point * @ return true iff p is not null and is inside this triangle ( Note : on boundary is considered inside ! ! ) . */ public boolean contains ( Vector3 p ) { } }
boolean ans = false ; if ( this . halfplane || p == null ) return false ; if ( isCorner ( p ) ) { return true ; } PointLinePosition a12 = PointLineTest . pointLineTest ( a , b , p ) ; PointLinePosition a23 = PointLineTest . pointLineTest ( b , c , p ) ; PointLinePosition a31 = PointLineTest . pointLineTest ( c , a , p ...
public class ProxyReceiveListener { /** * This method will process a message that has been received by the listener . Essentially , we * must get the session ID - this tells us which proxy queue to put the message on and then put * the message there . For async messages we must also get the flags and pass them to t...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "processMessage" , new Object [ ] { buffer , asyncMessage , enableReadAhead , conversation , chunk } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) buffer . dump ( this , tc , CommsByte...
public class LogImpl { /** * / * ( non - Javadoc ) * @ see org . apache . commons . logging . Log # error ( java . lang . Object , java . lang . Throwable ) */ public void error ( Object arg0 , Throwable arg1 ) { } }
message ( ERROR , new Object [ ] { arg0 , arg1 } , new Frame ( 1 ) ) ;
public class PercentNumberFormatTextValue { /** * Checks the given value if it is between 0 to 100 quietly . If not a default value from 50 will * be set . * @ param name * the name * @ param value * the value * @ return the integer */ private static Integer checkQuietly ( final String name , final Integer ...
Integer val = 50 ; try { val = Args . withinRange ( 0 , 100 , value , name ) ; } catch ( final IllegalArgumentException e ) { LOGGER . error ( String . format ( "Given argument '%s' must have a value within [%s,%s], but was %s. Default value 50% will be set." , name , 0 , 100 , value ) ) ; } return val ;
public class DynamicSettingsActivity { /** * Dynamically adds a new navigation preference to the activity . */ private void addNavigationPreference ( ) { } }
NavigationPreference navigationPreference = new NavigationPreference ( this ) ; navigationPreference . setTitle ( getPreferenceHeaderTitle ( ) ) ; navigationPreference . setFragment ( NewPreferenceHeaderFragment . class . getName ( ) ) ; getNavigationFragment ( ) . getPreferenceScreen ( ) . addPreference ( navigationPr...
public class InvertibleCryptographer { /** * alphabet */ protected char [ ] encodeHex ( byte [ ] data ) { } }
final int len = data . length ; final char [ ] out = new char [ len << 1 ] ; for ( int i = 0 , j = 0 ; i < len ; i ++ ) { out [ j ++ ] = DIGITS_LOWER [ ( 0xF0 & data [ i ] ) >>> 4 ] ; out [ j ++ ] = DIGITS_LOWER [ 0x0F & data [ i ] ] ; } return out ;
public class PutMetricFilterRequest { /** * A collection of information that defines how metric data gets emitted . * @ param metricTransformations * A collection of information that defines how metric data gets emitted . */ public void setMetricTransformations ( java . util . Collection < MetricTransformation > me...
if ( metricTransformations == null ) { this . metricTransformations = null ; return ; } this . metricTransformations = new com . amazonaws . internal . SdkInternalList < MetricTransformation > ( metricTransformations ) ;
public class StringUtil { /** * Normalize a SQL identifer , up - casing if < regular identifer > , * and handling of < delimited identifer > ( SQL 2003 , section 5.2 ) . * The normal form is used internally in Derby . * @ param id syntacically correct SQL identifier */ public static String normalizeSQLIdentifier ...
if ( id . length ( ) == 0 ) { return id ; } if ( id . charAt ( 0 ) == '"' && id . length ( ) >= 3 && id . charAt ( id . length ( ) - 1 ) == '"' ) { // assume syntax is OK , thats is , any quotes inside are doubled : return StringUtil . compressQuotes ( id . substring ( 1 , id . length ( ) - 1 ) , "\"\"" ) ; } else { re...
public class PutMetricDataRequest { /** * The data for the metric . The array can include no more than 20 metrics per call . * @ param metricData * The data for the metric . The array can include no more than 20 metrics per call . */ public void setMetricData ( java . util . Collection < MetricDatum > metricData ) ...
if ( metricData == null ) { this . metricData = null ; return ; } this . metricData = new com . amazonaws . internal . SdkInternalList < MetricDatum > ( metricData ) ;
public class AnnotationUtil { /** * Attempts to get a key from < code > domainObject < / code > by looking for a * { @ literal @ RiakKey } annotated member . If non - present it simply returns * < code > defaultKey < / code > * @ param < T > the type of < code > domainObject < / code > * @ param domainObject th...
BinaryValue key = getKey ( domainObject ) ; if ( key == null ) { key = defaultKey ; } return key ;
public class VpnSitesConfigurationsInner { /** * Gives the sas - url to download the configurations for vpn - sites in a resource group . * @ param resourceGroupName The resource group name . * @ param virtualWANName The name of the VirtualWAN for which configuration of all vpn - sites is needed . * @ param reque...
beginDownloadWithServiceResponseAsync ( resourceGroupName , virtualWANName , request ) . toBlocking ( ) . single ( ) . body ( ) ;
public class ExcelModuleDemoToDoItemBulkUpdateManager { /** * region > toDoItems ( derived collection ) */ @ SuppressWarnings ( "unchecked" ) @ Collection public List < ExcelModuleDemoToDoItem > getToDoItems ( ) { } }
return container . allMatches ( ExcelModuleDemoToDoItem . class , Predicates . and ( ExcelModuleDemoToDoItem . Predicates . thoseOwnedBy ( currentUserName ( ) ) , ExcelModuleDemoToDoItem . Predicates . thoseCompleted ( isComplete ( ) ) , ExcelModuleDemoToDoItem . Predicates . thoseCategorised ( getCategory ( ) , getSub...
public class Introspector { /** * < p > getGetter . < / p > * @ param name a { @ link java . lang . String } object . * @ return a { @ link java . lang . reflect . Method } object . */ public Method getGetter ( String name ) { } }
for ( PropertyDescriptor descriptor : getPropertyDescriptors ( target ) ) { Method getter = descriptor . getReadMethod ( ) ; if ( getter == null ) continue ; if ( compare ( descriptor . getName ( ) , name ) ) return getter ; } return null ;
public class tmsessionpolicy_binding { /** * Use this API to fetch tmsessionpolicy _ binding resource of given name . */ public static tmsessionpolicy_binding get ( nitro_service service , String name ) throws Exception { } }
tmsessionpolicy_binding obj = new tmsessionpolicy_binding ( ) ; obj . set_name ( name ) ; tmsessionpolicy_binding response = ( tmsessionpolicy_binding ) obj . get_resource ( service ) ; return response ;
public class JavacParser { /** * Block = " { " BlockStatements " } " */ JCBlock block ( int pos , long flags ) { } }
accept ( LBRACE ) ; List < JCStatement > stats = blockStatements ( ) ; JCBlock t = F . at ( pos ) . Block ( flags , stats ) ; while ( token . kind == CASE || token . kind == DEFAULT ) { syntaxError ( "orphaned" , token . kind ) ; switchBlockStatementGroups ( ) ; } // the Block node has a field " endpos " for first char...
public class FXMLShowCaseView { /** * { @ inheritDoc } */ @ Override protected void initView ( ) { } }
this . showEmbedded = new ToggleButton ( "Embedded" ) ; this . showStandalone = new ToggleButton ( "Standalone" ) ; this . showHybrid = new ToggleButton ( "Hybrid" ) ; this . showIncluded = new ToggleButton ( "Included" ) ; final ToggleGroup group = new PersistentButtonToggleGroup ( ) ; group . getToggles ( ) . addAll ...
public class UpdateFunctionConfigurationResult { /** * The function ' s < a href = " https : / / docs . aws . amazon . com / lambda / latest / dg / configuration - layers . html " > layers < / a > . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setLayers ( ...
if ( this . layers == null ) { setLayers ( new com . amazonaws . internal . SdkInternalList < Layer > ( layers . length ) ) ; } for ( Layer ele : layers ) { this . layers . add ( ele ) ; } return this ;
public class WebSiteRequest { /** * Determines if the request is for a BlackBerry browser */ public boolean isBlackBerry ( ) { } }
if ( ! isBlackBerryDone ) { String agent = req . getHeader ( "user-agent" ) ; isBlackBerry = agent != null && agent . startsWith ( "BlackBerry" ) ; isBlackBerryDone = true ; } return isBlackBerry ;
public class clusterinstance { /** * Use this API to disable clusterinstance resources of given names . */ public static base_responses disable ( nitro_service client , Long clid [ ] ) throws Exception { } }
base_responses result = null ; if ( clid != null && clid . length > 0 ) { clusterinstance disableresources [ ] = new clusterinstance [ clid . length ] ; for ( int i = 0 ; i < clid . length ; i ++ ) { disableresources [ i ] = new clusterinstance ( ) ; disableresources [ i ] . clid = clid [ i ] ; } result = perform_opera...
public class BaseClient { /** * Gets the active session data . * @ return Active session data . */ @ Override public Session getSession ( ) { } }
return state . get ( ) > GlobalState . INITIALISING ? new Session ( dataMgr . getSessionDAO ( ) . session ( ) ) : new Session ( ) ;
public class Canon { /** * Compute the canonical labels for the provided structure . The labelling * does not consider isomer information or stereochemistry . The current * implementation does not fully distinguish all structure topologies * but in practise performs well in the majority of cases . A complete * ...
return label ( container , g , basicInvariants ( container , g ) ) ;
public class Radial2Top { /** * < editor - fold defaultstate = " collapsed " desc = " Initialization " > */ @ Override public final AbstractGauge init ( final int WIDTH , final int HEIGHT ) { } }
final int GAUGE_WIDTH = isFrameVisible ( ) ? WIDTH : getGaugeBounds ( ) . width ; final int GAUGE_HEIGHT = isFrameVisible ( ) ? HEIGHT : getGaugeBounds ( ) . height ; if ( GAUGE_WIDTH <= 1 || GAUGE_HEIGHT <= 1 ) { return this ; } if ( ! isFrameVisible ( ) ) { setFramelessOffset ( - getGaugeBounds ( ) . width * 0.084112...
public class csvserver_responderpolicy_binding { /** * Use this API to fetch csvserver _ responderpolicy _ binding resources of given name . */ public static csvserver_responderpolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { } }
csvserver_responderpolicy_binding obj = new csvserver_responderpolicy_binding ( ) ; obj . set_name ( name ) ; csvserver_responderpolicy_binding response [ ] = ( csvserver_responderpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ;
public class HashtableOnDisk { /** * getNextRangeIndex The range index for walkHash ( ) . */ public int getNextRangeIndex ( ) { } }
int length = rangeIndexList . size ( ) ; if ( length > 0 ) { Integer rindex = rangeIndexList . get ( length - 1 ) ; return rindex . intValue ( ) ; } return 0 ;
public class CmsDetailNameCache { /** * Loads the complete URL name data into the cache . < p > */ private void reload ( ) { } }
CmsManyToOneMap < String , CmsUUID > newMap = new CmsManyToOneMap < String , CmsUUID > ( ) ; try { List < CmsUrlNameMappingEntry > mappings = m_cms . readUrlNameMappings ( CmsUrlNameMappingFilter . ALL ) ; LOG . info ( "Initializing detail name cache with " + mappings . size ( ) + " entries" ) ; for ( CmsUrlNameMapping...
public class ConfigFromObject { /** * Parses a string into duration type safe spec format if possible . * @ param path property path * @ param durationString duration string using " 10 seconds " , " 10 days " , etc . format from type safe . * @ return Duration parsed from typesafe config format . */ private Durat...
/* Check to see if any of the postfixes are at the end of the durationString . */ final Optional < Map . Entry < TimeUnit , List < String > > > entry = timeUnitMap . entrySet ( ) . stream ( ) . filter ( timeUnitListEntry -> /* Go through values in map and see if there are any matches . */ timeUnitListEntry . getValue (...
public class DRUMSParameterSet { /** * Initialises all Parameters . * @ throws FileNotFoundException */ private void initParameters ( ) throws FileNotFoundException { } }
InputStream fileStream ; if ( new File ( parameterfile ) . exists ( ) ) { logger . info ( "Try reading properties directly from {}." , parameterfile ) ; fileStream = new FileInputStream ( new File ( parameterfile ) ) ; } else { logger . info ( "Try reading properties from Resources" ) ; fileStream = this . getClass ( )...
public class SettingManager { /** * Generate a simple key for the given name . This method normalises the name by * converting to lower case and replacing spaces with ' . ' ( e . g . " Buffer Size " is * converted to " buffer . size " ) . * @ param name the name of a setting * @ return keyed setting name */ pri...
return WHITE_SPACE . matcher ( name ) . replaceAll ( "." ) . toLowerCase ( Locale . ENGLISH ) ;
public class Criteria { /** * Crates new { @ link Predicate } with leading and trailing wildcards for each entry < br / > * < strong > NOTE : < / strong > mind your schema as leading wildcards may not be supported and / or execution might be slow . * @ param values * @ return * @ throws InvalidDataAccessApiUsag...
assertValuesPresent ( ( Object [ ] ) values ) ; return contains ( Arrays . asList ( values ) ) ;
public class CFMLEngineFactory { /** * updates the engine when a update is available * @ return has updated * @ throws IOException * @ throws ServletException */ private boolean removeUpdate ( ) throws IOException , ServletException { } }
final File patchDir = getPatchDirectory ( ) ; final File [ ] patches = patchDir . listFiles ( new ExtensionFilter ( new String [ ] { "rc" , "rcs" } ) ) ; for ( int i = 0 ; i < patches . length ; i ++ ) if ( ! patches [ i ] . delete ( ) ) patches [ i ] . deleteOnExit ( ) ; _restart ( ) ; return true ;
public class HessianInput { /** * Reads a byte array from the stream . */ public int readBytes ( byte [ ] buffer , int offset , int length ) throws IOException { } }
int readLength = 0 ; if ( _chunkLength == END_OF_DATA ) { _chunkLength = 0 ; return - 1 ; } else if ( _chunkLength == 0 ) { int tag = read ( ) ; switch ( tag ) { case 'N' : return - 1 ; case 'B' : case 'b' : _isLastChunk = tag == 'B' ; _chunkLength = ( read ( ) << 8 ) + read ( ) ; break ; default : throw new IOExceptio...
public class EmailWithAttachments { /** * Adds an attachment to the EmailMessage . * @ param file * The file to add to the EmailMessage . * @ throws MessagingException * is thrown if the underlying implementation does not support modification of * existing values */ public void addAttachment ( final File file...
DataSource dataSource ; dataSource = new FileDataSource ( file ) ; final DataHandler dataHandler = new DataHandler ( dataSource ) ; addAttachment ( dataHandler , file . getName ( ) ) ;
public class AmazonLightsailClient { /** * Attaches a block storage disk to a running or stopped Lightsail instance and exposes it to the instance with the * specified disk name . * The < code > attach disk < / code > operation supports tag - based access control via resource tags applied to the * resource identi...
request = beforeClientExecution ( request ) ; return executeAttachDisk ( request ) ;
public class FastMathCalc { /** * Compute ( a [ 0 ] + a [ 1 ] ) * ( b [ 0 ] + b [ 1 ] ) in extended precision . * @ param a first term of the multiplication * @ param b second term of the multiplication * @ param result placeholder where to put the result */ private static void quadMult ( final double a [ ] , fin...
final double xs [ ] = new double [ 2 ] ; final double ys [ ] = new double [ 2 ] ; final double zs [ ] = new double [ 2 ] ; /* a [ 0 ] * b [ 0] */ split ( a [ 0 ] , xs ) ; split ( b [ 0 ] , ys ) ; splitMult ( xs , ys , zs ) ; result [ 0 ] = zs [ 0 ] ; result [ 1 ] = zs [ 1 ] ; /* a [ 0 ] * b [ 1] */ split ( b [ 1 ] , ys...
public class JSONSerializer { /** * Recursively serialize an Object ( or array , list , map or set of objects ) to JSON , skipping transient and final * fields . * @ param obj * The root object of the object graph to serialize . * @ param indentWidth * If indentWidth = = 0 , no prettyprinting indentation is p...
return serializeObject ( obj , indentWidth , onlySerializePublicFields , new ClassFieldCache ( /* resolveTypes = */ false , /* onlySerializePublicFields = */ false ) ) ;
public class TreeMap { /** * Returns the last ( highest ) key currently in this sorted map . * @ param transaction which controls visibilty of the Entry mapped by the key . * @ return the last ( highest ) key currently in this sorted map . * @ throws ObjectManagerException */ public synchronized Object lastKey ( ...
if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "lastKey" , new Object [ ] { transaction } ) ; Entry entry = lastEntry ( transaction ) ; Object returnKey = entry . getKey ( ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( th...
public class LibertyValidatorBean { /** * Override this method so that a LibertyValidatorBean is stored in the WELD * Bean Store keyed on its classname . This allows an injected Validator Bean to * be retrieved in both local and server failover scenarios as per defect 774504. */ @ Override public String getId ( ) {...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getId" ) ; if ( id == null ) { // Set id to the class name id = this . getClass ( ) . getName ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getId" , new Object [ ] { id } ...
public class Permission { /** * The permission that you want to give to the AWS user that is listed in Grantee . Valid values include : * < ul > * < li > * < code > READ < / code > : The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds * to the Amazon S3 bucket . * < / ...
if ( access == null ) { access = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return access ;
public class ns_clusternode { /** * < pre > * Use this operation to remove node from cluster in bulk . * < / pre > */ public static ns_clusternode [ ] remove_node ( nitro_service client , ns_clusternode [ ] resources ) throws Exception { } }
if ( resources == null ) throw new Exception ( "Null resource array" ) ; if ( resources . length == 1 ) return ( ( ns_clusternode [ ] ) resources [ 0 ] . perform_operation ( client , "remove_node" ) ) ; return ( ( ns_clusternode [ ] ) perform_operation_bulk_request ( client , resources , "remove_node" ) ) ;
public class MyProxy { /** * Generates a hex X509 _ NAME hash ( like openssl x509 - hash - in cert . pem ) * Based on openssl ' s crypto / x509 / x509 _ cmp . c line 321 */ protected static String openssl_X509_NAME_hash ( X500Principal p ) throws Exception { } }
// This code replicates OpenSSL ' s hashing function // DER - encode the Principal , MD5 hash it , then extract the first 4 bytes and reverse their positions byte [ ] derEncodedSubject = p . getEncoded ( ) ; byte [ ] md5 = MessageDigest . getInstance ( "MD5" ) . digest ( derEncodedSubject ) ; // Reduce the MD5 hash to ...
public class MvpDelegate { /** * < p > Detach delegated object from their presenters . < / p > */ public void onDetach ( ) { } }
for ( MvpPresenter < ? super Delegated > presenter : mPresenters ) { if ( ! mIsAttached && ! presenter . getAttachedViews ( ) . contains ( mDelegated ) ) { continue ; } presenter . detachView ( mDelegated ) ; } mIsAttached = false ; for ( MvpDelegate < ? > childDelegate : mChildDelegates ) { childDelegate . onDetach ( ...
public class CacheRegistration { /** * Method that gets invoked when the server comes up * Load all the cache objects when the server starts * @ throws StartupException */ public void onStartup ( ) { } }
try { preloadCaches ( ) ; SpringAppContext . getInstance ( ) . loadPackageContexts ( ) ; // trigger dynamic context loading preloadDynamicCaches ( ) ; // implementor cache relies on kotlin from preloadDynamicCaches ( ) ImplementorCache implementorCache = new ImplementorCache ( ) ; implementorCache . loadCache ( ) ; all...
public class URLConnection { /** * Media types are in the format : type / subtype * ( ; parameter ) . * For looking up the content handler , we should ignore those * parameters . */ private String stripOffParameters ( String contentType ) { } }
if ( contentType == null ) return null ; int index = contentType . indexOf ( ';' ) ; if ( index > 0 ) return contentType . substring ( 0 , index ) ; else return contentType ;
public class RegistriesInner { /** * Schedules a new run based on the request parameters and add it to the run queue . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ param runRequest The parameter...
return ServiceFuture . fromResponse ( scheduleRunWithServiceResponseAsync ( resourceGroupName , registryName , runRequest ) , serviceCallback ) ;
public class NGBeanAttributeInfo { /** * Read the JSR 303 annotations from a bean \ " s attribute . * @ param component */ private void readJSR303Annotations ( UIComponent component ) { } }
coreExpression = ELTools . getCoreValueExpression ( component ) ; // Annotation [ ] annotations = ELTools . readAnnotations ( component ) ; // if ( null ! = annotations ) { // for ( Annotation a : annotations ) { // if ( a instanceof Max ) { // long maximum = ( ( Max ) a ) . value ( ) ; // max = maximum ; // hasMax = t...
public class AbstractIntSet { /** * from IntSet */ public boolean contains ( int value ) { } }
// dumb implementation . You should override . for ( Interator it = interator ( ) ; it . hasNext ( ) ; ) { if ( it . nextInt ( ) == value ) { return true ; } } return false ;