signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class DiffNode { /** * Retrieve a child that matches the given path element relative to this node .
* @ param elementSelector The path element of the child node to get .
* @ return The requested child node or < code > null < / code > . */
public DiffNode getChild ( final ElementSelector elementSelector ) { }... | if ( elementSelector instanceof CollectionItemElementSelector && childIdentityStrategy != null ) { return children . get ( ( ( CollectionItemElementSelector ) elementSelector ) . copyWithIdentityStrategy ( childIdentityStrategy ) ) ; } else { return children . get ( elementSelector ) ; } |
public class GCMParameterSpec { /** * Check input parameters . */
private void init ( int tLen , byte [ ] src , int offset , int len ) { } } | if ( tLen < 0 ) { throw new IllegalArgumentException ( "Length argument is negative" ) ; } this . tLen = tLen ; // Input sanity check
if ( ( src == null ) || ( len < 0 ) || ( offset < 0 ) || ( ( len + offset ) > src . length ) ) { throw new IllegalArgumentException ( "Invalid buffer arguments" ) ; } iv = new byte [ len... |
public class SSLUtil { /** * Reads an entire SSL message from the specified
* input stream .
* @ param in the input stream to read the SSL message
* from .
* @ return the byte array containing the SSL message
* @ exception IOException if I / O error occurs . */
public static byte [ ] readSslMessage ( InputStr... | byte [ ] header = new byte [ 5 ] ; readFully ( in , header , 0 , header . length ) ; int length ; if ( isSSLv3Packet ( header ) ) length = toShort ( header [ 3 ] , header [ 4 ] ) ; else if ( isSSLv2HelloPacket ( header ) ) length = ( ( ( header [ 0 ] & 0x7f ) << 8 ) | ( header [ 1 ] & 0xff ) ) - 3 ; else { throw new IO... |
public class DayOpeningHours { /** * Returns the difference when changing this opening hours to the other one . The day of the week must be equal for both compared
* instances .
* @ param toOther
* Opening hours to compare with .
* @ return List of changes or an empty list if both are equal . */
public final Li... | Contract . requireArgNotNull ( "toOther" , toOther ) ; if ( dayOfTheWeek != toOther . dayOfTheWeek ) { throw new ConstraintViolationException ( "Expected same day (" + dayOfTheWeek + ") for argument 'toOther', but was: " + toOther . dayOfTheWeek ) ; } final List < DayOpeningHours > fromDays = normalize ( ) ; final List... |
public class SSLConnectionLink { /** * This method is called if connect or connectAsync are called redundantly , after
* the connection is already established . It cleans up the SSL engine . The connect
* methods will then pass the connect on down the chain where , eventually , a new
* socket will be established ... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "handleRedundantConnect, vc=" + getVCHash ( ) ) ; } // This conn link has already been connected .
// Need to shut get a new SSL engine .
cleanup ( ) ; // PK46069 - use engine that allows session id re - use
sslEngine = SSLUt... |
public class Instrumented { /** * Determines whether an object or , if it is a { @ link org . apache . gobblin . util . Decorator } , any object on its lineage ,
* is of class { @ link org . apache . gobblin . instrumented . Instrumentable } .
* @ param obj Object to analyze .
* @ return Whether the lineage is in... | List < Object > lineage = DecoratorUtils . getDecoratorLineage ( obj ) ; for ( Object node : lineage ) { if ( node instanceof Instrumentable ) { return true ; } } return false ; |
public class BaseAnnotationProcessorFactory { /** * Get a Sun annotation processor for the given annotation type declarations . This just wraps the type declarations
* in our wrapper types , and returns an annotation processor that delegates to our " core " ( apt - independent )
* processor to do the real work . */... | CoreAnnotationProcessorEnv coreEnv = CoreAnnotationProcessorEnvImpl . get ( env ) ; AnnotationTypeDeclaration [ ] atds = new AnnotationTypeDeclaration [ annotationTypeDeclarations . size ( ) ] ; int j = 0 ; for ( Iterator i = annotationTypeDeclarations . iterator ( ) ; i . hasNext ( ) ; ) { // Wrap each Sun / Mirror an... |
public class MilestonesApi { /** * Get a list of group milestones .
* @ param groupIdOrPath the group in the form of an Integer ( ID ) , String ( path ) , or Group instance
* @ param page the page number to get
* @ param perPage how many milestones per page
* @ return the milestones associated with the specifie... | Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "milestones" ) ; return ( response . readEntity ( new GenericType < List < Milestone > > ( ) { } ) ) ; |
public class XAbstractWhileExpressionImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public NotificationChain basicSetBody ( XExpression newBody , NotificationChain msgs ) { } } | XExpression oldBody = body ; body = newBody ; if ( eNotificationRequired ( ) ) { ENotificationImpl notification = new ENotificationImpl ( this , Notification . SET , XbasePackage . XABSTRACT_WHILE_EXPRESSION__BODY , oldBody , newBody ) ; if ( msgs == null ) msgs = notification ; else msgs . add ( notification ) ; } ret... |
public class Interaction { /** * Create a InteractionDeleter to execute delete .
* @ param pathServiceSid The SID of the parent Service of the resource to delete
* @ param pathSessionSid he SID of the parent Session of the resource to delete
* @ param pathSid The unique string that identifies the resource
* @ r... | return new InteractionDeleter ( pathServiceSid , pathSessionSid , pathSid ) ; |
public class DefaultGroovyMethods { /** * Concatenates the < code > toString ( ) < / code > representation of each
* item from the iterator , with the given String as a separator between
* each item . The iterator will become exhausted of elements after
* determining the resulting conjoined value .
* @ param se... | return join ( ( Iterable ) toList ( self ) , separator ) ; |
public class UnlinkIdentityRequest { /** * Provider names to unlink from this identity .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setLoginsToRemove ( java . util . Collection ) } or { @ link # withLoginsToRemove ( java . util . Collection ) } if you wa... | if ( this . loginsToRemove == null ) { setLoginsToRemove ( new java . util . ArrayList < String > ( loginsToRemove . length ) ) ; } for ( String ele : loginsToRemove ) { this . loginsToRemove . add ( ele ) ; } return this ; |
public class ProjectServiceV1 { /** * DELETE / projects / { projectName }
* < p > Removes a project . */
@ Delete ( "/projects/{projectName}" ) @ RequiresRole ( roles = ProjectRole . OWNER ) public CompletableFuture < Void > removeProject ( Project project , Author author ) { } } | // Metadata must be updated first because it cannot be updated if the project is removed .
return mds . removeProject ( author , project . name ( ) ) . thenCompose ( unused -> execute ( Command . removeProject ( author , project . name ( ) ) ) ) . handle ( HttpApiUtil :: throwUnsafelyIfNonNull ) ; |
public class UnitFactorMap { /** * Debugging conversion factors . */
public String dump ( Unit unit ) { } } | StringBuilder buf = new StringBuilder ( ) ; buf . append ( unit ) . append ( ":\n" ) ; Map < Unit , UnitFactor > map = factors . get ( unit ) ; for ( Unit base : map . keySet ( ) ) { UnitFactor factor = map . get ( base ) ; buf . append ( " " ) . append ( factor ) . append ( " " ) ; buf . append ( factor . rational (... |
public class Pubsub { /** * Pull a batch of messages .
* @ param canonicalSubscriptionName The canonical ( including project name ) subscription to pull from .
* @ param returnImmediately { @ code true } to return immediately if the queue is empty . { @ code false } to wait
* for at least one message before retur... | final String path = canonicalSubscriptionName + ":pull" ; final PullRequest req = PullRequest . builder ( ) . returnImmediately ( returnImmediately ) . maxMessages ( maxMessages ) . build ( ) ; return pull ( path , req ) ; |
public class UTFDataOutputStream { /** * The UTF - 8 encoding uses sequences of 1 , 2 , or 3 bytes per character . With
* he maximal length of the fragment we want to ensure , that there are no
* overflow of 65536 byte sized buffer
* @ param str
* String to be written in the output stream
* @ throws IOExcepti... | if ( str . length ( ) <= MAX_LENGTH ) { writeLastUTFFragment ( str ) ; } else { writeUTFFragment ( str . substring ( 0 , MAX_LENGTH ) ) ; writeFragmentedUTF ( str . substring ( MAX_LENGTH ) ) ; } |
public class MigrateRowsBase { /** * Execute a pre - compiled adHoc SQL statement , throw exception if not .
* @ return Count of rows inserted or upserted .
* @ throws VoltAbortException if any failure at all . */
VoltTable executePrecompiledSQL ( Statement catStmt , Object [ ] params , boolean replicated ) throws ... | // Create a SQLStmt instance on the fly
// This is unusual to do , as they are typically required to be final instance variables .
// This only works because the SQL text and plan is identical from the borrowed procedure .
SQLStmt stmt = new SQLStmt ( catStmt . getSqltext ( ) ) ; if ( replicated ) { stmt . setInCatalog... |
public class CommerceWarehouseItemLocalServiceWrapper { /** * Creates a new commerce warehouse item with the primary key . Does not add the commerce warehouse item to the database .
* @ param commerceWarehouseItemId the primary key for the new commerce warehouse item
* @ return the new commerce warehouse item */
@ ... | return _commerceWarehouseItemLocalService . createCommerceWarehouseItem ( commerceWarehouseItemId ) ; |
public class AbstractIoBuffer { /** * { @ inheritDoc } */
@ Override public final IoBuffer limit ( int newLimit ) { } } | autoExpand ( newLimit , 0 ) ; buf ( ) . limit ( newLimit ) ; if ( mark > newLimit ) { mark = - 1 ; } return this ; |
public class DefaultExpander { /** * Expand all configured keywords
* @ param drl
* @ return */
private String expandKeywords ( String drl ) { } } | substitutions = new ArrayList < Map < String , String > > ( ) ; // apply all keywords templates
drl = substitute ( drl , this . keywords , 0 , useKeyword , false ) ; substitutions = null ; return drl ; |
public class TimedInterface { /** * Creates a new TimedInterface for a given interface < code > ctype < / code > with a concrete class
* < code > concrete < / code > . */
public static < T > T newProxy ( Class < T > ctype , T concrete ) { } } | return newProxy ( ctype , concrete , null ) ; |
public class PdfOutline { /** * Sets the title of this outline
* @ param title */
public void setTitle ( String title ) { } } | put ( PdfName . TITLE , new PdfString ( title , PdfObject . TEXT_UNICODE ) ) ; |
public class DeviceAttribute_3 { public void insert ( final String [ ] argin , final int dim_x , final int dim_y ) { } } | deviceattribute_3DAO . insert ( argin , dim_x , dim_y ) ; |
public class CmsXmlGroupContainerFactory { /** * Factory method to unmarshal ( read ) a group container instance from a OpenCms VFS file
* that contains XML data , using wither the encoding set
* in the XML file header , or the encoding set in the VFS file property . < p >
* If you are not sure about the implicat... | // check the cache
CmsXmlGroupContainer content = getCache ( cms , file , keepEncoding ) ; if ( content != null ) { return content ; } // not found in cache , read as normally
byte [ ] contentBytes = file . getContents ( ) ; String filename = cms . getSitePath ( file ) ; String encoding = null ; try { encoding = cms . ... |
public class HttpUtil { /** * Performs an HTTP PUT on the given URL .
* ( without BasicAuth )
* @ param uriString String representing the URI to connect to
* @ param body
* @ param contentType
* @ return
* @ throws URISyntaxException
* @ throws HttpException */
public static Response put ( String uriStrin... | return putBody ( new HttpPut ( uriString ) , body , contentType , null , null ) ; |
public class RegionInstanceGroupManagerClient { /** * Flags the specified instances to be immediately removed from the managed instance group .
* Abandoning an instance does not delete the instance , but it does remove the instance from any
* target pools that are applied by the managed instance group . This method... | AbandonInstancesRegionInstanceGroupManagerHttpRequest request = AbandonInstancesRegionInstanceGroupManagerHttpRequest . newBuilder ( ) . setInstanceGroupManager ( instanceGroupManager == null ? null : instanceGroupManager . toString ( ) ) . setRegionInstanceGroupManagersAbandonInstancesRequestResource ( regionInstanceG... |
public class BatchModifyClusterSnapshotsRequest { /** * A list of snapshot identifiers you want to modify .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setSnapshotIdentifierList ( java . util . Collection ) } or
* { @ link # withSnapshotIdentifierList (... | if ( this . snapshotIdentifierList == null ) { setSnapshotIdentifierList ( new com . amazonaws . internal . SdkInternalList < String > ( snapshotIdentifierList . length ) ) ; } for ( String ele : snapshotIdentifierList ) { this . snapshotIdentifierList . add ( ele ) ; } return this ; |
public class Session { /** * Return current session data
* @ return */
public static SessionBean getSessionBean ( ) { } } | String id = idLocal . get ( ) ; if ( id == null ) return null ; SessionBean s = getSessionMap ( ) . get ( id ) ; // check TTL
if ( s != null && ( System . currentTimeMillis ( ) - s . lastUsed ) > TTL ) { if ( LOG . isDebugEnabled ( ) ) LOG . debug ( "Discarding session " + id + " with livetime=" + ( System . currentTim... |
public class MemoryUtil { /** * Performs default check on the size of a " registry " of UI widgets ( or similar ) .
* In practice " size " is likely to be the size of a java Collection but it could be anything you want .
* This is a convenience which should be adequate for the majority of cases .
* @ param size T... | if ( MemoryUtil . WARN_THRESHOLD < size ) { MemoryUtil . log ( className + " may be leaking memory, it contains a large number of items: " + size ) ; } |
public class BaseAuthenticator { /** * Authenticate the given request
* @ param pRequest request to examine
* @ return true if authentication passes , false otherwise */
public boolean authenticate ( HttpServletRequest pRequest ) { } } | String auth = pRequest . getHeader ( "Authorization" ) ; if ( auth == null ) { return false ; } AuthorizationHeaderParser . Result authInfo = AuthorizationHeaderParser . parse ( auth ) ; return authInfo . isValid ( ) && doAuthenticate ( pRequest , authInfo ) ; |
public class NewObjectDialog { /** * for the checkbox */
public void itemStateChanged ( ItemEvent e ) { } } | if ( e . getStateChange ( ) == ItemEvent . DESELECTED ) { // disable text entry
m_customPIDField . setEditable ( false ) ; } else if ( e . getStateChange ( ) == ItemEvent . SELECTED ) { // enable text entry
m_customPIDField . setEditable ( true ) ; } |
public class AbstractCommonConfigResolver { /** * Returns a set of full qualified class names of the handlers from the specified endpoint config
* @ param The config to get the handler class names of
* @ return A set of full qualified class names of the handlers from the specified endpoint config */
public Set < St... | Set < String > set = new HashSet < String > ( ) ; if ( config != null ) { for ( UnifiedHandlerChainMetaData uhcmd : config . getPreHandlerChains ( ) ) { for ( UnifiedHandlerMetaData uhmd : uhcmd . getHandlers ( ) ) { set . add ( uhmd . getHandlerClass ( ) ) ; } } for ( UnifiedHandlerChainMetaData uhcmd : config . getPo... |
public class PostOrderAxis { /** * { @ inheritDoc } */
@ Override public boolean hasNext ( ) { } } | resetToLastKey ( ) ; long key = mNextKey ; if ( key != NULL_NODE ) { moveTo ( mNextKey ) ; while ( ( ( ITreeStructData ) getNode ( ) ) . hasFirstChild ( ) && key != mLastParent . peek ( ) ) { mLastParent . push ( key ) ; key = ( ( ITreeStructData ) getNode ( ) ) . getFirstChildKey ( ) ; moveTo ( ( ( ITreeStructData ) g... |
public class UtilImageIO { /** * Loads a PGM image from a file .
* @ param fileName Location of PGM image
* @ param storage ( Optional ) Storage for output image . Must be the width and height of the image being read .
* Better performance of type BufferedImage . TYPE _ BYTE _ GRAY . If null or width / height inc... | return loadPGM ( new FileInputStream ( fileName ) , storage ) ; |
public class SearchUtils { /** * Find local variable node for a local variable at some instruction .
* @ param lvnList list of local variable nodes for method
* @ param insnList instruction list for method
* @ param insnNode instruction within method being searched against
* @ param idx local variable table ind... | Validate . notNull ( insnList ) ; Validate . notNull ( insnNode ) ; Validate . isTrue ( idx >= 0 ) ; int insnIdx = insnList . indexOf ( insnNode ) ; Validate . isTrue ( insnIdx != - 1 ) ; lvnList = lvnList . stream ( ) . filter ( lvn -> lvn . index == idx ) // filter to lvns at the index we want
. filter ( lvn -> { // ... |
public class Parameters { /** * Returns { @ link Parameter } instances with effectively all special parameters removed .
* @ return */
private List < P > createBindableParameters ( ) { } } | List < P > bindables = new ArrayList < > ( parameters . size ( ) ) ; for ( P parameter : parameters ) { if ( parameter . isBindable ( ) ) { bindables . add ( parameter ) ; } } return bindables ; |
public class Alias { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . sib . processor . runtime . SIMPAliasControllable # isReceiveAllowed ( ) */
public boolean isReceiveAllowed ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isReceiveAllowed" ) ; boolean isReceiveAllowed = aliasDest . isReceiveAllowed ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "isReceiveAllowed" , new Boolean ( isReceive... |
public class XPathParser { /** * Parses the the rule ElementNameOrWildcard according to the following
* production rule :
* [ 64 ] ElementNameOrWildcard : : = ElementName | " * " .
* @ return name */
private String parseElementNameOrWildcard ( ) { } } | String name ; if ( is ( TokenType . STAR , true ) ) { name = mToken . getContent ( ) ; } else { name = parseElementName ( ) ; } return name ; |
public class PaxPropertySetter { /** * Convert < code > val < / code > a String parameter to an object of a
* given type . */
protected Object convertArg ( String val , Class type ) { } } | if ( val == null ) return null ; String v = val . trim ( ) ; if ( String . class . isAssignableFrom ( type ) ) { return val ; } else if ( Integer . TYPE . isAssignableFrom ( type ) ) { return new Integer ( v ) ; } else if ( Long . TYPE . isAssignableFrom ( type ) ) { return new Long ( v ) ; } else if ( Boolean . TYPE .... |
public class DateUtils { /** * Return string describing the time until / elapsed time since ' time ' formatted like
* " [ relative time / date ] , [ time ] " .
* See { @ link android . text . format . DateUtils # getRelativeDateTimeString } for full docs .
* @ param context the context
* @ param time some time ... | Resources r = context . getResources ( ) ; // We set the millis to 0 so we aren ' t off by a fraction of a second when counting duration
DateTime now = DateTime . now ( time . getZone ( ) ) . withMillisOfSecond ( 0 ) ; DateTime timeDt = new DateTime ( time ) . withMillisOfSecond ( 0 ) ; boolean past = ! now . isBefore ... |
public class Node { /** * Comparable */
@ Override public int compareTo ( Node other ) { } } | final double f = getHeuristic ( ) + getCost ( ) ; final double of = other . getHeuristic ( ) + other . getCost ( ) ; return Double . compare ( f , of ) ; |
public class AnalysisContext { /** * file a ClassNotFoundException with the lookupFailureCallback
* @ see # getLookupFailureCallback ( ) */
static public void reportMissingClass ( ClassNotFoundException e ) { } } | requireNonNull ( e , "argument is null" ) ; String missing = AbstractBugReporter . getMissingClassName ( e ) ; if ( skipReportingMissingClass ( missing ) ) { return ; } if ( ! analyzingApplicationClass ( ) ) { return ; } RepositoryLookupFailureCallback lookupFailureCallback = getCurrentLookupFailureCallback ( ) ; if ( ... |
public class SivMode { /** * Code taken from { @ link org . bouncycastle . crypto . macs . CMac } */
static byte [ ] dbl ( byte [ ] in ) { } } | byte [ ] ret = new byte [ in . length ] ; int carry = shiftLeft ( in , ret ) ; int xor = 0xff & DOUBLING_CONST ; /* * NOTE : This construction is an attempt at a constant - time implementation . */
int mask = ( - carry ) & 0xff ; ret [ in . length - 1 ] ^= xor & mask ; return ret ; |
public class SortedGrouping { /** * Sorts { @ link Tuple } elements within a group on the specified field in the specified { @ link Order } . < / br >
* < b > Note : Only groups of Tuple elements can be sorted . < / b > < br / >
* Groups can be sorted by multiple fields by chaining { @ link # sortGroup ( int , Orde... | int pos ; if ( ! dataSet . getType ( ) . isTupleType ( ) ) { throw new InvalidProgramException ( "Specifying order keys via field positions is only valid for tuple data types" ) ; } if ( field >= dataSet . getType ( ) . getArity ( ) ) { throw new IllegalArgumentException ( "Order key out of tuple bounds." ) ; } int new... |
public class DataSet { /** * Applies a Map - style operation to the entire partition of the data .
* The function is called once per parallel partition of the data ,
* and the entire partition is available through the given Iterator .
* The number of elements that each instance of the MapPartition function
* se... | if ( mapPartition == null ) { throw new NullPointerException ( "MapPartition function must not be null." ) ; } String callLocation = Utils . getCallLocationName ( ) ; TypeInformation < R > resultType = TypeExtractor . getMapPartitionReturnTypes ( mapPartition , getType ( ) , callLocation , true ) ; return new MapPartit... |
public class CmsSitemapToolbar { /** * Enables / disables the new menu button . < p >
* @ param enabled < code > true < / code > to enable the button
* @ param disabledReason the reason , why the button is disabled */
public void setNewEnabled ( boolean enabled , String disabledReason ) { } } | if ( enabled ) { m_newMenuButton . enable ( ) ; } else { m_newMenuButton . disable ( disabledReason ) ; } |
public class CloudMe { /** * Creates folder with given path , with required intermediate folders .
* @ param cmRoot contains the whole folders structure
* @ param cpath path of folder to create
* @ return the createdfolder corresponding to targeted cpath
* @ throws CInvalidFileTypeException if a blob exists alo... | List < String > baseNames = cpath . split ( ) ; CMFolder currentFolder = cmRoot ; CMFolder childFolder = null ; boolean firstFolderCreation = true ; for ( String baseName : baseNames ) { childFolder = currentFolder . getChildByName ( baseName ) ; if ( childFolder == null ) { // Intermediate folder does not exist : has ... |
public class CosmosDbObjectFactory { /** * Create document db factory .
* @ param properties the properties
* @ return the document db factory */
public DocumentDbFactory createDocumentDbFactory ( final BaseCosmosDbProperties properties ) { } } | val documentClient = createDocumentClient ( properties ) ; return new DocumentDbFactory ( documentClient ) ; |
public class ApiOvhOrder { /** * Get allowed durations for ' new ' option
* REST : GET / order / license / virtuozzo / new
* @ param version [ required ] This license version
* @ param ip [ required ] Ip on which this license would be installed
* @ param containerNumber [ required ] How much container is this l... | String qPath = "/order/license/virtuozzo/new" ; StringBuilder sb = path ( qPath ) ; query ( sb , "containerNumber" , containerNumber ) ; query ( sb , "ip" , ip ) ; query ( sb , "serviceType" , serviceType ) ; query ( sb , "version" , version ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return c... |
public class GeometryUtil { /** * Return the RMSD of bonds length between the 2 aligned molecules .
* @ param firstAtomContainer the ( largest ) first aligned AtomContainer which is the reference
* @ param secondAtomContainer the second aligned AtomContainer
* @ param mappedAtoms Map : a Map of the mapped atoms
... | // logger . debug ( " * * * * GT getBondLengthRMSD * * * * " ) ;
Iterator < Integer > firstAtoms = mappedAtoms . keySet ( ) . iterator ( ) ; IAtom centerAtomFirstMolecule ; IAtom centerAtomSecondMolecule ; List < IAtom > connectedAtoms ; double sum = 0 ; double n = 0 ; double distance1 = 0 ; double distance2 = 0 ; setV... |
public class PreferencesFx { /** * Unregisters a previously registered event handler from the model . One handler might have been
* registered for different event types , so the caller needs to specify the particular event type
* from which to unregister the handler .
* @ param eventType the event type from which... | preferencesFxModel . removeEventHandler ( eventType , eventHandler ) ; return this ; |
public class FieldLevelEncryptionList { /** * An array of field - level encryption items .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setItems ( java . util . Collection ) } or { @ link # withItems ( java . util . Collection ) } if you want to override t... | if ( this . items == null ) { setItems ( new com . amazonaws . internal . SdkInternalList < FieldLevelEncryptionSummary > ( items . length ) ) ; } for ( FieldLevelEncryptionSummary ele : items ) { this . items . add ( ele ) ; } return this ; |
public class DefaultDatastoreReader { /** * Executes the given { @ link EntityQueryRequest } and returns the response .
* @ param expectedResultType
* the expected type of results .
* @ param request
* the entity query request
* @ return the query response */
public < E > QueryResponse < E > executeEntityQuer... | try { GqlQuery . Builder < Entity > queryBuilder = Query . newGqlQueryBuilder ( ResultType . ENTITY , request . getQuery ( ) ) ; queryBuilder . setNamespace ( entityManager . getEffectiveNamespace ( ) ) ; queryBuilder . setAllowLiteral ( request . isAllowLiterals ( ) ) ; QueryUtils . applyNamedBindings ( queryBuilder ,... |
public class NewSarlProjectWizard { /** * Replies the default group id for a maven project .
* @ return the default group id , never { @ code null } nor empty string . */
@ SuppressWarnings ( "static-method" ) protected String getDefaultMavenGroupId ( ) { } } | final String userdomain = System . getenv ( "userdomain" ) ; // $ NON - NLS - 1 $
if ( Strings . isNullOrEmpty ( userdomain ) ) { return "com.foo" ; // $ NON - NLS - 1 $
} final String [ ] elements = userdomain . split ( Pattern . quote ( "." ) ) ; // $ NON - NLS - 1 $
final StringBuilder groupId = new StringBuilder ( ... |
public class PlatformLevel { /** * Add a component to container only if clustering is enabled .
* @ throws IllegalStateException if called from PlatformLevel1 , when cluster settings are not loaded */
AddIfCluster addIfCluster ( Object ... objects ) { } } | if ( addIfCluster == null ) { addIfCluster = new AddIfCluster ( ! getWebServer ( ) . isStandalone ( ) ) ; } addIfCluster . ifAdd ( objects ) ; return addIfCluster ; |
public class StylesheetHandler { /** * Warn the user of an problem .
* @ param msg An key into the { @ link org . apache . xalan . res . XSLTErrorResources }
* table , that is one of the WG _ prefixed definitions .
* @ param args An array of arguments for the given warning .
* @ throws org . xml . sax . SAXExce... | String formattedMsg = XSLMessages . createWarning ( msg , args ) ; SAXSourceLocator locator = getLocator ( ) ; ErrorListener handler = m_stylesheetProcessor . getErrorListener ( ) ; try { if ( null != handler ) handler . warning ( new TransformerException ( formattedMsg , locator ) ) ; } catch ( TransformerException te... |
public class WorkspaceConfiguration { /** * Adds a user , with the specified username and role .
* @ param username the username ( e . g . an e - mail address )
* @ param role the user ' s role */
public void addUser ( String username , Role role ) { } } | if ( StringUtils . isNullOrEmpty ( username ) ) { throw new IllegalArgumentException ( "A username must be specified." ) ; } if ( role == null ) { throw new IllegalArgumentException ( "A role must be specified." ) ; } users . add ( new User ( username , role ) ) ; |
public class HttpChannelConfig { /** * Check the input configuration to decide whether to enforce a strict RFC
* compliance while parsing URLs .
* @ param props */
private void parseStrictURLFormat ( Map < Object , Object > props ) { } } | Object value = props . get ( HttpConfigConstants . PROPNAME_STRICT_URL_FORMAT ) ; if ( null != value ) { this . bStrictURLFormat = convertBoolean ( value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config: Strict URL formatting is " + isStrictURLFormat ( ) ) ; } } |
public class RemoteCacheProducer { /** * Produces the remote cache .
* @ param injectionPoint the injection point .
* @ param < K > the type of the key .
* @ param < V > the type of the value .
* @ return the remote cache instance . */
@ Remote @ Produces public < K , V > RemoteCache < K , V > getRemoteCache ( ... | final Set < Annotation > qualifiers = injectionPoint . getQualifiers ( ) ; final RemoteCacheManager cacheManager = getRemoteCacheManager ( qualifiers . toArray ( new Annotation [ 0 ] ) ) ; final Remote remote = getRemoteAnnotation ( injectionPoint . getAnnotated ( ) ) ; if ( remote != null && ! remote . value ( ) . isE... |
public class PropertyType { /** * Returns the name of the specified < code > type < / code > .
* @ param type the property type
* @ return the name of the specified < code > type < / code >
* @ throws IllegalArgumentException if < code > type < / code > is not a valid
* property type . */
public static String n... | switch ( type ) { case SIMPLE_REFERENCE : return TYPENAME_SIMPLE_REFERENCE ; default : return javax . jcr . PropertyType . nameFromValue ( type ) ; } |
public class ReflectionHelper { /** * This is recursive with searchClassAndSuperClassesForField */
public JFieldVar searchSuperClassesForField ( String property , JDefinedClass jclass ) { } } | JClass superClass = jclass . _extends ( ) ; JDefinedClass definedSuperClass = definedClassOrNullFromType ( superClass ) ; if ( definedSuperClass == null ) { return null ; } return searchClassAndSuperClassesForField ( property , definedSuperClass ) ; |
public class CardAPI { /** * 更改Code
* @ param accessToken accessToken
* @ param codeUpdate codeUpdate
* @ return result */
public static BaseResult codeUpdate ( String accessToken , CodeUpdate codeUpdate ) { } } | return codeUpdate ( accessToken , JsonUtil . toJSONString ( codeUpdate ) ) ; |
public class DefaultAlertService { /** * Evaluates all triggers associated with the missing data notification and updates the job history . */
private void _processMissingDataNotification ( Alert alert , History history , Set < Trigger > triggers , Notification notification , boolean isDataMissing , Long alertEnqueueTi... | // refocus notifier does not need cool down logic , and every evaluation needs to send notification
boolean isRefocusNotifier = SupportedNotifier . REFOCUS . getName ( ) . equals ( notification . getNotifierName ( ) ) ; for ( Trigger trigger : notification . getTriggers ( ) ) { if ( triggers . contains ( trigger ) ) { ... |
public class HeartbeatTask { /** * Publish the heartbeat event with current health status . */
@ Scheduled ( fixedDelay = "${micronaut.heartbeat.interval:15s}" , initialDelay = "${micronaut.heartbeat.initial-delay:5s}" ) public void pulsate ( ) { } } | ServiceInstance instance = eventReference . get ( ) ; if ( instance != null ) { eventPublisher . publishEvent ( new HeartbeatEvent ( instance , currentHealthStatus . current ( ) ) ) ; } |
public class SQLiteRepository { /** * Generate the SQL definition for a column .
* @ param builder current StringBuilder to add the SQL definition .
* @ param column column definition . */
private void addColumn ( StringBuilder builder , Column column ) { } } | builder . append ( column . getColumnName ( ) ) ; builder . append ( " " ) ; builder . append ( column . getDataType ( ) . getType ( ) ) ; Boolean optional = column . isOptional ( ) ; if ( optional != null ) { builder . append ( optional ? " NULL" : " NOT NULL" ) ; } String extraQualifier = column . getExtraQualifier (... |
public class DescribeEndpointResult { /** * An array of < a > ProductionVariantSummary < / a > objects , one for each model hosted behind this endpoint .
* @ param productionVariants
* An array of < a > ProductionVariantSummary < / a > objects , one for each model hosted behind this endpoint . */
public void setPro... | if ( productionVariants == null ) { this . productionVariants = null ; return ; } this . productionVariants = new java . util . ArrayList < ProductionVariantSummary > ( productionVariants ) ; |
public class DescendantSelfAxisQuery { /** * { @ inheritDoc } */
@ Override public void extractTerms ( Set < Term > terms ) { } } | contextQuery . extractTerms ( terms ) ; subQuery . extractTerms ( terms ) ; |
public class Journal { /** * Close the journal .
* @ throws IOException */
public synchronized void close ( ) throws IOException { } } | if ( ! opened ) { return ; } opened = false ; accessor . close ( ) ; appender . close ( ) ; hints . clear ( ) ; inflightWrites . clear ( ) ; if ( managedWriter ) { ( ( ExecutorService ) writer ) . shutdown ( ) ; writer = null ; } if ( managedDisposer ) { disposer . shutdown ( ) ; disposer = null ; } |
public class NFA { /** * Extracts all the sequences of events from the start to the given computation state . An event
* sequence is returned as a map which contains the events and the names of the states to which
* the events were mapped .
* @ param sharedBufferAccessor The accessor to { @ link SharedBuffer } fr... | if ( computationState . getPreviousBufferEntry ( ) == null ) { return new HashMap < > ( ) ; } List < Map < String , List < EventId > > > paths = sharedBufferAccessor . extractPatterns ( computationState . getPreviousBufferEntry ( ) , computationState . getVersion ( ) ) ; if ( paths . isEmpty ( ) ) { return new HashMap ... |
public class CmsDefaultFileNameGenerator { /** * Checks the given pattern for the number macro . < p >
* @ param pattern the pattern to check
* @ return < code > true < / code > if the pattern contains the macro */
public static boolean hasNumberMacro ( String pattern ) { } } | // check both macro variants
return hasNumberMacro ( pattern , "" + I_CmsMacroResolver . MACRO_DELIMITER + I_CmsMacroResolver . MACRO_START , "" + I_CmsMacroResolver . MACRO_END ) || hasNumberMacro ( pattern , "" + I_CmsMacroResolver . MACRO_DELIMITER_OLD + I_CmsMacroResolver . MACRO_START_OLD , "" + I_CmsMacroResolver... |
public class JsBusImpl { /** * ( non - Javadoc )
* @ see
* com . ibm . ws . sib . admin . JsBus # getSIBDestinationLocalitySet ( java . lang . String ,
* java . lang . String ) */
public Set getSIBDestinationLocalitySet ( String busName , String uuid ) throws SIBExceptionBase { } } | return getDestinationCache ( ) . getSIBDestinationLocalitySet ( busName , uuid ) ; |
public class FileUtils { /** * Returns another file just like the input but with a different extension . If the input file has
* an extension ( a suffix beginning with " . " ) , everything after the . is replaced with
* newExtension . Otherwise , a newExtension is appended to the filename and a new File is returned... | checkNotNull ( f ) ; checkNotNull ( newExtension ) ; Preconditions . checkArgument ( ! f . isDirectory ( ) ) ; final String absolutePath = f . getAbsolutePath ( ) ; final int dotIndex = absolutePath . lastIndexOf ( "." ) ; String basePath ; if ( dotIndex >= 0 ) { basePath = absolutePath . substring ( 0 , dotIndex ) ; }... |
public class AbstractNodeVisitor { /** * Helper to visit all the children of a node , in order .
* @ param node The parent node whose children to visit .
* @ see # visitChildrenAllowingConcurrentModification */
protected void visitChildren ( ParentNode < ? extends N > node ) { } } | List < ? extends N > children = node . getChildren ( ) ; int size = children . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { visit ( children . get ( i ) ) ; } |
public class Tuple15 { /** * Skip 9 degrees from this tuple . */
public final Tuple6 < T10 , T11 , T12 , T13 , T14 , T15 > skip9 ( ) { } } | return new Tuple6 < > ( v10 , v11 , v12 , v13 , v14 , v15 ) ; |
public class FunctionSQL { /** * Returns a String representation of this object . < p > */
@ Override public String describe ( Session session , int blanks ) { } } | StringBuffer sb = new StringBuffer ( ) ; sb . append ( '\n' ) ; for ( int i = 0 ; i < blanks ; i ++ ) { sb . append ( ' ' ) ; } sb . append ( "FUNCTION " ) . append ( "=[\n" ) ; sb . append ( name ) . append ( "(" ) ; for ( int i = 0 ; i < nodes . length ; i ++ ) { if ( nodes [ i ] != null ) { sb . append ( "[" ) . app... |
public class XConstructor { /** * Checks if annoated parameters match method parameters .
* @ throws IllegalArgumentException
* If annotated parameters do not match method parameters . */
private void check ( ) { } } | final Constructor < ? > constructor = getConstructor ( ) ; final XParameter [ ] parameters = getParameters ( ) ; final Class < ? > [ ] parameterTypes = constructor . getParameterTypes ( ) ; Validate . isTrue ( parameters . length == parameterTypes . length , "Wrong number of parameters: [" + parameters . length + "], e... |
public class ButterKnife { /** * BindView annotated fields and methods in the specified { @ link View } . The view and its children
* are used as the view root .
* @ param target Target view for view binding . */
@ NonNull @ UiThread public static Unbinder bind ( @ NonNull View target ) { } } | return bind ( target , target ) ; |
public class FsCrawlerUtil { /** * We check if we can index the file or if we should ignore it
* @ param filename The filename to scan
* @ param excludes exclude rules , may be empty not null */
public static boolean isExcluded ( String filename , List < String > excludes ) { } } | logger . debug ( "filename = [{}], excludes = [{}]" , filename , excludes ) ; // No rules ? Fine , we index everything
if ( excludes == null || excludes . isEmpty ( ) ) { logger . trace ( "no rules" ) ; return false ; } // Exclude rules : we know that whatever includes rules are , we should exclude matching files
for (... |
public class FTPUploader { /** * Upload a single file to FTP server with the provided FTP client object .
* @ param sourceFilePath
* @ param targetFilePath
* @ param logPrefix
* @ throws IOException */
protected void uploadFile ( final FTPClient ftpClient , final String sourceFilePath , final String targetFileP... | log . info ( String . format ( UPLOAD_FILE , logPrefix , sourceFilePath , targetFilePath ) ) ; final File sourceFile = new File ( sourceFilePath ) ; try ( final InputStream is = new FileInputStream ( sourceFile ) ) { ftpClient . changeWorkingDirectory ( targetFilePath ) ; ftpClient . storeFile ( sourceFile . getName ( ... |
public class NetUtil { /** * 在范围里随机找一个空闲端口 , from Spring SocketUtils .
* @ throws IllegalStateException 最多尝试 ( maxPort - minPort ) 次 , 如无空闲端口 , 抛出此异常 . */
public static int findRandomAvailablePort ( int minPort , int maxPort ) { } } | int portRange = maxPort - minPort ; int candidatePort ; int searchCounter = 0 ; do { if ( ++ searchCounter > portRange ) { throw new IllegalStateException ( String . format ( "Could not find an available tcp port in the range [%d, %d] after %d attempts" , minPort , maxPort , searchCounter ) ) ; } candidatePort = minPor... |
public class Util { private void printInstanceNames ( ) { } } | try { System . out . println ( "Instance name defined in database for server PowerSupply :" ) ; final String [ ] instnames = ApiUtil . get_db_obj ( ) . get_instance_name_list ( ds_exec_name ) ; for ( final String instname : instnames ) { System . out . println ( "\t" + instname ) ; } } catch ( final DevFailed e ) { Exc... |
public class DescribeModelPackageRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DescribeModelPackageRequest describeModelPackageRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( describeModelPackageRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeModelPackageRequest . getModelPackageName ( ) , MODELPACKAGENAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to mars... |
public class DefaultSessionFactory { /** * Creates a session and ensures schema if configured . Closes the cluster and session if any
* exception occurred . */
@ Override public Session create ( CassandraStorage cassandra ) { } } | Closer closer = Closer . create ( ) ; try { Cluster cluster = closer . register ( buildCluster ( cassandra ) ) ; cluster . register ( new QueryLogger . Builder ( ) . build ( ) ) ; Session session ; String keyspace = cassandra . keyspace ( ) ; if ( cassandra . ensureSchema ( ) ) { session = closer . register ( cluster .... |
public class SectionNumber { /** * Change this version number from the given string representation .
* < p > The string representation should be integer numbers , separated by dot characters .
* @ param sectionNumber the string representation of the version number .
* @ param level is the level at which the secti... | assert level >= 1 ; final String [ ] numbers = sectionNumber . split ( "[^0-9]+" ) ; // $ NON - NLS - 1 $
final int len = Math . max ( 0 , this . numbers . size ( ) - numbers . length ) ; for ( int i = 0 ; i < len ; ++ i ) { this . numbers . removeLast ( ) ; } for ( int i = 0 ; i < numbers . length && i < level ; ++ i ... |
public class SpriteManager { /** * Finds the sprite with the highest render order that hits the specified pixel .
* @ param x the x ( screen ) coordinate to be checked
* @ param y the y ( screen ) coordinate to be checked
* @ return the highest sprite hit */
public Sprite getHighestHitSprite ( int x , int y ) { }... | // since they ' re stored in lowest - > highest order . .
for ( int ii = _sprites . size ( ) - 1 ; ii >= 0 ; ii -- ) { Sprite sprite = _sprites . get ( ii ) ; if ( sprite . hitTest ( x , y ) ) { return sprite ; } } return null ; |
public class UpdateDeviceStateRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdateDeviceStateRequest updateDeviceStateRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( updateDeviceStateRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateDeviceStateRequest . getDeviceId ( ) , DEVICEID_BINDING ) ; protocolMarshaller . marshall ( updateDeviceStateRequest . getEnabled ( ) , ENABLED_BINDING ) ... |
public class Vector { /** * Subtracts the given { @ link Vector } from this < code > Vector < / code > .
* @ param v the vector to subtract */
public void subtract ( Vector v ) { } } | x = x - v . x ; y = y - v . y ; z = z - v . z ; |
public class ColumnSchema { /** * Returns SQL for default value . */
public String getDefaultSQL ( ) { } } | String ddl = null ; ddl = defaultExpression == null ? null : defaultExpression . getSQL ( ) ; return ddl ; |
public class StandardSpawnService { /** * Replies the registered agent .
* @ param id
* is the identifier of the agent .
* @ return the registered agent , or < code > null < / code > . */
Agent getAgent ( UUID id ) { } } | assert id != null ; synchronized ( getAgentRepositoryMutex ( ) ) { return this . agents . get ( id ) ; } |
public class JsonParser { /** * { @ link Beta } < br >
* Parse a JSON Array from the given JSON parser ( which is closed after parsing completes ) into
* the given destination collection , optionally using the given parser customizer .
* @ param destinationCollectionClass class of destination collection ( must ha... | try { return parseArray ( destinationCollectionClass , destinationItemClass , customizeParser ) ; } finally { close ( ) ; } |
public class JdonConstructorInjectionComponentAdapter { /** * overide InstantiatingComponentAdapter ' s newInstance */
protected Object newInstance ( Constructor constructor , Object [ ] parameters ) throws InstantiationException , IllegalAccessException , InvocationTargetException { } } | if ( allowNonPublicClasses ) { constructor . setAccessible ( true ) ; } Object o = constructor . newInstance ( parameters ) ; ComponentAdvsior componentAdvsior = ( ComponentAdvsior ) configInfo . getContainerWrapper ( ) . lookup ( ComponentAdvsior . NAME ) ; Object proxy = null ; if ( componentAdvsior != null ) proxy =... |
public class FTPFileSystem { /** * Convenience method , so that we don ' t open a new connection when using this
* method from within another method . Otherwise every API invocation incurs
* the overhead of opening / closing a TCP connection . */
private boolean delete ( FTPClient client , Path file , boolean recur... | Path workDir = new Path ( client . printWorkingDirectory ( ) ) ; Path absolute = makeAbsolute ( workDir , file ) ; String pathName = absolute . toUri ( ) . getPath ( ) ; FileStatus fileStat = getFileStatus ( client , absolute ) ; if ( ! fileStat . isDir ( ) ) { return client . deleteFile ( pathName ) ; } FileStatus [ ]... |
public class ClassDefinitionAction { /** * { @ inheritDoc } */
public Class < ? > run ( ) { } } | int packageIndex = name . lastIndexOf ( '.' ) ; if ( packageIndex != - 1 ) { String packageName = name . substring ( 0 , packageIndex ) ; PackageDefinitionStrategy . Definition definition = packageDefinitionStrategy . define ( ByteArrayClassLoader . this , packageName , name ) ; if ( definition . isDefined ( ) ) { Pack... |
public class TurtleSerializer { /** * Serialize a FedoraEvent in RDF using Turtle syntax
* @ param evt the Fedora event
* @ return a string of RDF , using Turtle syntax */
@ Override public String serialize ( final FedoraEvent evt ) { } } | try { final Model model = EventSerializer . toModel ( evt ) ; final ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; model . write ( out , "TTL" ) ; return out . toString ( "UTF-8" ) ; } catch ( final UnsupportedEncodingException ex ) { throw new RepositoryRuntimeException ( ex ) ; } |
public class BitcoinSerializer { /** * Deserialize payload only . You must provide a header , typically obtained by calling
* { @ link BitcoinSerializer # deserializeHeader } . */
@ Override public Message deserializePayload ( BitcoinPacketHeader header , ByteBuffer in ) throws ProtocolException , BufferUnderflowExce... | byte [ ] payloadBytes = new byte [ header . size ] ; in . get ( payloadBytes , 0 , header . size ) ; // Verify the checksum .
byte [ ] hash ; hash = Sha256Hash . hashTwice ( payloadBytes ) ; if ( header . checksum [ 0 ] != hash [ 0 ] || header . checksum [ 1 ] != hash [ 1 ] || header . checksum [ 2 ] != hash [ 2 ] || h... |
public class Line { /** * Get a list of LatLng for the line , which represents the locations of the line on the map
* @ return a list of the locations of the line in a latitude and longitude pairs */
@ NonNull public List < LatLng > getLatLngs ( ) { } } | LineString lineString = ( LineString ) geometry ; List < LatLng > latLngs = new ArrayList < > ( ) ; for ( Point point : lineString . coordinates ( ) ) { latLngs . add ( new LatLng ( point . latitude ( ) , point . longitude ( ) ) ) ; } return latLngs ; |
public class OutputArchive { /** * Creates a new < code > OutputArchive < / code > that writes to the specified
* < code > OutputStream < / code > .
* @ param stream The < code > OutputStream < / code > to be written to .
* @ return The new < code > OutputArchive < / code > .
* @ throws IOException If unable to... | if ( stream instanceof ObjectOutput ) { return new OutputArchive ( ( ObjectOutput ) stream ) ; } else { return new OutputArchive ( new ObjectOutputStream ( stream ) ) ; } |
public class PolygonExpression { /** * Returns the N th interior ring for this Polygon as a LineString .
* @ param idx one based index
* @ return interior ring at index */
public LineStringExpression < LineString > interiorRingN ( int idx ) { } } | return GeometryExpressions . lineStringOperation ( SpatialOps . INTERIOR_RINGN , mixin , ConstantImpl . create ( idx ) ) ; |
public class CmsStaticExportManager { /** * Shuts down all this static export manager . < p >
* This is required since there may still be a thread running when the system is being shut down . < p > */
public synchronized void shutDown ( ) { } } | int count = 0 ; // if the handler is still running , we must wait up to 30 seconds until it is finished
while ( ( count < HANDLER_FINISH_TIME ) && m_handler . isBusy ( ) ) { count ++ ; try { if ( CmsLog . INIT . isInfoEnabled ( ) ) { CmsLog . INIT . info ( Messages . get ( ) . getBundle ( ) . key ( Messages . INIT_STAT... |
public class AssociationKey { /** * Returns the value of the given column if part of this key . Use { @ link AssociationKeyMetadata # isKeyColumn ( String ) }
* to check whether a given column is part of this key prior to invoking this method .
* @ param columnName the name of interest
* @ return the value of the... | for ( int i = 0 ; i < getColumnNames ( ) . length ; i ++ ) { String name = getColumnNames ( ) [ i ] ; if ( name . equals ( columnName ) ) { return getColumnValues ( ) [ i ] ; } } throw new AssertionFailure ( String . format ( "Given column %s is not part of this key: %s" , columnName , this . toString ( ) ) ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.