signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class RendererRecyclerViewAdapter { /** * Use { @ link # getStates ( ) } */
@ Deprecated @ NonNull public SparseArray < ViewState > getViewStates ( ) { } } | final SparseArray < ViewState > list = new SparseArray < > ( ) ; final Iterator < Map . Entry < Integer , ViewState > > iterator = getStates ( ) . entrySet ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { final Map . Entry < Integer , ViewState > next = iterator . next ( ) ; list . put ( next . getKey ( ) , next... |
public class DateTimePeriod { /** * Create a list of DateTimePeriods that represent the last year of
* YearMonth periods . For example , if its currently January 2009 , this
* would return periods representing " January 2009 , December 2008 , . . . February 2008"
* @ param zone
* @ return */
static public List ... | ArrayList < DateTimePeriod > periods = new ArrayList < DateTimePeriod > ( ) ; // get today ' s date
DateTime now = new DateTime ( zone ) ; // start with today ' s current month and 11 others ( last 12 months )
for ( int i = 0 ; i < 12 ; i ++ ) { // create a new period
DateTimePeriod period = createMonth ( now . getYear... |
public class TimeSpinner { /** * Toggles showing more time items . If enabled , a noon and a late night time item are shown .
* @ param enable True to enable , false to disable more time items . */
public void setShowMoreTimeItems ( boolean enable ) { } } | if ( enable && ! showMoreTimeItems ) { // create the noon and late night item :
final Resources res = getResources ( ) ; // switch the afternoon item to 2pm :
insertAdapterItem ( new TimeItem ( res . getString ( R . string . time_afternoon_2 ) , formatTime ( 14 , 0 ) , 14 , 0 , R . id . time_afternoon_2 ) , 2 ) ; remov... |
public class DFSInputStream { /** * Read bytes starting from the specified position .
* @ param position start read from this position
* @ param buffer read buffer
* @ param offset offset into buffer
* @ param length number of bytes to read
* @ return actual number of bytes read */
public int read ( long posi... | // sanity checks
dfsClient . checkOpen ( ) ; if ( closed ) { throw new IOException ( "Stream closed" ) ; } DFSClient . dfsInputStreamfailures . set ( 0 ) ; long start = System . currentTimeMillis ( ) ; long filelen = getFileLength ( ) ; if ( ( position < 0 ) || ( position >= filelen ) ) { return - 1 ; } int realLen = l... |
public class CommerceWarehouseUtil { /** * Returns a range of all the commerce warehouses where groupId = & # 63 ; and commerceCountryId = & # 63 ; .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primar... | return getPersistence ( ) . findByG_C ( groupId , commerceCountryId , start , end ) ; |
public class ConfigBasedDatasetsFinder { /** * Based on the { @ link # whitelistTag } , find all URI which imports the tag . Then filter out
* 1 . disabled dataset URI
* 2 . None leaf dataset URI
* Then created { @ link ConfigBasedDataset } based on the { @ link Config } of the URIs */
@ Override public List < Da... | Set < URI > leafDatasets = getValidDatasetURIs ( this . commonRoot ) ; if ( leafDatasets . isEmpty ( ) ) { return ImmutableList . of ( ) ; } // Parallel execution for copyDataset for performance consideration .
final List < Dataset > result = new CopyOnWriteArrayList < > ( ) ; Iterator < Callable < Void > > callableIte... |
public class PublicDiffCriteria { /** * Check if there is a change between two versions of a field .
* Returns true if the access flags differ , or if the inital value
* of the field differs .
* @ param oldInfo Info about the old version of the field .
* @ param newInfo Info about the new version of the field .... | if ( Tools . isFieldAccessChange ( oldInfo . getAccess ( ) , newInfo . getAccess ( ) ) ) return true ; if ( oldInfo . getValue ( ) == null || newInfo . getValue ( ) == null ) { if ( oldInfo . getValue ( ) != newInfo . getValue ( ) ) return true ; } else if ( ! oldInfo . getValue ( ) . equals ( newInfo . getValue ( ) ) ... |
public class ThreadPoolThriftServerImpl { /** * 初始化Thrift服务
* 启动Thrift服务之前必须要进行初始化 .
* @ param serverTransport
* 服务传输类型 */
protected void initServer ( TServerTransport serverTransport ) { } } | ThriftServerConfiguration configuration = getServerConfiguration ( ) ; // 使用TThreadPoolServer方式启动Thrift服务器 , 对每个连接都会单独建立一个线程 .
TThreadPoolServer . Args args = new TThreadPoolServer . Args ( serverTransport ) . transportFactory ( configuration . getTransportFactory ( ) ) . protocolFactory ( configuration . getProtocolFa... |
public class QueryDSL { /** * < p > lexer . < / p >
* @ param expression a { @ link java . lang . String } object .
* @ return a { @ link ameba . db . dsl . QueryLexer } object . */
public static QueryLexer lexer ( String expression ) { } } | QueryLexer lexer = new QueryLexer ( input ( expression ) ) ; lexer . removeErrorListeners ( ) ; lexer . addErrorListener ( ERROR_LISTENER ) ; return lexer ; |
public class ByteBufferInputStream { private synchronized boolean waitForContent ( ) throws InterruptedIOException { } } | if ( _buffer != null ) { if ( _buffer . hasRemaining ( ) ) return true ; // recycle buffer
recycle ( _buffer ) ; _buffer = null ; } while ( ! _closed && LazyList . size ( _buffers ) == 0 ) { try { this . wait ( _timeout ) ; } catch ( InterruptedException e ) { log . debug ( e ) ; throw new InterruptedIOException ( e . ... |
public class WordCountGenerator { /** * Build count map map .
* @ param pattern the pattern
* @ param text the text
* @ return the map */
public static Map < String , Long > buildCountMap ( Pattern pattern , String text ) { } } | return buildCountMap ( pattern . splitAsStream ( text ) ) ; |
public class DriverFactory { /** * Sets the logging level of the generated web driver .
* @ param caps
* The web driver ' s capabilities
* @ param level
* The logging level */
private void setLoggingLevel ( DesiredCapabilities caps ) { } } | final LoggingPreferences logPrefs = new LoggingPreferences ( ) ; logPrefs . enable ( LogType . BROWSER , Level . ALL ) ; logPrefs . enable ( LogType . CLIENT , Level . OFF ) ; logPrefs . enable ( LogType . DRIVER , Level . OFF ) ; logPrefs . enable ( LogType . PERFORMANCE , Level . OFF ) ; logPrefs . enable ( LogType .... |
public class ParallelUtils { /** * This helper method provides a convenient way to break up a computation
* across < tt > N < / tt > items into individual indices to be processed . This
* method is meant for when the execution time of any given index is highly
* variable , and so for load balancing purposes , sho... | if ( ! parallel ) { for ( int i = 0 ; i < N ; i ++ ) ir . run ( i ) ; return ; } final CountDownLatch latch = new CountDownLatch ( N ) ; IntStream . range ( 0 , N ) . forEach ( threadID -> { threadPool . submit ( ( ) -> { ir . run ( threadID ) ; latch . countDown ( ) ; } ) ; } ) ; try { latch . await ( ) ; } catch ( In... |
public class AbstractItem { /** * Renames this item */
@ RequirePOST @ Restricted ( NoExternalUse . class ) public HttpResponse doConfirmRename ( @ QueryParameter String newName ) throws IOException { } } | newName = newName == null ? null : newName . trim ( ) ; FormValidation validationError = doCheckNewName ( newName ) ; if ( validationError . kind != FormValidation . Kind . OK ) { throw new Failure ( validationError . getMessage ( ) ) ; } renameTo ( newName ) ; // send to the new job page
// note we can ' t use getUrl ... |
public class Temporals { /** * Converts a { @ code ChronoUnit } to a { @ code TimeUnit } .
* This handles the seven units declared in { @ code TimeUnit } .
* @ param unit the unit to convert , not null
* @ return the converted unit , not null
* @ throws IllegalArgumentException if the unit cannot be converted *... | Objects . requireNonNull ( unit , "unit" ) ; switch ( unit ) { case NANOS : return TimeUnit . NANOSECONDS ; case MICROS : return TimeUnit . MICROSECONDS ; case MILLIS : return TimeUnit . MILLISECONDS ; case SECONDS : return TimeUnit . SECONDS ; case MINUTES : return TimeUnit . MINUTES ; case HOURS : return TimeUnit . H... |
public class ThresholdBlock_MT { /** * Computes the min - max value for each block in the image */
@ Override protected void computeStatistics ( T input , int innerWidth , int innerHeight ) { } } | final int statPixelStride = stats . getImageType ( ) . getNumBands ( ) ; final int statStride = stats . stride ; int vblocks = innerHeight / blockHeight ; if ( vblocks * blockHeight < innerHeight ) vblocks ++ ; // for ( int y = 0 ; y < innerHeight ; y + = blockHeight ) {
BoofConcurrency . loopFor ( 0 , vblocks , vblock... |
public class CmsContextMenu { /** * Adds a separator to this menu . < p > */
public void addSeparator ( ) { } } | CmsLabel sparator = new CmsLabel ( ) ; sparator . setStyleName ( I_CmsLayoutBundle . INSTANCE . contextmenuCss ( ) . menuItemSeparator ( ) ) ; m_panel . add ( sparator ) ; |
public class SignatureInfo { /** * Constructs payload to be signed .
* @ return payload to sign
* @ see < a href = " https : / / cloud . google . com / storage / docs / access - control # Signed - URLs " > Signed URLs < / a > */
public String constructUnsignedPayload ( ) { } } | // TODO reverse order when V4 becomes default
if ( Storage . SignUrlOption . SignatureVersion . V4 . equals ( signatureVersion ) ) { return constructV4UnsignedPayload ( ) ; } return constructV2UnsignedPayload ( ) ; |
public class ST_Scale { /** * Scales the given geometry by multiplying the coordinates by the
* indicated x and y scale factors , leaving the z - coordinate untouched .
* @ param geom Geometry
* @ param xFactor x scale factor
* @ param yFactor y scale factor
* @ return The geometry scaled by the given x and y... | return scale ( geom , xFactor , yFactor , 1.0 ) ; |
public class DebugKelp { /** * Debug with a table key
* @ param out the result of the debug stream
* @ param path the database source
* @ param tableKey the specific table to display
* @ throws IOException */
public void debug ( WriteStream out , Path path , byte [ ] tableKey ) throws IOException { } } | SegmentKelpBuilder builder = new SegmentKelpBuilder ( ) ; builder . path ( path ) ; builder . create ( false ) ; builder . services ( ServicesAmp . newManager ( ) . get ( ) ) ; SegmentServiceImpl segmentService = builder . build ( ) ; for ( SegmentExtent extent : segmentService . getSegmentExtents ( ) ) { debugSegment ... |
public class BatchGetItemResult { /** * A map of table name to a list of items . Each object in < code > Responses < / code > consists of a table name , along
* with a map of attribute data consisting of the data type and attribute value .
* @ return A map of table name to a list of items . Each object in < code > ... | return responses ; |
public class FieldFilterBuilder { /** * Filter fields with default access .
* @ return This builder to support method chaining . */
public FieldFilterBuilder isDefault ( ) { } } | add ( new NegationFieldFilter ( new ModifierFieldFilter ( Modifier . PUBLIC & Modifier . PROTECTED & Modifier . PRIVATE ) ) ) ; return this ; |
public class DateTimeUtil { /** * returns a date time instance by a number , the conversion from the double to date is o the base of
* the CFML rules .
* @ param days double value to convert to a number
* @ return DateTime Instance */
public DateTime toDateTime ( double days ) { } } | long utc = Math . round ( days * DAY_MILLIS ) ; utc -= CF_UNIX_OFFSET ; utc -= getLocalTimeZoneOffset ( utc ) ; return new DateTimeImpl ( utc , false ) ; |
public class ClassDoc { /** * Converts inner class names . */
public String getQualifiedTypeNameForFile ( ) { } } | String typeName = getTypeNameForFile ( ) ; String qualifiedTypeName = mDoc . qualifiedTypeName ( ) ; int packageLength = qualifiedTypeName . length ( ) - typeName . length ( ) ; if ( packageLength <= 0 ) { return typeName ; } String packagePath = qualifiedTypeName . substring ( 0 , packageLength ) ; return packagePath ... |
public class SQLMetadataSegmentManager { /** * Builds a VersionedIntervalTimeline containing used segments that overlap the intervals passed . */
private VersionedIntervalTimeline < String , DataSegment > buildVersionedIntervalTimeline ( final String dataSource , final Collection < Interval > intervals , final Handle h... | return VersionedIntervalTimeline . forSegments ( intervals . stream ( ) . flatMap ( interval -> handle . createQuery ( StringUtils . format ( "SELECT payload FROM %1$s WHERE dataSource = :dataSource AND start < :end AND %2$send%2$s > :start AND used = true" , getSegmentsTable ( ) , connector . getQuoteString ( ) ) ) . ... |
public class LssClient { /** * Start your pulling live session by live session id .
* @ param sessionId Live session id .
* @ return the response */
public StartPullSessionResponse startPullSession ( String sessionId ) { } } | StartPullSessionRequest request = new StartPullSessionRequest ( ) . withSessionId ( sessionId ) ; return startPullSession ( request ) ; |
public class Entity { /** * Deprecated */
public List < List < Term > > getReferences ( ) { } } | List < List < Term > > list = new ArrayList < List < Term > > ( ) ; for ( Span < Term > span : this . references ) { list . add ( span . getTargets ( ) ) ; } return list ; |
public class NodeUtil { /** * Gets the boolean value of a node that represents a expression . This method
* effectively emulates the < code > Boolean ( ) < / code > JavaScript cast function .
* Note : unlike getPureBooleanValue this function does not return UNKNOWN
* for expressions with side - effects . */
stati... | switch ( n . getToken ( ) ) { case ASSIGN : case COMMA : // For ASSIGN and COMMA the value is the value of the RHS .
return getImpureBooleanValue ( n . getLastChild ( ) ) ; case NOT : TernaryValue value = getImpureBooleanValue ( n . getLastChild ( ) ) ; return value . not ( ) ; case AND : { TernaryValue lhs = getImpure... |
public class HpelFormatter { /** * Formats a RepositoryLogRecord using the formatter ' s locale
* @ param record log record to be formatted
* @ return the resulting formatted string output . */
public String formatRecord ( RepositoryLogRecord record ) { } } | if ( null == record ) { throw new IllegalArgumentException ( "Record cannot be null" ) ; } return formatRecord ( record , ( Locale ) null ) ; |
public class TrafficPlugin { /** * Add local layer to the map . */
private void addLocalLayer ( ) { } } | LineLayer local = TrafficLayer . getLineLayer ( Local . BASE_LAYER_ID , Local . ZOOM_LEVEL , Local . FILTER , Local . FUNCTION_LINE_COLOR , Local . FUNCTION_LINE_WIDTH , Local . FUNCTION_LINE_OFFSET ) ; LineLayer localCase = TrafficLayer . getLineLayer ( Local . CASE_LAYER_ID , Local . ZOOM_LEVEL , Local . FILTER , Loc... |
public class Config { /** * Returns the exceptions which will be recovered from . By default these will include
* { @ code SocketTimeoutException } , { @ code ConnectException } , { @ code AlreadyClosedException } , and
* { @ code TimeoutException } , but this set can be mutated directly to change the recoverable
... | return recoverableExceptions != null ? recoverableExceptions : parent != null ? parent . getRecoverableExceptions ( ) : Collections . < Class < ? extends Exception > > emptySet ( ) ; |
public class StringBuilderWriter { /** * Appends the specified character sequence to this writer .
* An invocation of this method of the form < tt > out . append ( csq ) < / tt > behaves in exactly the same way as the
* invocation
* < pre >
* out . write ( csq . toString ( ) )
* < / pre >
* Depending on the... | if ( csq == null ) write ( "null" ) ; else write ( csq . toString ( ) ) ; return this ; |
public class CfnResponseSender { /** * Synchronously sends response to Cloudformation S3 endpoint
* @ param event cloudformation event
* @ param status SUCCESS or FAILURE
* @ param context AWS lambda context
* @ param reason custom reason to report to cfn ( optional )
* @ param data user data return object ( ... | // Sanitize inputs
checkNotNull ( event , "event" ) ; checkNotNull ( status , "status" ) ; checkNotNull ( context , "context" ) ; // Compose response
final CfnResponse < T > response = new CfnResponse < > ( ) ; response . setData ( data ) ; response . setStatus ( status ) ; response . setLogicalResourceId ( event . get... |
public class StreamMetadataTasks { /** * Seal a stream .
* @ param scope scope .
* @ param stream stream name .
* @ param contextOpt optional context
* @ return update status . */
public CompletableFuture < UpdateStreamStatus . Status > sealStream ( String scope , String stream , OperationContext contextOpt ) {... | final OperationContext context = contextOpt == null ? streamMetadataStore . createContext ( scope , stream ) : contextOpt ; final long requestId = requestTracker . getRequestIdFor ( "sealStream" , scope , stream ) ; // 1 . post event for seal .
SealStreamEvent event = new SealStreamEvent ( scope , stream , requestId ) ... |
public class AWSSimpleSystemsManagementClient { /** * Shares a Systems Manager document publicly or privately . If you share a document privately , you must specify the
* AWS user account IDs for those people who can use the document . If you share a document publicly , you must
* specify < i > All < / i > as the a... | request = beforeClientExecution ( request ) ; return executeModifyDocumentPermission ( request ) ; |
public class FileStore { /** * Returns a { @ link File } for the given filename in the store .
* @ throws FileNotFoundException if no file with the given filename exists
* @ throws IOException if the given filename does not refer to a file */
public File getFile ( String fileName ) throws IOException { } } | validatePathname ( fileName ) ; String pathname = storageDir + separator + fileName ; File file = new File ( pathname ) ; if ( ! file . exists ( ) ) { throw new FileNotFoundException ( pathname ) ; } if ( ! file . isFile ( ) ) { throw new IOException ( '\'' + pathname + '\'' + " is not a file" ) ; } return file ; |
public class ShrinkWrapFileSystemProvider { /** * { @ inheritDoc }
* @ see java . nio . file . spi . FileSystemProvider # getFileAttributeView ( java . nio . file . Path , java . lang . Class ,
* java . nio . file . LinkOption [ ] ) */
@ Override public < V extends FileAttributeView > V getFileAttributeView ( final... | if ( path == null ) { throw new IllegalArgumentException ( "path must be specified" ) ; } if ( type == null ) { throw new IllegalArgumentException ( "type must be specified" ) ; } if ( ! type . isAssignableFrom ( ShrinkWrapFileAttributeView . class ) ) { // Nope , we don ' t support this view
return null ; } if ( ! ( p... |
public class Pagelet { /** * Translate widget type . */
private String translateType ( String type , Map < String , String > attrs ) { } } | String translated = type . toLowerCase ( ) ; if ( "select" . equals ( type ) ) translated = "radio" ; else if ( "boolean" . equals ( type ) ) translated = "checkbox" ; else if ( "list" . equals ( type ) ) { translated = "picklist" ; String lbl = attrs . get ( "label" ) ; if ( lbl == null ) lbl = attrs . get ( "name" ) ... |
public class SubWriterHolderWriter { /** * Add the index comment .
* @ param member the member being documented
* @ param contentTree the content tree to which the comment will be added */
protected void addIndexComment ( Element member , Content contentTree ) { } } | List < ? extends DocTree > tags = utils . getFirstSentenceTrees ( member ) ; addIndexComment ( member , tags , contentTree ) ; |
public class WebSocketAddon { /** * { @ inheritDoc } */
public boolean isEnabled ( Application application ) { } } | if ( enabled == null ) { enabled = ! "false" . equals ( application . getSrcProperties ( ) . get ( WEB_SOCKET_ENABLED_CONF ) ) ; if ( ! enabled ) { logger . info ( Messages . get ( "web.socket.info.disabled" ) ) ; } } return enabled ; |
public class AmazonSimpleEmailServiceClient { /** * Deletes an existing custom verification email template .
* For more information about custom verification email templates , see < a
* href = " http : / / docs . aws . amazon . com / ses / latest / DeveloperGuide / custom - verification - emails . html " > Using Cu... | request = beforeClientExecution ( request ) ; return executeDeleteCustomVerificationEmailTemplate ( request ) ; |
public class JClassWrapper { /** * Returns the annotation . */
@ Override public JAnnotation getAnnotation ( String name ) { } } | Annotation [ ] ann = _class . getAnnotations ( ) ; for ( int i = 0 ; i < ann . length ; i ++ ) { if ( ann [ i ] . annotationType ( ) . getName ( ) . equals ( name ) ) return new JAnnotationWrapper ( ann [ i ] ) ; } return null ; |
public class OutputStreamLogSink { public synchronized void setFilename ( String filename ) { } } | if ( filename != null ) { filename = filename . trim ( ) ; if ( filename . length ( ) == 0 ) filename = null ; } if ( isStarted ( ) && _filename != null && filename == null ) _out = null ; _reopen = isStarted ( ) && ( ( _filename == null && filename != null ) || ( _filename != null && ! _filename . equals ( filename ) ... |
public class DatePicker { /** * initComponents , This initializes the components of the JFormDesigner panel . This function is
* automatically generated by JFormDesigner from the JFD form design file , and should not be
* modified by hand . This function can be modified , if needed , by using JFormDesigner .
* Im... | // JFormDesigner - Component initialization - DO NOT MODIFY / / GEN - BEGIN : initComponents
dateTextField = new JTextField ( ) ; toggleCalendarButton = new JButton ( ) ; // = = = = = this = = = = =
setLayout ( new FormLayout ( "pref:grow, [3px,pref], [26px,pref]" , "fill:pref:grow" ) ) ; // - - - - dateTextField - - -... |
public class GeoPackageExtensions { /** * Delete the extensions for the table
* @ param geoPackage
* @ param table */
private static void delete ( GeoPackageCore geoPackage , String table ) { } } | ExtensionsDao extensionsDao = geoPackage . getExtensionsDao ( ) ; try { if ( extensionsDao . isTableExists ( ) ) { extensionsDao . deleteByTableName ( table ) ; } } catch ( SQLException e ) { throw new GeoPackageException ( "Failed to delete Table extensions. GeoPackage: " + geoPackage . getName ( ) + ", Table: " + tab... |
public class ImageAttribute { /** * The launch permissions .
* @ param launchPermissions
* The launch permissions . */
public void setLaunchPermissions ( java . util . Collection < LaunchPermission > launchPermissions ) { } } | if ( launchPermissions == null ) { this . launchPermissions = null ; return ; } this . launchPermissions = new com . amazonaws . internal . SdkInternalList < LaunchPermission > ( launchPermissions ) ; |
public class AstaTextFileReader { /** * Process resources .
* @ throws SQLException */
private void processResources ( ) throws SQLException { } } | List < Row > permanentRows = getTable ( "PERMANENT_RESOURCE" ) ; List < Row > consumableRows = getTable ( "CONSUMABLE_RESOURCE" ) ; Collections . sort ( permanentRows , PERMANENT_RESOURCE_COMPARATOR ) ; Collections . sort ( consumableRows , CONSUMABLE_RESOURCE_COMPARATOR ) ; m_reader . processResources ( permanentRows ... |
public class JsonToModelConverter { /** * Converts given json string to { @ link TableColumnOrdering } used by { @ link TableColumnOrderingModel } .
* @ param tableIdentifier an application unique table identifier .
* @ param json string to convert to { @ link TableColumnOrdering } .
* @ return the converted { @ ... | final String [ ] split = this . splitColumns ( json ) ; final List < Ordering > orderings = new ArrayList < > ( ) ; for ( String column : split ) { final String [ ] attribute = this . splitAttributes ( column ) ; final String identifier = attribute [ 0 ] . split ( ":" ) [ 1 ] ; final String position = attribute [ 1 ] .... |
public class HtmlSequencePlotting { /** * Create a HTML file with plots for the given sequence and write it to a file .
* @ param title Title of the page
* @ param schema Schema for the data
* @ param sequence Sequence to plot */
public static void createHtmlSequencePlotFile ( String title , Schema schema , List ... | String s = createHtmlSequencePlots ( title , schema , sequence ) ; FileUtils . writeStringToFile ( output , s , StandardCharsets . UTF_8 ) ; |
public class AdminListGroupsForUserRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( AdminListGroupsForUserRequest adminListGroupsForUserRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( adminListGroupsForUserRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( adminListGroupsForUserRequest . getUsername ( ) , USERNAME_BINDING ) ; protocolMarshaller . marshall ( adminListGroupsForUserRequest . getUserPoolId ( ) , ... |
public class FessMessages { /** * Add the created action message for the key ' errors . footer ' with parameters .
* < pre >
* message : & lt ; / ul & gt ;
* < / pre >
* @ param property The property name for the message . ( NotNull )
* @ return this . ( NotNull ) */
public FessMessages addErrorsFooter ( Stri... | assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( ERRORS_FOOTER ) ) ; return this ; |
public class Server { /** * Performs shutdown tasks for the modules and the server .
* All loaded modules ' shutdownModule ( ) methods are called , then
* shutdownServer is called .
* < h3 > How to Ensure Clean Server Shutdown < / h3 >
* After having used a < code > Server < / code > instance , if you know your... | logger . info ( "Shutting down server" ) ; Throwable mse = null ; try { m_moduleContext . close ( ) ; m_moduleContext . destroy ( ) ; } catch ( Throwable e ) { logger . error ( "Shutdown error: " + e . toString ( ) , e ) ; mse = e ; } shutdownServer ( ) ; logger . info ( "Server shutdown complete" ) ; s_instances . rem... |
public class LongAdder { /** * Returns the current sum . The returned value is < em > NOT < / em > an
* atomic snapshot ; invocation in the absence of concurrent
* updates returns an accurate result , but concurrent updates that
* occur while the sum is being calculated might not be
* incorporated .
* @ retur... | long sum = base ; Cell [ ] as = cells ; if ( as != null ) { int n = as . length ; for ( int i = 0 ; i < n ; ++ i ) { Cell a = as [ i ] ; if ( a != null ) sum += a . value ; } } return sum ; |
public class CommerceVirtualOrderItemServiceBaseImpl { /** * Returns the commerce virtual order item local service .
* @ return the commerce virtual order item local service */
public com . liferay . commerce . product . type . virtual . order . service . CommerceVirtualOrderItemLocalService getCommerceVirtualOrderIt... | return commerceVirtualOrderItemLocalService ; |
public class CmsUndoRedoHandler { /** * Initializes the handler to be used for the given entity . < p >
* @ param entity the edited entity
* @ param editor the editor instance
* @ param rootHandler the root attribute handler */
public void initialize ( CmsEntity entity , CmsEditorBase editor , CmsRootHandler root... | m_undo . clear ( ) ; m_redo . clear ( ) ; m_entity = entity ; m_editor = editor ; m_rootHandler = rootHandler ; m_current = new Change ( m_entity . cloneEntity ( ) , null , null , 0 , null ) ; fireStateChange ( ) ; |
public class Aggregations { /** * Returns an aggregation for counting all supplied values . < br / >
* This aggregation is similar to : < pre > SELECT COUNT ( * ) FROM x < / pre >
* @ param < Key > the input key type
* @ param < Value > the supplied value type
* @ return the count of all supplied elements */
pu... | return new AggregationAdapter ( new CountAggregation < Key , Value > ( ) ) ; |
public class GreenPepperServerServiceImpl { /** * { @ inheritDoc } */
public List < Reference > getSpecificationReferences ( Specification specification ) throws GreenPepperServerException { } } | try { sessionService . startSession ( ) ; Repository repository = loadRepository ( specification . getRepository ( ) . getUid ( ) ) ; List < Reference > references = documentDao . getAllReferences ( specification ) ; log . debug ( "Retrieved Specification " + specification . getName ( ) + " Test Cases number: " + refer... |
public class PipelineApi { /** * Create a pipeline schedule variable .
* < pre > < code > GitLab Endpoint : POST / projects / : id / pipeline _ schedules / : pipeline _ schedule _ id / variables < / code > < / pre >
* @ param projectIdOrPath projectIdOrPath the project in the form of an Integer ( ID ) , String ( pa... | GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "key" , key , true ) . withParam ( "value" , value , true ) ; Response response = post ( Response . Status . CREATED , formData , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "pipeline_schedules" , pipelineScheduleId , "variables" ) ; return ( respon... |
public class ParsedValues { /** * called in context of erraneous or - block */
void reset ( ) { } } | if ( this . keys == null ) { this . len = Integer . MIN_VALUE ; this . mask = Integer . MIN_VALUE ; this . threshold = Integer . MIN_VALUE ; this . count = Integer . MIN_VALUE ; for ( int i = 0 ; i < 3 ; i ++ ) { this . ints [ i ] = Integer . MIN_VALUE ; } this . map = null ; } else { this . keys = new Object [ this . ... |
public class CmsJspActionElement { /** * Include a named sub - element with parameters from the OpenCms VFS , same as
* using the < code > & lt ; cms : include file = " * * * " element = " * * * " / & gt ; < / code > tag
* with parameters in the tag body . < p >
* The parameter map should be a map where the keys ... | include ( target , element , editable , true , parameterMap ) ; |
public class AbstractBeanDefinition { /** * Adds a new { @ link ExecutableMethod } .
* @ param executableMethod The method
* @ return The bean definition */
@ SuppressWarnings ( "unused" ) @ Internal @ UsedByGeneratedCode protected final AbstractBeanDefinition < T > addExecutableMethod ( ExecutableMethod < T , ? > ... | MethodKey key = new MethodKey ( executableMethod . getMethodName ( ) , executableMethod . getArgumentTypes ( ) ) ; executableMethodMap . put ( key , executableMethod ) ; return this ; |
public class SearchQueryBuilder { /** * / / / / / TODO Create factory methods */
public static AndQuery CreateAndQuery ( Query first , Query second ) { } } | AndQuery and = new AndQuery ( ) ; and . subqueries . add ( first ) ; and . subqueries . add ( second ) ; return and ; |
public class ExcelExecutor { /** * 初始化 , 注册默认的DataWriter */
private void init ( ) { } } | writers . put ( Boolean . class , new BooleanDataWriter ( ) ) ; writers . put ( Calendar . class , new CalendarDataWriter ( ) ) ; writers . put ( Date . class , new DateDataWriter ( ) ) ; writers . put ( Enum . class , new EnumDataWriter ( ) ) ; writers . put ( Number . class , new NumberDataWriter ( ) ) ; writers . pu... |
public class CollectionUtil { /** * 矩阵转置 ( 矩阵必须每行的列数都一样 ) ( 行变列 , 列变行 )
* @ param datas 要转置的数据
* @ param < T > 数据类型
* @ return 转置后的矩阵 , 例如 [ [ 01,02 ] [ 11,12 ] ] 会变为 [ [ 01,11 ] , [ 02,12 ] ] */
public static < T > List < List < T > > matrixTransform ( List < List < T > > datas ) { } } | if ( datas . size ( ) == 0 || datas . get ( 0 ) . size ( ) == 0 ) { return datas ; } int column = datas . size ( ) ; int row = datas . get ( 0 ) . size ( ) ; List < List < T > > newData = new ArrayList < > ( row ) ; for ( int i = 0 ; i < row ; i ++ ) { List < T > list = new ArrayList < > ( column ) ; for ( int j = 0 ; ... |
public class PatternBox { /** * Constructs a pattern where first and last small molecules are substrates to the same
* biochemical reaction .
* @ param blacklist a skip - list of ubiquitous molecules
* @ return the pattern */
public static Pattern reactsWith ( Blacklist blacklist ) { } } | Pattern p = new Pattern ( SmallMoleculeReference . class , "SMR1" ) ; p . add ( erToPE ( ) , "SMR1" , "SPE1" ) ; p . add ( notGeneric ( ) , "SPE1" ) ; p . add ( linkToComplex ( blacklist ) , "SPE1" , "PE1" ) ; p . add ( new ParticipatesInConv ( RelType . INPUT , blacklist ) , "PE1" , "Conv" ) ; p . add ( type ( Biochem... |
public class MyStringUtils { /** * Return tabular data
* @ param labels Labels array
* @ param data Data bidimensional array
* @ param padding Total space between fields
* @ return String */
public static String getTabularData ( String [ ] labels , String [ ] [ ] data , int padding ) { } } | int [ ] size = new int [ labels . length ] ; for ( int i = 0 ; i < labels . length ; i ++ ) { size [ i ] = labels [ i ] . length ( ) + padding ; } for ( String [ ] row : data ) { for ( int i = 0 ; i < labels . length ; i ++ ) { if ( row [ i ] . length ( ) >= size [ i ] ) { size [ i ] = row [ i ] . length ( ) + padding ... |
public class AbstractPrintQuery { /** * The instance method executes exact one complete statement and populates
* the result in the cached result { @ link # cachedResult } .
* @ param _ complStmt complete statement instance to execute
* @ param _ oneSelects lsit of OneSelects the statement is executed for
* @ r... | boolean ret = false ; ConnectionResource con = null ; try { AbstractPrintQuery . LOG . debug ( "Executing SQL: {}" , _complStmt ) ; List < Object [ ] > rows = null ; boolean cached = false ; if ( isCacheEnabled ( ) ) { final QueryKey querykey = QueryKey . get ( getKey ( ) , _complStmt ) ; final Cache < QueryKey , Objec... |
public class TopologyContext { /** * Convenience method for registering ReducedMetric . */
@ SuppressWarnings ( "rawtypes" ) public ReducedMetric registerMetric ( String name , IReducer reducer , int timeBucketSizeInSecs ) { } } | return registerMetric ( name , new ReducedMetric ( reducer ) , timeBucketSizeInSecs ) ; |
public class AbstractBaseDestinationHandler { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . sib . processor . impl . interfaces . DestinationHandler # updateDefinition ( com . ibm . ws . sib . admin . DestinationDefinition ) */
public void updateDefinition ( BaseDestinationDefinition destinationDefinition ) { ... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "updateDefinition" , new Object [ ] { destinationDefinition } ) ; DestinationDefinition oldDefinition = definition ; DestinationDefinition newDefinition = ( DestinationDefinition ) destinationDefinition ; // Reset values to ... |
public class CommunicationRegistry { /** * 注销调一个Action
* @ param action
* @ return */
public static void unregist ( Object action ) { } } | if ( logger . isInfoEnabled ( ) ) { logger . info ( " Un Regist Action : " + action ) ; } if ( action != null ) { for ( Iterator < Map . Entry < EventType , Object > > iter = table . entrySet ( ) . iterator ( ) ; iter . hasNext ( ) ; ) { Map . Entry < EventType , Object > entry = iter . next ( ) ; if ( action == entry ... |
public class RelationalOperations { /** * Returns true if polygon _ a is disjoint from point _ b . */
private static boolean polygonDisjointPoint_ ( Polygon polygon_a , Point point_b , double tolerance , ProgressTracker progress_tracker ) { } } | PolygonUtils . PiPResult result = PolygonUtils . isPointInPolygon2D ( polygon_a , point_b , tolerance ) ; if ( result == PolygonUtils . PiPResult . PiPOutside ) return true ; return false ; |
public class ESFilterBuilder { /** * Populate filter clause .
* @ param conditionalExpression
* the conditional expression
* @ return the filter clause */
private FilterClause populateFilterClause ( ComparisonExpression conditionalExpression ) { } } | String property = ( ( StateFieldPathExpression ) conditionalExpression . getLeftExpression ( ) ) . getPath ( 1 ) ; String condition = conditionalExpression . getComparisonOperator ( ) ; Expression rightExpression = conditionalExpression . getRightExpression ( ) ; Object value = ( rightExpression instanceof InputParamet... |
public class CmsShowResourceTable { /** * Gets the permission string . < p >
* @ param cms CmsObject
* @ param res Resource to get permission for
* @ param type dialog type
* @ return permission string for given resource
* @ throws CmsException thrown if ACE can not be read */
private String getPermissionStri... | if ( type . equals ( DialogType . User ) ) { cms . getPermissions ( res . getRootPath ( ) , m_principal . getName ( ) ) . getPermissionString ( ) ; } else if ( type . equals ( DialogType . Group ) ) { Iterator < CmsAccessControlEntry > itAces = cms . getAccessControlEntries ( res . getRootPath ( ) , false ) . iterator ... |
public class CmsDialog { /** * Gets a formatted file state string . < p >
* @ return formatted state string
* @ throws CmsException if something goes wrong */
public String getState ( ) throws CmsException { } } | if ( CmsStringUtil . isNotEmpty ( getParamResource ( ) ) ) { CmsResource file = getCms ( ) . readResource ( getParamResource ( ) , CmsResourceFilter . ALL ) ; if ( getCms ( ) . isInsideCurrentProject ( getParamResource ( ) ) ) { return key ( Messages . getStateKey ( file . getState ( ) ) ) ; } else { return key ( Messa... |
public class FlowPath { /** * This method adds Frame to tracking
* PLEASE NOTE : Only works for first call , subsequent calls are no - op
* @ param frame _ name */
public void registerFrame ( @ NonNull String frame_name ) { } } | if ( ! frames . containsKey ( frame_name ) ) frames . put ( frame_name , new FrameState ( frame_name ) ) ; |
public class Log { /** * Commits entries up to the given index to the log .
* @ param index The index up to which to commit entries .
* @ return The log .
* @ throws IllegalStateException If the log is not open . */
public Log commit ( long index ) { } } | assertIsOpen ( ) ; if ( index > 0 ) { assertValidIndex ( index ) ; segments . commitIndex ( index ) ; if ( storage . flushOnCommit ( ) ) { segments . currentSegment ( ) . flush ( ) ; } } return this ; |
public class HttpOSCReadAhead { /** * If an error occurs , such as the server side closing down the socket , then
* this method will be called . Depending on what state the connection is in ,
* this error is either sent to the application channel immediately or
* delayed until the actual read for the response wou... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "error() called: vc=" + vc + " ioe=" + ioe ) ; } HttpOutboundServiceContextImpl osc = ( HttpOutboundServiceContextImpl ) vc . getStateMap ( ) . get ( CallbackIDs . CALLBACK_HTTPOSC ) ; if ( osc . markReadCancelSuccess ( ) ) {... |
public class MarkSet { /** * Marks a type as transitively reachable by the includes set . Returns true if the mark is new ,
* the type will be retained , and its own dependencies should be traversed . */
boolean mark ( ProtoType type ) { } } | if ( type == null ) throw new NullPointerException ( "type == null" ) ; if ( identifierSet . excludes ( type ) ) return false ; return types . add ( type ) ; |
public class DBTransaction { /** * Add a column with empty value . The value will be empty byte array / empty string , not null
* @ param storeName Name of store that owns row .
* @ param rowKey Key of row that owns column .
* @ param columnName Name of column . */
public void addColumn ( String storeName , Strin... | addColumn ( storeName , rowKey , columnName , EMPTY ) ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link Customer } { @ code > } } */
@ XmlElementDecl ( namespace = "http://schema.intuit.com/finance/v3" , name = "Customer" , substitutionHeadNamespace = "http://schema.intuit.com/finance/v3" , substitutionHeadName = "Intuit... | return new JAXBElement < Customer > ( _Customer_QNAME , Customer . class , null , value ) ; |
public class MessageFormat { /** * Append characters from ' raw ' in the range [ pos , end ) to the output buffer . */
private void emit ( int pos , int end , String arg ) { } } | while ( pos < end ) { char ch = format . charAt ( pos ) ; if ( ch == '#' ) { buf . append ( arg == null ? ch : arg ) ; } else { buf . append ( ch ) ; } pos ++ ; } |
public class CssEscape { /** * Render this escape .
* @ param builder The TokenBuilder to render into
* @ param asLiteral If given matcher matches this escapes literal , then render as literal , else as escape .
* @ return the length of the token in the input character stream */
int render ( TokenBuilder builder ... | char ch = ( char ) character ; if ( asLiteral . matches ( ch ) ) { builder . append ( ch ) ; } else { // TODO could normalize space end chars
builder . append ( sequence ) ; } return sequence . length ( ) - 1 ; |
public class GetIntrospectionSchemaRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetIntrospectionSchemaRequest getIntrospectionSchemaRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getIntrospectionSchemaRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getIntrospectionSchemaRequest . getApiId ( ) , APIID_BINDING ) ; protocolMarshaller . marshall ( getIntrospectionSchemaRequest . getFormat ( ) , FORMAT_BIN... |
public class lbvserver { /** * Use this API to update lbvserver . */
public static base_response update ( nitro_service client , lbvserver resource ) throws Exception { } } | lbvserver updateresource = new lbvserver ( ) ; updateresource . name = resource . name ; updateresource . ipv46 = resource . ipv46 ; updateresource . ippattern = resource . ippattern ; updateresource . ipmask = resource . ipmask ; updateresource . weight = resource . weight ; updateresource . servicename = resource . s... |
public class FileAccessPermissions { /** * This method parses the { @ code ugoa } prefix indicating which flags to modify .
* < ul >
* < li > { @ code u } indicates that the flags of the { @ link FileAccessClass # USER user } should be changed . < / li >
* < li > { @ code g } indicates that the flags of the { @ l... | int ugo = 0 ; while ( true ) { char c = parse . forceNext ( ) ; if ( c == 'u' ) { ugo = ugo | MASK_USER ; } else if ( c == 'g' ) { ugo = ugo | MASK_GROUP ; } else if ( c == 'o' ) { ugo = ugo | MASK_OTHERS ; } else if ( c == 'a' ) { ugo = MASK_ALL ; } else { if ( ugo == 0 ) { // if none of u / g / o / a was specified , ... |
public class AbstractTTTLearner { /** * Marks a node , and propagates the label up to all nodes on the path from the block root to this node .
* @ param node
* the node to mark
* @ param label
* the label to mark the node with */
private static < I , D > void markAndPropagate ( AbstractBaseDTNode < I , D > node... | AbstractBaseDTNode < I , D > curr = node ; while ( curr != null && curr . getSplitData ( ) != null ) { if ( ! curr . getSplitData ( ) . mark ( label ) ) { return ; } curr = curr . getParent ( ) ; } |
public class ResourceBundleWrapper { /** * This method is for super class ' s instantiateBundle method */
public static ResourceBundleWrapper getBundleInstance ( String baseName , String localeID , ClassLoader root , boolean disableFallback ) { } } | if ( root == null ) { root = ClassLoaderUtil . getClassLoader ( ) ; } ResourceBundleWrapper b ; if ( disableFallback ) { b = instantiateBundle ( baseName , localeID , null , root , disableFallback ) ; } else { b = instantiateBundle ( baseName , localeID , ULocale . getDefault ( ) . getBaseName ( ) , root , disableFallb... |
public class AmazonEC2Client { /** * Cancels an in - process import virtual machine or import snapshot task .
* @ param cancelImportTaskRequest
* Contains the parameters for CancelImportTask .
* @ return Result of the CancelImportTask operation returned by the service .
* @ sample AmazonEC2 . CancelImportTask
... | request = beforeClientExecution ( request ) ; return executeCancelImportTask ( request ) ; |
public class InjectionSink { /** * Uses immutable values , updated priority and added lines for reporting
* @ param taintedInsideMethod true if not influenced by method arguments
* @ return new bug instance filled with information */
public BugInstance generateBugInstance ( boolean taintedInsideMethod ) { } } | BugInstance bug = new BugInstance ( detector , bugType , originalPriority ) ; bug . addClassAndMethod ( classContext . getJavaClass ( ) , method ) ; bug . addSourceLine ( SourceLineAnnotation . fromVisitedInstruction ( classContext , method , instructionHandle ) ) ; addMessage ( bug , "Sink method" , sinkMethod ) ; add... |
public class OPFHandler { /** * Returns an immutable list of all the items in the OPF , in document order ,
* including those represented by < code > link < / code > elements pointing to local
* resources .
* Returns the empty list if the items have not been parsed yet .
* @ return the list of all items , guara... | return ( items != null ) ? items . getItems ( ) : ImmutableList . < OPFItem > of ( ) ; |
public class StringUtils { /** * Replace all occurrences of a substring within a string with another string .
* @ param inString { @ code String } to examine .
* @ param oldPattern { @ code String } to replace .
* @ param newPattern { @ code String } to insert .
* @ return a { @ code String } with the replaceme... | if ( ! hasLength ( inString ) || ! hasLength ( oldPattern ) || newPattern == null ) { return inString ; } int index = inString . indexOf ( oldPattern ) ; if ( index == - 1 ) { // no occurrence - > can return input as - is
return inString ; } int capacity = inString . length ( ) ; if ( newPattern . length ( ) > oldPatte... |
public class JoinBooleanExpressionExecutor { /** * Standard method ( InternalProposalExecutor ) */
@ Override public NodeCentricOptimizationResults < InnerJoinNode > apply ( InnerJoinOptimizationProposal proposal , IntermediateQuery query , QueryTreeComponent treeComponent ) throws InvalidQueryOptimizationProposalExcep... | InnerJoinNode originalTopJoinNode = proposal . getFocusNode ( ) ; ImmutableList < JoinOrFilterNode > filterOrJoinNodes = extractFilterAndInnerJoinNodes ( originalTopJoinNode , query ) ; QueryNode parentNode = query . getParent ( originalTopJoinNode ) . get ( ) ; Optional < ImmutableExpression > optionalAggregatedFilter... |
public class ElementCollectionImpl { /** * If not already created , a new < code > order - column < / code > element with the given value will be created .
* Otherwise , the existing < code > order - column < / code > element will be returned .
* @ return a new or existing instance of < code > OrderColumn < Element... | Node node = childNode . getOrCreate ( "order-column" ) ; OrderColumn < ElementCollection < T > > orderColumn = new OrderColumnImpl < ElementCollection < T > > ( this , "order-column" , childNode , node ) ; return orderColumn ; |
public class AntiAffinityService { /** * Remove Anti - affinity policy
* @ param policyRef policy reference
* @ return OperationFuture wrapper for AntiAffinityPolicy */
public OperationFuture < AntiAffinityPolicy > delete ( AntiAffinityPolicy policyRef ) { } } | client . deleteAntiAffinityPolicy ( findByRef ( policyRef ) . getId ( ) ) ; return new OperationFuture < > ( policyRef , new NoWaitingJobFuture ( ) ) ; |
public class Ifc4FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertIfcBuildingElementPartTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } } | return instanceValue == null ? null : instanceValue . toString ( ) ; |
public class TextTable { /** * This method does some of the work involved with managing the creation
* and openning of the cache , the rest is done in Log . java and
* TextCache . java .
* Better clarification of the role of the methods is needed . */
private void openCache ( Session session , String dataSourceNe... | String dataSourceOld = dataSource ; boolean isReversedOld = isReversed ; boolean isReadOnlyOld = isReadOnly ; if ( dataSourceNew == null ) { dataSourceNew = "" ; } disconnect ( ) ; dataSource = dataSourceNew ; isReversed = ( isReversedNew && dataSource . length ( ) > 0 ) ; try { connect ( session , isReadOnlyNew ) ; } ... |
public class AggressiveInlineAliases { /** * Returns whether a ReferenceCollection for some aliasing variable references a property on the
* original aliased variable that may be collapsed in CollapseProperties .
* < p > See { @ link GlobalNamespace . Name # canCollapse } for what can / cannot be collapsed . */
pri... | for ( Reference ref : aliasRefs . references ) { if ( ref . getParent ( ) == null ) { continue ; } if ( ref . getParent ( ) . isGetProp ( ) ) { Node propertyNode = ref . getNode ( ) . getNext ( ) ; // e . g . if the reference is " alias . b . someProp " , this will be " b " .
String propertyName = propertyNode . getStr... |
public class RandomTwoParentSelection { /** * Selects two random parents
* @ return An array of parents genes . The outer array are the parents , and the inner array are the genes . */
@ Override public double [ ] [ ] selectParents ( ) { } } | double [ ] [ ] parents = new double [ 2 ] [ ] ; int parent1Idx = rng . nextInt ( population . size ( ) ) ; int parent2Idx ; do { parent2Idx = rng . nextInt ( population . size ( ) ) ; } while ( parent1Idx == parent2Idx ) ; parents [ 0 ] = population . get ( parent1Idx ) . getGenes ( ) ; parents [ 1 ] = population . get... |
public class OffsetTime { /** * Obtains an instance of { @ code OffsetTime } from an hour , minute , second and nanosecond .
* This creates an offset time with the four specified fields .
* This method exists primarily for writing test cases .
* Non test - code will typically use other methods to create an offset... | return new OffsetTime ( LocalTime . of ( hour , minute , second , nanoOfSecond ) , offset ) ; |
public class CSVParser { /** * Checks to see if the character after the current index in a String is an
* escapable character . Meaning the next character is either a quotation
* character or the escape char and you are inside quotes . precondition : the
* current character is an escape
* @ param sNextLine
* ... | // we are in quotes , therefore there can be escaped quotes in here .
// there is indeed another character to check .
return bInQuotes && sNextLine . length ( ) > ( nIndex + 1 ) && _isCharacterEscapable ( sNextLine . charAt ( nIndex + 1 ) ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.