signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class Vector3d { /** * ( non - Javadoc )
* @ see org . joml . Vector3dc # absolute ( org . joml . Vector3d ) */
public Vector3d absolute ( Vector3d dest ) { } } | dest . x = Math . abs ( this . x ) ; dest . y = Math . abs ( this . y ) ; dest . z = Math . abs ( this . z ) ; return dest ; |
public class pqpolicy { /** * Use this API to update pqpolicy . */
public static base_response update ( nitro_service client , pqpolicy resource ) throws Exception { } } | pqpolicy updateresource = new pqpolicy ( ) ; updateresource . policyname = resource . policyname ; updateresource . weight = resource . weight ; updateresource . qdepth = resource . qdepth ; updateresource . polqdepth = resource . polqdepth ; return updateresource . update_resource ( client ) ; |
public class SqlHelper { /** * < bind name = " pattern " value = " ' % ' + _ parameter . getTitle ( ) + ' % ' " / >
* @ param column
* @ return */
public static String getIfCacheNotNull ( EntityColumn column , String contents ) { } } | StringBuilder sql = new StringBuilder ( ) ; sql . append ( "<if test=\"" ) . append ( column . getProperty ( ) ) . append ( "_cache != null\">" ) ; sql . append ( contents ) ; sql . append ( "</if>" ) ; return sql . toString ( ) ; |
public class JingleTransport { /** * Get the list of candidates .
* @ return The candidates list . */
public List < JingleTransportCandidate > getCandidatesList ( ) { } } | ArrayList < JingleTransportCandidate > res ; synchronized ( candidates ) { res = new ArrayList < > ( candidates ) ; } return res ; |
public class UniverseApi { /** * Get structure information ( asynchronously ) Returns information on
* requested structure if you are on the ACL . Otherwise , returns
* \ & quot ; Forbidden \ & quot ; for all inputs . - - - This route is cached for up
* to 3600 seconds
* @ param structureId
* An Eve structure... | com . squareup . okhttp . Call call = getUniverseStructuresStructureIdValidateBeforeCall ( structureId , datasource , ifNoneMatch , token , callback ) ; Type localVarReturnType = new TypeToken < StructureResponse > ( ) { } . getType ( ) ; apiClient . executeAsync ( call , localVarReturnType , callback ) ; return call ; |
public class CitrusArchiveBuilder { /** * Resolve artifacts for given coordinates .
* @ return */
public File [ ] build ( ) { } } | MavenStrategyStage maven = Maven . configureResolver ( ) . workOffline ( offline ) . resolve ( artifactCoordinates ) ; return applyTransitivity ( maven ) . asFile ( ) ; |
public class SanitizedContents { /** * Wraps an assumed - safe constant string . */
@ SuppressWarnings ( "ReferenceEquality" ) // need to use a reference check to ensure it is a constant
private static SanitizedContent fromConstant ( @ CompileTimeConstant final String constant , ContentKind kind , @ Nullable Dir dir ) ... | // Extra runtime check in case the compile - time check doesn ' t work .
Preconditions . checkArgument ( constant . intern ( ) == constant , "The provided argument does not look like a compile-time constant." ) ; return SanitizedContent . create ( constant , kind , dir ) ; |
public class WPopupRenderer { /** * Paints the given WPopup .
* @ param component the WPopup to paint .
* @ param renderContext the RenderContext to paint to . */
@ Override public void doRender ( final WComponent component , final WebXmlRenderContext renderContext ) { } } | WPopup popup = ( WPopup ) component ; XmlStringBuilder xml = renderContext . getWriter ( ) ; int width = popup . getWidth ( ) ; int height = popup . getHeight ( ) ; String targetWindow = popup . getTargetWindow ( ) ; xml . appendTagOpen ( "ui:popup" ) ; xml . appendUrlAttribute ( "url" , popup . getUrl ( ) ) ; xml . ap... |
public class TypeResolver { /** * Resolves the type argument for the { @ code genericType } using type variable information from the
* { @ code sourceType } . If { @ code genericType } is an instance of class , then { @ code genericType } is
* returned . If no arguments can be resolved then { @ code Unknown . class... | Class < ? > [ ] arguments = resolveArguments ( genericType , targetType ) ; if ( arguments == null ) return Unknown . class ; if ( arguments . length != 1 ) throw new IllegalArgumentException ( "Expected 1 type argument on generic type " + targetType . getName ( ) + " but found " + arguments . length ) ; return argumen... |
public class FastDateFormat { /** * < p > Formats a < code > Date < / code > object into the
* supplied < code > StringBuffer < / code > . < / p >
* @ param date the date to format
* @ param buf the buffer to format into
* @ return the specified string buffer */
public StringBuffer format ( Date date , StringBu... | Calendar c = new GregorianCalendar ( mTimeZone ) ; c . setTime ( date ) ; return applyRules ( c , buf ) ; |
public class TaskRouterResource { /** * Converts a resource to JSON .
* @ return JSON representation of the resource
* @ throws IOException if unable to transform to JSON */
public String toJson ( ) throws IOException { } } | ObjectMapper mapper = new ObjectMapper ( ) ; ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; mapper . writeValue ( out , this ) ; return out . toString ( ) ; |
public class PlotCanvas { /** * Zooms in / out the plot .
* @ param inout true if zoom in . Otherwise , zoom out . */
public void zoom ( boolean inout ) { } } | for ( int i = 0 ; i < base . dimension ; i ++ ) { int s = baseGrid . getAxis ( i ) . getLinearSlices ( ) ; double r = inout ? - 1.0 / s : 1.0 / s ; double d = ( base . upperBound [ i ] - base . lowerBound [ i ] ) * r ; base . lowerBound [ i ] -= d ; base . upperBound [ i ] += d ; } for ( int i = 0 ; i < base . dimensio... |
public class NiceTable { /** * Adds a header row to the table . can be used to give a table some title .
* < pre >
* addHeader ( & quot ; hello & quot ; , ' . ' , NiceTable . LEFT )
* would produce a row like
* . . . hello . . . . .
* { rows in here . }
* < / pre >
* @ param title
* the string to displa... | final Header header = new Header ( title , mark , orientation , this ) ; rows . add ( header ) ; |
public class TreeCoreset { /** * tests if a node is a leaf */
boolean isLeaf ( treeNode node ) { } } | if ( node . lc == null && node . rc == null ) { return true ; } else { return false ; } |
public class GVRPeriodicEngine { /** * Run a task periodically , with a callback .
* @ param task
* Task to run .
* @ param delay
* The first execution will happen in { @ code delay } seconds .
* @ param period
* Subsequent executions will happen every { @ code period } seconds
* after the first .
* @ p... | validateDelay ( delay ) ; validatePeriod ( period ) ; return new Event ( task , delay , period , callback ) ; |
public class MainModule { /** * Provisioning of a RendererAdapter implementation to work with tv shows ListView . More
* information in this library : { @ link https : / / github . com / pedrovgs / Renderers } */
@ Provides protected RendererAdapter < TvShowViewModel > provideTvShowRendererAdapter ( LayoutInflater la... | return new RendererAdapter < TvShowViewModel > ( layoutInflater , tvShowCollectionRendererBuilder , tvShowCollectionViewModel ) ; |
public class OntologyRepositoryCollection { /** * Creates a { @ link OntologyTermNodePathMetadata } { @ link Entity } and stores it in the { @ link
* # nodePathRepository } .
* @ param container { @ link OWLClassContainer } for the path to the ontology term
* @ param ontologyTermNodePathText the node path
* @ r... | OntologyTermNodePath ontologyTermNodePath = ontologyTermNodePathFactory . create ( ) ; ontologyTermNodePath . setId ( idGenerator . generateId ( ) ) ; ontologyTermNodePath . setNodePath ( ontologyTermNodePathText ) ; ontologyTermNodePath . setRoot ( container . isRoot ( ) ) ; nodePathRepository . add ( ontologyTermNode... |
public class JAXBHandle { /** * Creates a factory to create a JAXBHandle instance for POJO instances
* of the specified classes .
* @ param pojoClassesthe POJO classes for which this factory provides a handle
* @ returnthe factory
* @ throws JAXBException if a JAXB error occurs while initializing the new factor... | if ( pojoClasses == null || pojoClasses . length == 0 ) return null ; return new JAXBHandleFactory ( pojoClasses ) ; |
public class AbstractTextViewAssert { public S hasTextScaleX ( float scale ) { } } | isNotNull ( ) ; float actualScale = actual . getTextScaleX ( ) ; assertThat ( actualScale ) . overridingErrorMessage ( "Expected text X scale <%s> but was <%s>." , scale , actualScale ) . isEqualTo ( scale ) ; return myself ; |
public class HttpTransportUtils { /** * 根据序列化名称获得序列化类型
* @ param serialization 序列化类型名称
* @ return 序列化编码 */
public static byte getSerializeTypeByName ( String serialization ) throws SofaRpcException { } } | String sz = serialization . toLowerCase ( ) ; Byte code ; if ( RpcConstants . SERIALIZE_HESSIAN2 . equals ( sz ) || RpcConstants . SERIALIZE_HESSIAN . equals ( sz ) ) { code = SerializerFactory . getCodeByAlias ( RpcConstants . SERIALIZE_HESSIAN2 ) ; } else { code = SerializerFactory . getCodeByAlias ( serialization ) ... |
public class Environment { /** * Adds Selenium cookies to response ' s cookie store .
* @ param response response to which cookies must be added . */
public void addSeleniumCookies ( HttpResponse response ) { } } | CookieStore cookieStore = ensureResponseHasCookieStore ( response ) ; CookieConverter converter = getCookieConverter ( ) ; Set < Cookie > browserCookies = getSeleniumHelper ( ) . getCookies ( ) ; converter . copySeleniumCookies ( browserCookies , cookieStore ) ; |
public class Util { /** * Return a StringArray resulting from decoding the given String which
* should have been encoded by encodeArray
* @ param val String value encoded by encodeArray
* @ return String [ ] decoded value */
public static String [ ] decodeArray ( final String val ) { } } | if ( val == null ) { return null ; } int len = val . length ( ) ; if ( len == 0 ) { return new String [ 0 ] ; } ArrayList < String > al = new ArrayList < String > ( ) ; int i = 0 ; while ( i < len ) { int end = val . indexOf ( " " , i ) ; String s ; if ( end < 0 ) { s = val . substring ( i ) ; i = len ; } else { s = va... |
public class ExtensionManager { /** * Print out information of all the plugins to stdout
* @ deprecated */
public void printAllExtensions ( ) { } } | Extension [ ] exts = getExtensionList ( ) ; System . out . println ( "There are totally " + exts . length + " plugin(s) registered." ) ; for ( int i = 0 ; i < exts . length ; i ++ ) { System . out . println ( "\n ---- Plugin # " + ( i + 1 ) + " ---- " ) ; System . out . println ( "Key: " + exts [ i ] . getKey ( ) ) ; S... |
public class LightMetaProperty { /** * Creates an instance from a { @ code Field } .
* @ param < P > the property type
* @ param metaBean the meta bean , not null
* @ param field the field , not null
* @ param constructorIndex the index of the property in the constructor
* @ return the property , not null */
... | MethodHandle getter ; try { getter = lookup . findGetter ( field . getDeclaringClass ( ) , field . getName ( ) , field . getType ( ) ) ; } catch ( IllegalArgumentException | NoSuchFieldException | IllegalAccessException ex ) { throw new UnsupportedOperationException ( "Property cannot be read: " + propertyName , ex ) ;... |
public class ServerService { /** * Add public IP to list servers
* @ param serverFilter server search criteria
* @ param publicIpConfig publicIp config
* @ return OperationFuture wrapper for list of ServerRef */
public OperationFuture < List < Server > > addPublicIp ( ServerFilter serverFilter , CreatePublicIpCon... | return addPublicIp ( Arrays . asList ( getRefsFromFilter ( serverFilter ) ) , publicIpConfig ) ; |
public class CmsGalleryController { /** * Returns the gallery folder info to the given path . < p >
* @ param galleryPath the gallery folder path
* @ return the gallery folder info */
public CmsGalleryFolderBean getGalleryInfo ( String galleryPath ) { } } | CmsGalleryFolderBean result = null ; for ( CmsGalleryFolderBean folderBean : getAvailableGalleries ( ) ) { if ( folderBean . getPath ( ) . equals ( galleryPath ) ) { result = folderBean ; break ; } } return result ; |
public class GeneralizedExtremeValueDistribution { /** * CDF of GEV distribution
* @ param val Value
* @ param mu Location parameter mu
* @ param sigma Scale parameter sigma
* @ param k Shape parameter k
* @ return CDF at position x . */
public static double cdf ( double val , double mu , double sigma , doubl... | final double x = ( val - mu ) / sigma ; if ( k > 0 || k < 0 ) { if ( k * x > 1 ) { return k > 0 ? 1 : 0 ; } return FastMath . exp ( - FastMath . exp ( FastMath . log ( 1 - k * x ) / k ) ) ; } else { // Gumbel case :
return FastMath . exp ( - FastMath . exp ( - x ) ) ; } |
public class COMUtil { /** * translate a Variant Object to Object , when it is a Dispatch translate it to COMWrapper
* @ param parent
* @ param variant
* @ param key
* @ return Object from Variant
* @ throws ExpressionException */
public static Object toObject ( COMObject parent , Variant variant , String key... | short type = variant . getvt ( ) ; // print . ln ( key + " - > variant . getvt ( " + toStringType ( type ) + " ) " ) ;
/* * TODO impl this Variant . VariantByref ; Variant . VariantError ; Variant . VariantTypeMask ; */
if ( type == Variant . VariantEmpty ) return null ; else if ( type == Variant . VariantNull ) return... |
public class MergeUtils { /** * Return if this path has been visited before .
* @ param path topic path , may contain a fragment
* @ return true if has been visited */
public boolean isVisited ( final URI path ) { } } | final URI localPath = stripFragment ( path ) . normalize ( ) ; return visitSet . contains ( localPath ) ; |
public class ApiOvhOrder { /** * Create order
* REST : POST / order / dedicated / server / { serviceName } / staticIP / { duration }
* @ param country [ required ] Ip localization
* @ param serviceName [ required ] The internal name of your dedicated server
* @ param duration [ required ] Duration */
public Ovh... | String qPath = "/order/dedicated/server/{serviceName}/staticIP/{duration}" ; StringBuilder sb = path ( qPath , serviceName , duration ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "country" , country ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return con... |
public class UrlIO { /** * Allows to add a single request property .
* @ param name
* @ param value
* @ return this for convenience . */
@ Scope ( DocScope . IO ) public UrlIO addRequestProperty ( final String name , final String value ) { } } | requestProperties . put ( name , value ) ; return this ; |
public class UpdateResourceShareRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdateResourceShareRequest updateResourceShareRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( updateResourceShareRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateResourceShareRequest . getResourceShareArn ( ) , RESOURCESHAREARN_BINDING ) ; protocolMarshaller . marshall ( updateResourceShareRequest . getName ( ) ,... |
public class CalibratedCurves { /** * Get a forward curve from the model , if not existing create a forward curve .
* @ param swapTenorDefinition The swap tenor associated with the forward curve .
* @ param forwardCurveName The name of the forward curve to create .
* @ return The forward curve associated with the... | /* * Temporary " hack " - we try to infer index maturity codes from curve name . */
String indexMaturityCode = null ; if ( forwardCurveName . contains ( "_12M" ) || forwardCurveName . contains ( "-12M" ) || forwardCurveName . contains ( " 12M" ) ) { indexMaturityCode = "12M" ; } if ( forwardCurveName . contains ( "_1M"... |
public class UTF8String { /** * Returns the underline bytes , will be a copy of it if it ' s part of another array . */
public byte [ ] getBytes ( ) { } } | // avoid copy if ` base ` is ` byte [ ] `
if ( offset == BYTE_ARRAY_OFFSET && base instanceof byte [ ] && ( ( byte [ ] ) base ) . length == numBytes ) { return ( byte [ ] ) base ; } else { byte [ ] bytes = new byte [ numBytes ] ; copyMemory ( base , offset , bytes , BYTE_ARRAY_OFFSET , numBytes ) ; return bytes ; } |
public class Security { /** * Decrypt a string value .
* @ param value Value to decrypt .
* @ return Decrypted value . */
protected static final String decrypt ( String value , String cipherKey ) { } } | int len = value == null ? 0 : value . length ( ) ; if ( len < 3 ) { return "" ; } int identifierIndex = value . charAt ( 0 ) - 32 ; int associatorIndex = value . charAt ( len - 1 ) - 32 ; String [ ] cipher = CipherRegistry . getCipher ( cipherKey ) ; return StrUtil . xlate ( value . substring ( 1 , len - 1 ) , cipher [... |
public class Choice6 { /** * { @ inheritDoc } */
@ Override public < G > Choice6 < A , B , C , D , E , G > fmap ( Function < ? super F , ? extends G > fn ) { } } | return Monad . super . < G > fmap ( fn ) . coerce ( ) ; |
public class MisoScenePanel { /** * Issues a warning to the error log that the specified block became visible prior to being
* resolved . Derived classes may wish to augment or inhibit this warning . */
protected void warnVisible ( SceneBlock block , Rectangle sbounds ) { } } | log . warning ( "Block visible during resolution " + block + " sbounds:" + StringUtil . toString ( sbounds ) + " vbounds:" + StringUtil . toString ( _vbounds ) + "." ) ; |
public class CompositeDialogPage { /** * Adds a new page to the list of pages managed by this CompositeDialogPage .
* The page is created by wrapping the form page in a FormBackedDialogPage .
* @ param form the form page to be insterted
* @ return the DialogPage that wraps formPage */
public DialogPage addForm ( ... | DialogPage page = createDialogPage ( form ) ; addPage ( page ) ; return page ; |
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getOVS ( ) { } } | if ( ovsEClass == null ) { ovsEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 330 ) ; } return ovsEClass ; |
public class GetDomainNamesRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetDomainNamesRequest getDomainNamesRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getDomainNamesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getDomainNamesRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ; protocolMarshaller . marshall ( getDomainNamesRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ;... |
public class SkewedInfo { /** * A list of values that appear so frequently as to be considered skewed .
* @ param skewedColumnValues
* A list of values that appear so frequently as to be considered skewed . */
public void setSkewedColumnValues ( java . util . Collection < String > skewedColumnValues ) { } } | if ( skewedColumnValues == null ) { this . skewedColumnValues = null ; return ; } this . skewedColumnValues = new java . util . ArrayList < String > ( skewedColumnValues ) ; |
public class Node { /** * Check the health of the node and try to ping it if necessary .
* @ param threshold the threshold after which the node should be removed
* @ param healthChecker the node health checker */
protected void checkHealth ( long threshold , NodeHealthChecker healthChecker ) { } } | final int state = this . state ; if ( anyAreSet ( state , REMOVED | ACTIVE_PING ) ) { return ; } healthCheckPing ( threshold , healthChecker ) ; |
public class Station { /** * Location is inside one of the maps .
* @ param location
* @ return */
public boolean inAnyMap ( Location location ) { } } | return maps . values ( ) . stream ( ) . anyMatch ( ( org . vesalainen . ham . MapArea m ) -> m . isInside ( location ) ) ; |
public class JBossModuleUtils { /** * Helper method to create a revisionId in a consistent manner */
public static ModuleIdentifier createRevisionId ( ModuleId scriptModuleId , long revisionNumber ) { } } | Objects . requireNonNull ( scriptModuleId , "scriptModuleId" ) ; return ModuleIdentifier . create ( scriptModuleId . toString ( ) , Long . toString ( revisionNumber ) ) ; |
public class Mapper { /** * < p > Loads the mapper tables if not already done so . This method is usually invoked implicity
* by the various < code > run < / code > methods . Don ' t call < code > load < / code > explicitly unless
* you want to force loading of mapper tables . < / p >
* < p > I tried to load the ... | ClassLoader loader ; Class c ; Method m ; Object [ ] tables ; if ( isLoaded ( ) ) { return ; } loader = Mapper . class . getClassLoader ( ) ; try { c = loader . loadClass ( name ) ; } catch ( ClassNotFoundException e ) { throw new IllegalStateException ( name + ": cannot load class: " + e . getMessage ( ) , e ) ; } try... |
public class Solo { /** * Presses a MenuItem matching the specified index . Index { @ code 0 } is the first item in the
* first row , Index { @ code 3 } is the first item in the second row and
* index { @ code 6 } is the first item in the third row .
* @ param index the index of the { @ link android . view . Menu... | if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "pressMenuItem(" + index + ")" ) ; } presser . pressMenuItem ( index ) ; |
public class TangoUser { public void addTangoUserListener ( ITangoUserListener listener , boolean stateless ) throws DevFailed { } } | event_listeners . add ( ITangoUserListener . class , listener ) ; event_identifier = subscribe_user_event ( attr_name , filters , stateless ) ; |
public class ReflectionUtils { /** * Returns the Field object for the specified field name declared in the
* specified class . Returns null if no such field can be found .
* @ param clazz
* The declaring class where the field will be reflected . This
* method will NOT attempt to reflect its superclass if such
... | try { return clazz . getDeclaredField ( fieldName ) ; } catch ( SecurityException e ) { throw new DynamoDBMappingException ( "Denied access to the [" + fieldName + "] field in class [" + clazz + "]." , e ) ; } catch ( NoSuchFieldException e ) { return null ; } |
public class XMLConfigAdmin { /** * important ! returns null when not a bundle ! */
static BundleFile installBundle ( Config config , Resource resJar , String extVersion , boolean convert2bundle ) throws IOException , BundleException { } } | BundleFile bf = new BundleFile ( resJar ) ; // resJar is a bundle
if ( bf . isBundle ( ) ) { return installBundle ( config , bf ) ; } if ( ! convert2bundle ) return null ; // name
String name = bf . getSymbolicName ( ) ; if ( StringUtil . isEmpty ( name ) ) name = BundleBuilderFactory . createSymbolicName ( resJar ) ; ... |
public class Utils { /** * Logs action ( event and method ) */
static void log ( Task action , String msg ) { } } | log ( action . event . getKey ( ) , action . method , msg ) ; |
public class VLongWritable { /** * Compares two VLongWritables . */
public int compareTo ( Object o ) { } } | long thisValue = this . value ; long thatValue = ( ( VLongWritable ) o ) . value ; return ( thisValue < thatValue ? - 1 : ( thisValue == thatValue ? 0 : 1 ) ) ; |
public class BidiagonalDecompositionRow_DDRM { /** * Returns the orthogonal U matrix .
* @ param U If not null then the results will be stored here . Otherwise a new matrix will be created .
* @ return The extracted Q matrix . */
@ Override public DMatrixRMaj getU ( DMatrixRMaj U , boolean transpose , boolean compa... | U = handleU ( U , transpose , compact , m , n , min ) ; CommonOps_DDRM . setIdentity ( U ) ; for ( int i = 0 ; i < m ; i ++ ) u [ i ] = 0 ; for ( int j = min - 1 ; j >= 0 ; j -- ) { u [ j ] = 1 ; for ( int i = j + 1 ; i < m ; i ++ ) { u [ i ] = UBV . get ( i , j ) ; } if ( transpose ) QrHelperFunctions_DDRM . rank1Upda... |
public class Blade { /** * Add a before route to routes , the before route will be executed before matching route
* @ param path your route path
* @ param handler route implement
* @ return return blade instance
* @ see # before ( String , RouteHandler ) */
@ Deprecated public Blade before ( @ NonNull String pa... | this . routeMatcher . addRoute ( path , handler , HttpMethod . BEFORE ) ; return this ; |
public class GenericProblem { /** * Evaluates a solution by taking into account both the evaluation calculated by the objective function and the
* penalizing constraints ( if any ) . Penalties are assigned for any violated penalizing constraint , which are
* subtracted from the evaluation in case of maximization , ... | if ( penalizingConstraints . isEmpty ( ) ) { // CASE 1 : no penalizing constraints
return objective . evaluate ( solution , data ) ; } else { // CASE 2 ( default ) : aggregate evaluation and penalties
Evaluation eval = objective . evaluate ( solution , data ) ; // initialize penalized evaluation object
PenalizedEvaluat... |
public class NetworkChat { /** * Add a new message .
* @ param message The message to add . */
protected void addMessage ( String message ) { } } | messages . add ( message ) ; messageCount ++ ; if ( messageCount > messagesQueueMax ) { messages . remove ( ) ; messageCount -- ; } |
public class AddAdGroups { /** * Runs the example .
* @ param adWordsServices the services factory .
* @ param session the session .
* @ param campaignId the ID of the campaign where the ad groups will be created .
* @ throws ApiException if the API request failed with one or more service errors .
* @ throws ... | // Get the AdGroupService .
AdGroupServiceInterface adGroupService = adWordsServices . get ( session , AdGroupServiceInterface . class ) ; // Create ad group .
AdGroup adGroup = new AdGroup ( ) ; adGroup . setName ( "Earth to Mars Cruises #" + System . currentTimeMillis ( ) ) ; adGroup . setStatus ( AdGroupStatus . ENA... |
public class ExecutorServiceHelper { /** * Call shutdown on the { @ link ExecutorService } and wait indefinitely until it
* terminated .
* @ param aES
* The { @ link ExecutorService } to operate on . May not be
* < code > null < / code > .
* @ return { @ link EInterrupt # INTERRUPTED } if the executor service... | return shutdownAndWaitUntilAllTasksAreFinished ( aES , 1 , TimeUnit . SECONDS ) ; |
public class KNNOutlier { /** * Runs the algorithm in the timed evaluation part .
* @ param relation Data relation */
public OutlierResult run ( Relation < O > relation ) { } } | final DistanceQuery < O > distanceQuery = relation . getDistanceQuery ( getDistanceFunction ( ) ) ; final KNNQuery < O > knnQuery = relation . getKNNQuery ( distanceQuery , k ) ; FiniteProgress prog = LOG . isVerbose ( ) ? new FiniteProgress ( "kNN distance for objects" , relation . size ( ) , LOG ) : null ; DoubleMinM... |
public class CsvEscape { /** * Perform a CSV < strong > escape < / strong > operation on a < tt > char [ ] < / tt > input .
* This method is < strong > thread - safe < / strong > .
* @ param text the < tt > char [ ] < / tt > to be escaped .
* @ param offset the position in < tt > text < / tt > at which the escape... | if ( writer == null ) { throw new IllegalArgumentException ( "Argument 'writer' cannot be null" ) ; } final int textLen = ( text == null ? 0 : text . length ) ; if ( offset < 0 || offset > textLen ) { throw new IllegalArgumentException ( "Invalid (offset, len). offset=" + offset + ", len=" + len + ", text.length=" + te... |
public class EntityListenersProcessor { /** * Adds the call back method .
* @ param metadata
* the metadata
* @ param jpaAnnotation
* the jpa annotation
* @ param callbackMethod
* the callback method */
@ SuppressWarnings ( "unchecked" ) private void addCallBackMethod ( EntityMetadata metadata , Class < ? >... | Map < Class < ? > , List < ? extends CallbackMethod > > callBackMethodsMap = metadata . getCallbackMethodsMap ( ) ; List < CallbackMethod > list = ( List < CallbackMethod > ) callBackMethodsMap . get ( jpaAnnotation ) ; if ( null == list ) { list = new ArrayList < CallbackMethod > ( ) ; callBackMethodsMap . put ( jpaAn... |
public class Task { /** * Get the final state of each construct used by this task and add it to the { @ link org . apache . gobblin . runtime . TaskState } .
* @ param extractor the { @ link org . apache . gobblin . instrumented . extractor . InstrumentedExtractorBase } used by this task .
* @ param converter the {... | ConstructState constructState = new ConstructState ( ) ; if ( extractor != null ) { constructState . addConstructState ( Constructs . EXTRACTOR , new ConstructState ( extractor . getFinalState ( ) ) ) ; } if ( converter != null ) { constructState . addConstructState ( Constructs . CONVERTER , new ConstructState ( conve... |
public class EnvUtil { /** * Checks whether config file exists in directory .
* @ param dirPath the dir path
* @ return true , if successful */
public static boolean hasConfigFileExists ( String dirPath ) { } } | String filePath = dirPath + File . separator + Configurations . CONFIG_FILE_NAME + "." ; if ( AuditUtil . isFileExists ( filePath + Configurations . YML_EXTENTION ) || AuditUtil . isFileExists ( filePath + Configurations . YAML_EXTENTION ) || AuditUtil . isFileExists ( filePath + Configurations . XML_EXTENTION ) ) { re... |
public class ReferenceBuilder { /** * Adds the given property and value to the constructed reference .
* @ param propertyIdValue
* the property to add
* @ param value
* the value to add
* @ return builder object to continue construction */
public ReferenceBuilder withPropertyValue ( PropertyIdValue propertyId... | getSnakList ( propertyIdValue ) . add ( factory . getValueSnak ( propertyIdValue , value ) ) ; return getThis ( ) ; |
public class InternalJSONUtil { /** * 将Property的键转化为JSON形式 < br >
* 用于识别类似于 : com . luxiaolei . package . hutool这类用点隔开的键
* @ param jsonObject JSONObject
* @ param key 键
* @ param value 值
* @ return JSONObject */
protected static JSONObject propertyPut ( JSONObject jsonObject , Object key , Object value ) { } ... | String keyStr = Convert . toStr ( key ) ; String [ ] path = StrUtil . split ( keyStr , StrUtil . DOT ) ; int last = path . length - 1 ; JSONObject target = jsonObject ; for ( int i = 0 ; i < last ; i += 1 ) { String segment = path [ i ] ; JSONObject nextTarget = target . getJSONObject ( segment ) ; if ( nextTarget == n... |
public class ExampleDataUtil { /** * Creates the example data .
* @ param rows the number of rows to create
* @ param documents the number of documents to add to each person
* @ return the example data . */
public static List < PersonBean > createExampleData ( final int rows , final int documents ) { } } | List < PersonBean > data = new ArrayList < > ( rows ) ; Date date1 = DateUtilities . createDate ( 1 , 2 , 1973 ) ; Date date2 = DateUtilities . createDate ( 2 , 3 , 1985 ) ; Date date3 = DateUtilities . createDate ( 3 , 4 , 2004 ) ; for ( int i = 1 ; i <= rows ; i ++ ) { PersonBean bean = new PersonBean ( "P" + i , "Jo... |
public class Checks { /** * Performs check with the predicate .
* @ param reference the reference to check
* @ param predicate the predicate to use
* @ param errorMessage the exception message to use if the check fails ; will
* be converted to a string using { @ link String # valueOf ( Object ) }
* @ param < ... | check ( reference , predicate , String . valueOf ( errorMessage ) , EMPTY_ERROR_MESSAGE_ARGS ) ; return reference ; |
public class ClustersInner { /** * Executes script actions on the specified HDInsight cluster .
* @ param resourceGroupName The name of the resource group .
* @ param clusterName The name of the cluster .
* @ param parameters The parameters for executing script actions .
* @ throws IllegalArgumentException thro... | if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( cluster... |
public class SharesInner { /** * Gets a share by name .
* @ param deviceName The device name .
* @ param name The share name .
* @ param resourceGroupName The resource group name .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the ShareInner object *... | return getWithServiceResponseAsync ( deviceName , name , resourceGroupName ) . map ( new Func1 < ServiceResponse < ShareInner > , ShareInner > ( ) { @ Override public ShareInner call ( ServiceResponse < ShareInner > response ) { return response . body ( ) ; } } ) ; |
public class AllWindowedStream { /** * Applies an aggregation that that gives the maximum value of the pojo data
* stream at the given field expression for every window . A field expression
* is either the name of a public field or a getter method with parentheses
* of the { @ link DataStream DataStreams } underl... | return aggregate ( new ComparableAggregator < > ( field , input . getType ( ) , AggregationFunction . AggregationType . MAX , false , input . getExecutionConfig ( ) ) ) ; |
public class AccountManager { /** * < p > insertGroup . < / p >
* @ param name a { @ link java . lang . String } object .
* @ return a boolean . */
public boolean insertGroup ( String name ) { } } | if ( isGroupExist ( name ) ) { throw new SystemException ( String . format ( "Group '%s' already exist." , name ) ) ; } return allGroups . add ( name ) ; |
public class ContinuousDistributions { /** * Internal function used by gammaCdf
* @ param x
* @ param A
* @ return */
private static double gSer ( double x , double A ) { } } | // Good for X < A + 1.
double T9 = 1 / A ; double G = T9 ; double I = 1 ; while ( T9 > G * 0.00001 ) { T9 = T9 * x / ( A + I ) ; G = G + T9 ; ++ I ; } G = G * Math . exp ( A * Math . log ( x ) - x - logGamma ( A ) ) ; return G ; |
public class CouchDBClient { /** * ( non - Javadoc )
* @ see
* com . impetus . kundera . client . Client # persistJoinTable ( com . impetus . kundera
* . persistence . context . jointable . JoinTableData ) */
@ Override public void persistJoinTable ( JoinTableData joinTableData ) { } } | String joinTableName = joinTableData . getJoinTableName ( ) ; String joinColumnName = joinTableData . getJoinColumnName ( ) ; String invJoinColumnName = joinTableData . getInverseJoinColumnName ( ) ; Map < Object , Set < Object > > joinTableRecords = joinTableData . getJoinTableRecords ( ) ; for ( Object key : joinTabl... |
public class CommerceWishListModelImpl { /** * Converts the soap model instances into normal model instances .
* @ param soapModels the soap model instances to convert
* @ return the normal model instances */
public static List < CommerceWishList > toModels ( CommerceWishListSoap [ ] soapModels ) { } } | if ( soapModels == null ) { return null ; } List < CommerceWishList > models = new ArrayList < CommerceWishList > ( soapModels . length ) ; for ( CommerceWishListSoap soapModel : soapModels ) { models . add ( toModel ( soapModel ) ) ; } return models ; |
public class GanttChartView12 { /** * { @ inheritDoc } */
@ Override protected void processProgressLines ( Map < Integer , FontBase > fontBases , byte [ ] progressLineData ) { } } | // MPPUtility . fileDump ( " c : \ \ temp \ \ props . txt " , ByteArrayHelper . hexdump ( progressLineData , false , 16 , " " ) . getBytes ( ) ) ;
m_progressLinesEnabled = ( progressLineData [ 0 ] != 0 ) ; m_progressLinesAtCurrentDate = ( progressLineData [ 2 ] != 0 ) ; m_progressLinesAtRecurringIntervals = ( progressL... |
public class FlowTypeCheck { /** * Type check a continue statement . This requires propagating the current
* environment to the block destination , to ensure that the actual types of all
* variables at that point are precise .
* @ param stmt
* Statement to type check
* @ param environment
* Determines the t... | // FIXME : need to check environment to the continue destination
return FlowTypeUtils . BOTTOM ; |
public class Client { /** * Make a call , passing < code > param < / code > , to the IPC server running at < code > address < / code > which is servicing the
* < code > protocol < / code > protocol ,
* with the < code > ticket < / code > credentials , returning the value .
* Throws exceptions if there are network... | Call call = new Call ( param ) ; Connection connection = getConnection ( addr , protocol , call ) ; connection . sendParam ( call ) ; // send the parameter
synchronized ( call ) { while ( ! call . done ) { try { call . wait ( ) ; // wait for the result
} catch ( InterruptedException ignored ) { } } if ( call . error !=... |
public class WorkflowServiceImpl { /** * Gets the workflow by workflow Id .
* @ param workflowId Id of the workflow .
* @ param includeTasks Includes tasks associated with workflow .
* @ return an instance of { @ link Workflow } */
@ Service public Workflow getExecutionStatus ( String workflowId , boolean include... | Workflow workflow = executionService . getExecutionStatus ( workflowId , includeTasks ) ; if ( workflow == null ) { throw new ApplicationException ( ApplicationException . Code . NOT_FOUND , String . format ( "Workflow with Id: %s not found." , workflowId ) ) ; } return workflow ; |
public class EntityField { /** * 是否有该注解
* @ param annotationClass
* @ return */
public boolean isAnnotationPresent ( Class < ? extends Annotation > annotationClass ) { } } | boolean result = false ; if ( field != null ) { result = field . isAnnotationPresent ( annotationClass ) ; } if ( ! result && setter != null ) { result = setter . isAnnotationPresent ( annotationClass ) ; } if ( ! result && getter != null ) { result = getter . isAnnotationPresent ( annotationClass ) ; } return result ; |
public class MMElementRule { /** * Gets the parameters attribute of the MMElementRule object .
* @ return The parameters value
* @ see # setParameters */
@ Override public Object [ ] getParameters ( ) { } } | // return the parameters as used for the rule validation
Object [ ] params = new Object [ 2 ] ; params [ 0 ] = databaseUsed ; params [ 1 ] = rangeMassUsed ; return params ; |
public class Utils { /** * Returns a shared preferences for storing any library preferences . */
public static SharedPreferences getSegmentSharedPreferences ( Context context , String tag ) { } } | return context . getSharedPreferences ( "analytics-android-" + tag , MODE_PRIVATE ) ; |
public class Utils { /** * コレクションの要素を指定した区切り文字で繋げて1つの文字列とする 。
* @ param col 処理対象のコレクション 。
* @ param separator 区切り文字 。
* @ param ignoreEmptyElement 空 、 nullの要素を無視するかどうか 。
* @ param trim トリムをするかどうか 。
* @ param elementConverter 要素を変換するクラス 。
* @ return 結合した文字列 */
@ SuppressWarnings ( "rawtypes" ) public sta... | final List < Object > list = new ArrayList < Object > ( ) ; for ( Object element : col ) { if ( element == null ) { continue ; } Object value = element ; if ( element instanceof String ) { String str = ( String ) element ; if ( ignoreEmptyElement && isEmpty ( str ) ) { continue ; } else if ( trim ) { value = str . trim... |
public class FileOperations { /** * Create a new directory if it does not exist . The direct parent directory
* already needs to exist .
* @ param aDir
* The directory to be created if it does not exist . May not be
* < code > null < / code > .
* @ return A non - < code > null < / code > error code .
* @ se... | final FileIOError aError = createDirRecursive ( aDir ) ; if ( aError . getErrorCode ( ) . equals ( EFileIOErrorCode . TARGET_ALREADY_EXISTS ) ) return EFileIOErrorCode . NO_ERROR . getAsIOError ( EFileIOOperation . CREATE_DIR_RECURSIVE , aDir ) ; return aError ; |
public class JaxWsUtils { /** * get the targetNamespace from SEI .
* If it is webServiceProvider just return the targetNamespace attribute from annotation .
* If it is webService and no SEI specified , return the implementedTargetNamespace ;
* If it is webService and SEI specified with no targetNamespace attribut... | AnnotationInfo annotationInfo = getAnnotationInfoFromClass ( classInfo , JaxWsConstants . TARGETNAMESPACE_ATTRIBUTE ) ; if ( annotationInfo == null ) { return "" ; } boolean isProvider = isProvider ( classInfo ) ; // if the serviceImplBean is a WebServiceProvider , return the attribute value or the defaultValue
if ( is... |
public class ReUtil { /** * 从content中匹配出多个值并根据template生成新的字符串 < br >
* 匹配结束后会删除匹配内容之前的内容 ( 包括匹配内容 ) < br >
* 例如 : < br >
* content 2013年5月 pattern ( . * ? ) 年 ( . * ? ) 月 template : $ 1 - $ 2 return 2013-5
* @ param regex 匹配正则字符串
* @ param content 被匹配的内容
* @ param template 生成内容模板 , 变量 $ 1 表示group1的内容 , 以此类推... | if ( null == content || null == regex || null == template ) { return null ; } // Pattern pattern = Pattern . compile ( regex , Pattern . DOTALL ) ;
final Pattern pattern = PatternPool . get ( regex , Pattern . DOTALL ) ; return extractMulti ( pattern , content , template ) ; |
public class TypedArgument { /** * Extract the argument values from an array of { @ link TypedArgument } s .
* @ param arguments the arguments to extract the values from .
* @ return the values of the arguments . */
public static Object [ ] values ( TypedArgument ... arguments ) { } } | Object [ ] values = new Object [ arguments . length ] ; for ( int i = 0 ; i < values . length ; i ++ ) { values [ i ] = arguments [ i ] . value ; } return values ; |
public class RTMPHandshake { /** * Returns a digest byte offset .
* @ param handshake handshake sequence
* @ param bufferOffset buffer offset
* @ return digest offset */
protected int getDigestOffset2 ( byte [ ] handshake , int bufferOffset ) { } } | bufferOffset += 772 ; int offset = handshake [ bufferOffset ] & 0xff ; // & 0x0ff ;
bufferOffset ++ ; offset += handshake [ bufferOffset ] & 0xff ; bufferOffset ++ ; offset += handshake [ bufferOffset ] & 0xff ; bufferOffset ++ ; offset += handshake [ bufferOffset ] & 0xff ; int res = Math . abs ( ( offset % 728 ) + 77... |
public class RelationshipPrefetcherFactory { /** * create either a CollectionPrefetcher or a ReferencePrefetcher */
public RelationshipPrefetcher createRelationshipPrefetcher ( ClassDescriptor anOwnerCld , String aRelationshipName ) { } } | ObjectReferenceDescriptor ord ; ord = anOwnerCld . getCollectionDescriptorByName ( aRelationshipName ) ; if ( ord == null ) { ord = anOwnerCld . getObjectReferenceDescriptorByName ( aRelationshipName ) ; if ( ord == null ) { throw new PersistenceBrokerException ( "Relationship named '" + aRelationshipName + "' not foun... |
public class VarOptItemsSketch { /** * Construct a varopt sampling sketch with up to k samples using the specified resize factor .
* @ param k Maximum size of sampling . Allocated size may be smaller until sketch fills .
* Unlike many sketches in this package , this value does < em > not < / em > need to be a
* p... | return new VarOptItemsSketch < > ( k , rf ) ; |
public class QRSparseFactorization { /** * Constructs and returns a new QR decomposition object ; computed by
* Householder reflections ; If m < n then then the QR of A ' is computed . The
* decomposed matrices can be retrieved via instance methods of the returned
* decomposition object .
* @ param A
* A rect... | m = A . rows ( ) ; n = A . columns ( ) ; if ( this . rescaler != null ) { double [ ] cn_00_original = null ; double [ ] cn_2_original = null ; double [ ] cn_00_scaled = null ; double [ ] cn_2_scaled = null ; if ( log . isDebugEnabled ( ) ) { cn_00_original = ColtUtils . getConditionNumberRange ( new Array2DRowRealMatri... |
public class SQLUtilityImpl { /** * Adds or replaces a row in the given table .
* @ param conn
* the connection to use
* @ param table
* the name of the table
* @ param columns
* the names of the columns whose values we ' re setting .
* @ param values
* associated values
* @ param uniqueColumn
* whi... | if ( ! i_updateRow ( conn , table , columns , values , uniqueColumn , numeric ) ) { i_addRow ( conn , table , columns , values , numeric ) ; } |
public class PluginManager { /** * Sets the specified plugin ' s properties from the specified properties file under the specified plugin directory .
* @ param pluginDirName the specified plugin directory
* @ param plugin the specified plugin
* @ param props the specified properties file
* @ throws Exception ex... | final String author = props . getProperty ( Plugin . PLUGIN_AUTHOR ) ; final String name = props . getProperty ( Plugin . PLUGIN_NAME ) ; final String version = props . getProperty ( Plugin . PLUGIN_VERSION ) ; final String types = props . getProperty ( Plugin . PLUGIN_TYPES ) ; LOGGER . log ( Level . TRACE , "Plugin[n... |
public class JavaCompiler { /** * Perform dataflow checks on attributed parse trees .
* These include checks for definite assignment and unreachable statements .
* If any errors occur , an empty list will be returned .
* @ return the list of attributed parse trees */
public Queue < Env < AttrContext > > flow ( Qu... | ListBuffer < Env < AttrContext > > results = new ListBuffer < > ( ) ; for ( Env < AttrContext > env : envs ) { flow ( env , results ) ; } return stopIfError ( CompileState . FLOW , results ) ; |
public class Img { /** * 计算旋转后的图片尺寸
* @ param width 宽度
* @ param height 高度
* @ param degree 旋转角度
* @ return 计算后目标尺寸
* @ since 4.1.20 */
private static Rectangle calcRotatedSize ( int width , int height , int degree ) { } } | if ( degree >= 90 ) { if ( degree / 90 % 2 == 1 ) { int temp = height ; height = width ; width = temp ; } degree = degree % 90 ; } double r = Math . sqrt ( height * height + width * width ) / 2 ; double len = 2 * Math . sin ( Math . toRadians ( degree ) / 2 ) * r ; double angel_alpha = ( Math . PI - Math . toRadians ( ... |
public class ConstFold { /** * Fold unary operation .
* @ param opcode The operation ' s opcode instruction ( usually a byte code ) ,
* as entered by class Symtab .
* opcode ' s ifeq to ifge are for postprocessing
* xcmp ; ifxx pairs of instructions .
* @ param operand The operation ' s operand type .
* Arg... | try { Object od = operand . constValue ( ) ; switch ( opcode ) { case nop : return operand ; case ineg : // unary -
return syms . intType . constType ( - intValue ( od ) ) ; case ixor : return syms . intType . constType ( ~ intValue ( od ) ) ; case bool_not : return syms . booleanType . constType ( b2i ( intValue ( od ... |
public class ProbabilityWeightedMoments { /** * Compute the alpha _ r factors using the method of probability - weighted
* moments .
* @ param data < b > Presorted < / b > data array .
* @ param adapter Array adapter .
* @ param nmom Number of moments to compute
* @ return Alpha moments ( 0 - indexed ) */
pub... | final int n = adapter . size ( data ) ; final double [ ] xmom = new double [ nmom ] ; double weight = 1. / n ; for ( int i = 0 ; i < n ; i ++ ) { final double val = adapter . getDouble ( data , i ) ; xmom [ 0 ] += weight * val ; for ( int j = 1 ; j < nmom ; j ++ ) { weight *= ( n - i - j + 1 ) / ( n - j + 1 ) ; xmom [ ... |
public class AWSSimpleSystemsManagementClient { /** * Set the default version of a document .
* @ param updateDocumentDefaultVersionRequest
* @ return Result of the UpdateDocumentDefaultVersion operation returned by the service .
* @ throws InternalServerErrorException
* An error occurred on the server side .
... | request = beforeClientExecution ( request ) ; return executeUpdateDocumentDefaultVersion ( request ) ; |
public class FileInputFormat { /** * List input directories .
* The file locations are also returned together with the file status .
* Subclasses may override to , e . g . , select only files matching a regular
* expression .
* @ param job the job to list input paths for
* @ return array of LocatedFileStatus ... | Path [ ] dirs = getInputPaths ( job ) ; if ( dirs . length == 0 ) { throw new IOException ( "No input paths specified in job" ) ; } // Whether we need to recursive look into the directory structure
final boolean recursive = job . getBoolean ( "mapred.input.dir.recursive" , false ) ; final List < LocatedFileStatus > res... |
public class OntologyTermRepository { /** * Finds exact { @ link OntologyTerm } s within { @ link Ontology } s .
* @ param ontologyIds IDs of the { @ link Ontology } s to search in
* @ param terms { @ link List } of search terms . the { @ link OntologyTerm } must match at least one of
* these terms
* @ param pa... | List < OntologyTerm > findOntologyTerms = findOntologyTerms ( ontologyIds , terms , pageSize ) ; return findOntologyTerms . stream ( ) . filter ( ontologyTerm -> isOntologyTermExactMatch ( terms , ontologyTerm ) ) . collect ( Collectors . toList ( ) ) ; |
public class Input { /** * Returns an array
* @ return int Length of array */
@ SuppressWarnings ( { } } | "unchecked" , "rawtypes" } ) @ Override public Object readArray ( Type target ) { int count = readInteger ( ) ; log . debug ( "Count: {} and {} ref {}" , new Object [ ] { count , ( count & 1 ) , ( count >> 1 ) } ) ; if ( ( count & 1 ) == 0 ) { // Reference
Object ref = getReference ( count >> 1 ) ; if ( ref != null ) {... |
public class IPv6AddressRange { /** * Remove a network from the range , resulting in one , none or two new ranges . If a network outside ( or partially outside ) the range is
* removed , this has no effect . If the network which is removed is aligned with the beginning or end of the range , a single new ranges
* is... | if ( network == null ) throw new IllegalArgumentException ( "invalid network [null]" ) ; if ( ! contains ( network ) ) return Collections . singletonList ( this ) ; else if ( this . equals ( network ) ) return Collections . emptyList ( ) ; else if ( first . equals ( network . getFirst ( ) ) ) return Collections . singl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.