signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class QueryString { /** * A value suitable for constructinng URIs with . This means that if there
* are no parameters , null will be returned .
* @ return If the map is empty , null , otherwise an escaped query string . */
public String toQueryString ( ) { } } | String result = null ; List < String > parameters = new ArrayList < > ( ) ; for ( Map . Entry < String , String > entry : entrySet ( ) ) { // We don ' t encode the key because it could legitimately contain
// things like underscores , e . g . " _ escaped _ fragment _ " would become :
// " % 5Fescaped % 5Ffragment % 5F ... |
public class dnspolicy { /** * Use this API to add dnspolicy . */
public static base_response add ( nitro_service client , dnspolicy resource ) throws Exception { } } | dnspolicy addresource = new dnspolicy ( ) ; addresource . name = resource . name ; addresource . rule = resource . rule ; addresource . viewname = resource . viewname ; addresource . preferredlocation = resource . preferredlocation ; addresource . preferredloclist = resource . preferredloclist ; addresource . drop = re... |
public class PrimitiveTransformation { /** * < code > . google . privacy . dlp . v2 . BucketingConfig bucketing _ config = 6 ; < / code > */
public com . google . privacy . dlp . v2 . BucketingConfig getBucketingConfig ( ) { } } | if ( transformationCase_ == 6 ) { return ( com . google . privacy . dlp . v2 . BucketingConfig ) transformation_ ; } return com . google . privacy . dlp . v2 . BucketingConfig . getDefaultInstance ( ) ; |
public class RepairDoubleSolutionAtBounds { /** * Checks if the value is between its bounds ; if not , the lower or upper bound is returned
* @ param value The value to be checked
* @ param lowerBound
* @ param upperBound
* @ return The same value if it is in the limits or a repaired value otherwise */
public d... | if ( lowerBound > upperBound ) { throw new JMetalException ( "The lower bound (" + lowerBound + ") is greater than the " + "upper bound (" + upperBound + ")" ) ; } double result = value ; if ( value < lowerBound ) { result = lowerBound ; } if ( value > upperBound ) { result = upperBound ; } return result ; |
public class WebMvcLinkBuilder { /** * @ see org . springframework . hateoas . MethodLinkBuilderFactory # linkTo ( Class < ? > , Method , Object . . . ) */
public static WebMvcLinkBuilder linkTo ( Class < ? > controller , Method method , Object ... parameters ) { } } | Assert . notNull ( controller , "Controller type must not be null!" ) ; Assert . notNull ( method , "Method must not be null!" ) ; String mapping = DISCOVERER . getMapping ( controller , method ) ; UriTemplate template = UriTemplateFactory . templateFor ( mapping ) ; URI uri = template . expand ( parameters ) ; return ... |
public class HttpMessageSecurity { /** * Unprotects response if needed . Replaces its body with unencrypted version .
* @ param response
* server response .
* @ return new response with unencrypted body if supported or existing response .
* @ throws IOException throws IOException */
public Response unprotectRes... | try { if ( ! supportsProtection ( ) || ! HttpHeaders . hasBody ( response ) ) { return response ; } if ( ! response . header ( "content-type" ) . toLowerCase ( ) . contains ( "application/jose+json" ) ) { return response ; } JWSObject jwsObject = JWSObject . deserialize ( response . body ( ) . string ( ) ) ; JWSHeader ... |
public class ProvisioningParameterMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ProvisioningParameter provisioningParameter , ProtocolMarshaller protocolMarshaller ) { } } | if ( provisioningParameter == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( provisioningParameter . getKey ( ) , KEY_BINDING ) ; protocolMarshaller . marshall ( provisioningParameter . getValue ( ) , VALUE_BINDING ) ; } catch ( Exception e... |
public class ExceptionSoftener { /** * Soften a CheckedBiPredicate that can throw Checked Exceptions to a standard BiPredicate that can also throw Checked Exceptions ( without declaring them )
* e . g .
* < pre >
* { @ code
* boolean loaded = ExceptionSoftener . softenBiPredicate ( this : : exists ) . test ( id... | return ( t1 , t2 ) -> { try { return fn . test ( t1 , t2 ) ; } catch ( final Throwable e ) { throw throwSoftenedException ( e ) ; } } ; |
public class DescribeHsmConfigurationsRequest { /** * A tag key or keys for which you want to return all matching HSM configurations that are associated with the
* specified key or keys . For example , suppose that you have HSM configurations that are tagged with keys called
* < code > owner < / code > and < code >... | if ( this . tagKeys == null ) { setTagKeys ( new com . amazonaws . internal . SdkInternalList < String > ( tagKeys . length ) ) ; } for ( String ele : tagKeys ) { this . tagKeys . add ( ele ) ; } return this ; |
public class ExternalEventHandlerBase { /** * This method is used to create a document from external messages . The document reference
* returned can be sent as parameters to start or inform processes .
* @ param docType this should be variable type if the document reference is to be bound
* to variables .
* @ ... | ListenerHelper helper = new ListenerHelper ( ) ; return helper . createDocument ( docType , document , getPackage ( ) , ownerType , ownerId ) ; |
public class BlockAwareJsonParser { /** * If this parser is reading tokens from an object or an array that is nested below its original
* nesting level , it will consume and skip all tokens until it reaches the end of the block that
* it was created on . The underlying parser will be left on the END _ X token for t... | if ( open == 0 ) { return ; } if ( open < 0 ) { throw new IllegalStateException ( "Parser is no longer nested in any blocks at the level in which it was " + "created. You must create a new block aware parser to track the levels above this one." ) ; } while ( open > 0 ) { Token t = delegate . nextToken ( ) ; if ( t == n... |
public class Dates { /** * Instantiate a new datelist with the same type , timezone and utc settings
* as the origList .
* @ param origList
* @ return a new empty list . */
public static DateList getDateListInstance ( final DateList origList ) { } } | final DateList list = new DateList ( origList . getType ( ) ) ; if ( origList . isUtc ( ) ) { list . setUtc ( true ) ; } else { list . setTimeZone ( origList . getTimeZone ( ) ) ; } return list ; |
public class CrosstabBuilder { /** * To use main report datasource . There should be nothing else in the detail band
* @ param preSorted
* @ return */
public CrosstabBuilder useMainReportDatasource ( boolean preSorted ) { } } | DJDataSource datasource = new DJDataSource ( "ds" , DJConstants . DATA_SOURCE_ORIGIN_REPORT_DATASOURCE , DJConstants . DATA_SOURCE_TYPE_JRDATASOURCE ) ; datasource . setPreSorted ( preSorted ) ; crosstab . setDatasource ( datasource ) ; return this ; |
public class BaseBot { /** * Form a Queue with all the methods responsible for a particular conversation .
* @ param queue
* @ param methodName
* @ return */
private Queue < MethodWrapper > formConversationQueue ( Queue < MethodWrapper > queue , String methodName ) { } } | MethodWrapper methodWrapper = methodNameMap . get ( methodName ) ; queue . add ( methodWrapper ) ; if ( StringUtils . isEmpty ( methodName ) ) { return queue ; } else { return formConversationQueue ( queue , methodWrapper . getNext ( ) ) ; } |
public class SqlValidatorImpl { /** * Validates a VALUES clause .
* @ param node Values clause
* @ param targetRowType Row type which expression must conform to
* @ param scope Scope within which clause occurs */
protected void validateValues ( SqlCall node , RelDataType targetRowType , final SqlValidatorScope sc... | assert node . getKind ( ) == SqlKind . VALUES ; final List < SqlNode > operands = node . getOperandList ( ) ; for ( SqlNode operand : operands ) { if ( ! ( operand . getKind ( ) == SqlKind . ROW ) ) { throw Util . needToImplement ( "Values function where operands are scalars" ) ; } SqlCall rowConstructor = ( SqlCall ) ... |
public class CircuitBreakingServiceLocator { /** * Do the given block with the given service looked up .
* This is invoked by { @ link # doWithService ( String , Descriptor . Call , Function ) } , after wrapping the passed in block
* in a circuit breaker if configured to do so .
* The default implementation just ... | return locate ( name , serviceCall ) . thenCompose ( uri -> { return uri . map ( u -> block . apply ( u ) . thenApply ( Optional :: of ) ) . orElseGet ( ( ) -> CompletableFuture . completedFuture ( Optional . empty ( ) ) ) ; } ) ; |
public class Ecc25519Helper { /** * / * package */
static MessageDigest getSha256Digest ( ) { } } | try { MessageDigest digest = MessageDigest . getInstance ( "SHA-256" ) ; digest . reset ( ) ; return digest ; } catch ( NoSuchAlgorithmException e ) { // ignore , won ' t happen
throw new IllegalStateException ( e ) ; } |
public class BackendRegistrySrv { /** * 记录节点上下线日志 */
private void addLog ( NotifyEvent event , List < Node > nodes ) { } } | List < NodeOnOfflineLog > logs = new ArrayList < NodeOnOfflineLog > ( nodes . size ( ) ) ; for ( Node node : nodes ) { NodeOnOfflineLog log = new NodeOnOfflineLog ( ) ; log . setLogTime ( new Date ( ) ) ; log . setEvent ( event == NotifyEvent . ADD ? "ONLINE" : "OFFLINE" ) ; log . setClusterName ( node . getClusterName... |
public class DirectoryServiceInMemoryClient { /** * private ProvidedServiceInstance toProvidedInstance ( ModelServiceInstance mInstance ) {
* return new ProvidedServiceInstance ( mInstance . getServiceName ( ) , mInstance . getAddress ( ) ,
* mInstance . getUri ( ) , mInstance . getStatus ( ) ,
* mInstance . getM... | return o . getClass ( ) . getSimpleName ( ) + "@" + Integer . toHexString ( o . hashCode ( ) ) ; |
public class SingularityClient { /** * Retrieve the list of logs stored in S3 for a specific deploy if a singularity request
* @ param requestId
* The request ID to search for
* @ param deployId
* The deploy ID ( within the specified request ) to search for
* @ return
* A collection of { @ link SingularityS... | final Function < String , String > requestUri = ( host ) -> String . format ( S3_LOG_GET_DEPLOY_LOGS , getApiBase ( host ) , requestId , deployId ) ; final String type = String . format ( "S3 logs for deploy %s of request %s" , deployId , requestId ) ; return getCollection ( requestUri , type , S3_LOG_COLLECTION ) ; |
public class S3Uploader { /** * Generate the path to a file in s3 given a prefix , topologyName , and filename
* @ param pathPrefixParent designates any parent folders that should be prefixed to the resulting path
* @ param topologyName the name of the topology that we are uploaded
* @ param filename the name of ... | List < String > pathParts = new ArrayList < > ( Arrays . asList ( pathPrefixParent . split ( "/" ) ) ) ; pathParts . add ( topologyName ) ; pathParts . add ( filename ) ; return String . join ( "/" , pathParts ) ; |
public class Element { /** * ( non - Javadoc )
* @ see
* qc . automation . framework . widget . IElement # isElementPresent ( java . lang . Boolean */
@ Override public boolean isElementPresent ( boolean isJavaXPath ) throws WidgetException { } } | try { final boolean isPotentiallyXpathWithLocator = ( locator instanceof EByFirstMatching ) || ( locator instanceof EByXpath ) ; if ( isJavaXPath && isPotentiallyXpathWithLocator ) { return isElementPresentJavaXPath ( ) ; } else { findElement ( ) ; return true ; } } catch ( NoSuchElementException e ) { return false ; }... |
public class RsPrettyJson { /** * Make a response .
* @ return Response just made
* @ throws IOException If fails */
private Response make ( ) throws IOException { } } | if ( this . transformed . isEmpty ( ) ) { this . transformed . add ( new RsWithBody ( this . origin , RsPrettyJson . transform ( this . origin . body ( ) ) ) ) ; } return this . transformed . get ( 0 ) ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcElectricConductanceMeasure ( ) { } } | if ( ifcElectricConductanceMeasureEClass == null ) { ifcElectricConductanceMeasureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 801 ) ; } return ifcElectricConductanceMeasureEClass ; |
public class SecureASTCustomizer { /** * An alternative way of setting { @ link # setReceiversBlackList ( java . util . List ) receiver classes } .
* @ param receiversBlacklist a list of classes . */
public void setReceiversClassesBlackList ( final List < Class > receiversBlacklist ) { } } | List < String > values = new LinkedList < String > ( ) ; for ( Class aClass : receiversBlacklist ) { values . add ( aClass . getName ( ) ) ; } setReceiversBlackList ( values ) ; |
public class Filter { /** * { @ inheritDoc } */
@ Override public boolean matches ( String name , Metric metric ) { } } | // TODO Auto - generated method stub
Matcher m = p . matcher ( name ) ; return m . matches ( ) ; |
public class CommerceUserSegmentCriterionPersistenceImpl { /** * Returns the commerce user segment criterion with the primary key or returns < code > null < / code > if it could not be found .
* @ param primaryKey the primary key of the commerce user segment criterion
* @ return the commerce user segment criterion ... | Serializable serializable = entityCache . getResult ( CommerceUserSegmentCriterionModelImpl . ENTITY_CACHE_ENABLED , CommerceUserSegmentCriterionImpl . class , primaryKey ) ; if ( serializable == nullModel ) { return null ; } CommerceUserSegmentCriterion commerceUserSegmentCriterion = ( CommerceUserSegmentCriterion ) s... |
public class LayoutRefiner { /** * Check if two bonds are crossing .
* @ param beg1 first atom of first bond
* @ param end1 second atom of first bond
* @ param beg2 first atom of second bond
* @ param end2 first atom of second bond
* @ return bond is crossing */
private boolean isCrossed ( Point2d beg1 , Poin... | return Line2D . linesIntersect ( beg1 . x , beg1 . y , end1 . x , end1 . y , beg2 . x , beg2 . y , end2 . x , end2 . y ) ; |
public class GeoHash { /** * Create a direction and parity map for use in adjacent hash calculations .
* @ return map */
private static Map < Direction , Map < Parity , String > > createDirectionParityMap ( ) { } } | Map < Direction , Map < Parity , String > > m = newHashMap ( ) ; m . put ( Direction . BOTTOM , GeoHash . < Parity , String > newHashMap ( ) ) ; m . put ( Direction . TOP , GeoHash . < Parity , String > newHashMap ( ) ) ; m . put ( Direction . LEFT , GeoHash . < Parity , String > newHashMap ( ) ) ; m . put ( Direction ... |
public class TypeLord { /** * List < Foo > ArrayList < Foo > List */
public static IType findParameterizedType ( IType sourceType , IType rawGenericType ) { } } | return findParameterizedType ( sourceType , rawGenericType , false ) ; |
public class FunctionExtensions { /** * Returns a composed { @ code Procedure1 } that performs , in sequence , the { @ code before }
* operation followed by the { @ code after } operation . If performing either
* operation throws an exception , it is relayed to the caller of the
* composed operation . If performi... | if ( after == null ) throw new NullPointerException ( "after" ) ; if ( before == null ) throw new NullPointerException ( "before" ) ; return new Procedures . Procedure1 < T > ( ) { @ Override public void apply ( T p ) { before . apply ( p ) ; after . apply ( p ) ; } } ; |
public class MuteDirector { /** * Mute or unmute the specified user . */
public void setMuted ( Name username , boolean mute ) { } } | boolean changed = mute ? _mutelist . add ( username ) : _mutelist . remove ( username ) ; String feedback ; if ( mute ) { feedback = "m.muted" ; } else { feedback = changed ? "m.unmuted" : "m.notmuted" ; } // always give some feedback to the user
_chatdir . displayFeedback ( null , MessageBundle . tcompose ( feedback ,... |
public class Abbreviations { /** * Convenience method to add an abbreviation from a SMILES string .
* @ param line the smiles to add with a title ( the label )
* @ return the abbreviation was added , will be false if no title supplied
* @ throws InvalidSmilesException the SMILES was not valid */
public boolean ad... | return add ( smipar . parseSmiles ( line ) , getSmilesSuffix ( line ) ) ; |
public class GeometryEngine { /** * Imports the MapGeometry from its JSON representation . M and Z values are
* not imported from JSON representation .
* See OperatorImportFromJson .
* @ param json
* The JSON representation of the geometry ( with spatial
* reference ) .
* @ return The MapGeometry instance c... | MapGeometry geom = OperatorImportFromGeoJson . local ( ) . execute ( importFlags , type , json , null ) ; return geom ; |
public class PowerMock { /** * Reset a list of class mocks . */
public static synchronized void reset ( Class < ? > ... classMocks ) { } } | for ( Class < ? > type : classMocks ) { final MethodInvocationControl invocationHandler = MockRepository . getStaticMethodInvocationControl ( type ) ; if ( invocationHandler != null ) { invocationHandler . reset ( ) ; } NewInvocationControl < ? > newInvocationControl = MockRepository . getNewInstanceControl ( type ) ; ... |
public class Redisson { /** * Create Reactive Redisson instance with provided config
* @ param config for Redisson
* @ return Redisson instance */
public static RedissonRxClient createRx ( Config config ) { } } | RedissonRx react = new RedissonRx ( config ) ; if ( config . isReferenceEnabled ( ) ) { react . enableRedissonReferenceSupport ( ) ; } return react ; |
public class HtmlDoctype { /** * < p > Set the value of the < code > system < / code > property . < / p > */
public void setSystem ( java . lang . String system ) { } } | getStateHelper ( ) . put ( PropertyKeys . system , system ) ; handleAttribute ( "system" , system ) ; |
public class ReflectionHelper { /** * Find all declared fields of a class . Fields which are hidden by a child class are not included .
* @ param clazz class to find fields for
* @ return list of fields */
List < Field > getFields ( Class < ? > clazz ) { } } | List < Field > result = new ArrayList < > ( ) ; Set < String > fieldNames = new HashSet < > ( ) ; Class < ? > searchType = clazz ; while ( ! Object . class . equals ( searchType ) && searchType != null ) { Field [ ] fields = searchType . getDeclaredFields ( ) ; for ( Field field : fields ) { if ( ! fieldNames . contain... |
public class ModelsImpl { /** * Gets information about the intent model .
* @ param appId The application ID .
* @ param versionId The version ID .
* @ param intentId The intent classifier ID .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws ErrorResponseException throw... | return getIntentWithServiceResponseAsync ( appId , versionId , intentId ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class WorkflowInstanceDetailsController { /** * Aborts , suspends or resumes a workflow instance or retries the last failed operation
* on the instance . < br >
* Returns a redirect for a GET - after - POST . */
@ PreAuthorize ( "hasRole('ROLE_TWE_ADMIN')" ) @ RequestMapping ( method = RequestMethod . POST ,... | if ( "abort" . equals ( action ) || "suspend" . equals ( action ) || "resume" . equals ( action ) || "retry" . equals ( action ) ) { try { if ( "abort" . equals ( action ) ) { facade . abortWorkflowInstance ( woinRefNum ) ; model . addFlashAttribute ( "successMessage" , "workflow.instance.action.abort.success" ) ; } el... |
public class Nd4jBase64 { /** * Convert an { @ link INDArray }
* to numpy byte array using
* { @ link Nd4j # toNpyByteArray ( INDArray ) }
* @ param arr the input array
* @ return the base 64ed binary
* @ throws IOException */
public static String base64StringNumpy ( INDArray arr ) throws IOException { } } | byte [ ] bytes = Nd4j . toNpyByteArray ( arr ) ; return Base64 . encodeBase64String ( bytes ) ; |
public class EllipseClustersIntoGrid { /** * Finds the node with the index of ' value ' */
public static int indexOf ( List < Node > list , int value ) { } } | for ( int i = 0 ; i < list . size ( ) ; i ++ ) { if ( list . get ( i ) . which == value ) return i ; } return - 1 ; |
public class TimerTrace { /** * Turn profiling on or off .
* @ param active */
public static void setActive ( boolean active ) { } } | if ( active ) System . setProperty ( ACTIVATE_PROPERTY , "true" ) ; else System . clearProperty ( ACTIVATE_PROPERTY ) ; TimerTrace . active = active ; |
public class StandardDdlParser { /** * Parses DDL CREATE statement based on SQL 92 specifications .
* @ param tokens the { @ link DdlTokenStream } representing the tokenized DDL content ; may not be null
* @ param parentNode the parent { @ link AstNode } node ; may not be null
* @ return the parsed CREATE { @ lin... | assert tokens != null ; assert parentNode != null ; AstNode stmtNode = null ; // DEFAULT DOES NOTHING
// Subclasses can implement additional parsing
// System . out . println ( " > > > FOUND [ CREATE ] STATEMENT : TOKEN = " + tokens . consume ( ) + " " + tokens . consume ( ) + " " +
// tokens . consume ( ) ) ;
// SQL 9... |
public class SpringFutureUtils { /** * * * * * * Converting to ListenableFuture * * * * * */
public static < T > ListenableFuture < T > createListenableFuture ( ValueSourceFuture < T > valueSource ) { } } | if ( valueSource instanceof ListenableFutureBackedValueSourceFuture ) { return ( ( ListenableFutureBackedValueSourceFuture < T > ) valueSource ) . getWrappedFuture ( ) ; } else { return new ValueSourceFutureBackedListenableFuture < > ( valueSource ) ; } |
public class Clock { /** * Defines if alarm markers should be drawn .
* @ param VISIBLE */
public void setAlarmsVisible ( final boolean VISIBLE ) { } } | if ( null == alarmsVisible ) { _alarmsVisible = VISIBLE ; fireUpdateEvent ( REDRAW_EVENT ) ; } else { alarmsVisible . set ( VISIBLE ) ; } |
public class XmlReportAbstract { /** * Transform time into ISO 8601 string . */
protected static String fromTime ( final long time ) { } } | Date date = new Date ( time ) ; // Waiting for Java 7 : SimpleDateFormat ( " yyyy - MM - dd ' T ' HH : mm : ssXXX " ) ;
String formatted = new SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ssZ" ) . format ( date ) ; return formatted . substring ( 0 , 22 ) + ":" + formatted . substring ( 22 ) ; |
public class CommerceDiscountRuleUtil { /** * Returns the first commerce discount rule in the ordered set where commerceDiscountId = & # 63 ; .
* @ param commerceDiscountId the commerce discount ID
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ return th... | return getPersistence ( ) . fetchByCommerceDiscountId_First ( commerceDiscountId , orderByComparator ) ; |
public class Bytes { /** * Returns an Observable stream of byte arrays from the given
* { @ link InputStream } between 1 and { @ code size } bytes .
* @ param is
* input stream of bytes
* @ param size
* max emitted byte array size
* @ return a stream of byte arrays */
public static Observable < byte [ ] > f... | return Observable . create ( new OnSubscribeInputStream ( is , size ) ) ; |
public class ConfigArgP { /** * Attempts to decode the passed dot delimited as a system property , and if not found , attempts a decode as an
* environmental variable , replacing the dots with underscores . e . g . for the key : < b > < code > buffer . size . max < / code > < / b > ,
* a system property named < b >... | String value = System . getProperty ( key , System . getenv ( key . replace ( '.' , '_' ) ) ) ; return value != null ? value : defaultValue ; |
public class CharsetEncoder { /** * Tells whether or not this encoder can encode the given character .
* < p > This method returns < tt > false < / tt > if the given character is a
* surrogate character ; such characters can be interpreted only when they
* are members of a pair consisting of a high surrogate foll... | CharBuffer cb = CharBuffer . allocate ( 1 ) ; cb . put ( c ) ; cb . flip ( ) ; return canEncode ( cb ) ; |
public class FuncString { /** * Execute the function . The function must return
* a valid object .
* @ param xctxt The current execution context .
* @ return A valid XObject .
* @ throws javax . xml . transform . TransformerException */
public XObject execute ( XPathContext xctxt ) throws javax . xml . transfor... | return ( XString ) getArg0AsString ( xctxt ) ; |
public class Base32 { /** * Encodes the given bytes into a base - 32 string .
* @ param in
* an array containing the bytes to encode .
* @ param off
* the start offset of the data within { @ code in } .
* @ param len
* the number of bytes to encode .
* @ return The base - 32 string . */
public static Stri... | return inst . encode ( in , off , len , null , 0 ) . toString ( ) ; |
public class MetadataLocationUnmarshaller { /** * { @ inheritDoc } */
@ Override protected void processChildElement ( XMLObject parentSAMLObject , XMLObject childSAMLObject ) throws UnmarshallingException { } } | MetadataLocation mdl = ( MetadataLocation ) parentSAMLObject ; if ( childSAMLObject instanceof Endpoint ) { mdl . getEndpoints ( ) . add ( ( Endpoint ) childSAMLObject ) ; } else if ( childSAMLObject instanceof KeyInfo ) { mdl . setKeyInfo ( ( KeyInfo ) childSAMLObject ) ; } else { super . processChildElement ( parentS... |
public class CmsHtmlImport { /** * Builds a map with all parents of the destination directory to the real file system . < p >
* So links to resources of outside the import folder can be found . < p > */
private void buildParentPath ( ) { } } | String destFolder = m_destinationDir ; String inputDir = m_inputDir . replace ( '\\' , '/' ) ; if ( ! inputDir . endsWith ( "/" ) ) { inputDir += "/" ; } int pos = inputDir . lastIndexOf ( "/" ) ; while ( ( pos > 0 ) && ( destFolder != null ) ) { inputDir = inputDir . substring ( 0 , pos ) ; m_parents . put ( inputDir ... |
public class BallColorFolderIcon { /** * Calculates the color of the status ball for the owner based on its descendants .
* < br >
* Kanged from Branch API ( original author Stephen Connolly ) .
* @ return the color of the status ball for the owner . */
@ Nonnull private BallColor calculateBallColor ( ) { } } | if ( owner instanceof TemplateDrivenMultiBranchProject && ( ( TemplateDrivenMultiBranchProject ) owner ) . isDisabled ( ) ) { return BallColor . DISABLED ; } BallColor c = BallColor . DISABLED ; boolean animated = false ; for ( Job job : owner . getAllJobs ( ) ) { BallColor d = job . getIconColor ( ) ; animated |= d . ... |
public class LocalSession { /** * / * ( non - Javadoc )
* @ see javax . jms . Session # unsubscribe ( java . lang . String ) */
@ Override public void unsubscribe ( String subscriptionName ) throws JMSException { } } | externalAccessLock . readLock ( ) . lock ( ) ; try { checkNotClosed ( ) ; if ( StringTools . isEmpty ( subscriptionName ) ) throw new FFMQException ( "Empty subscription name" , "INVALID_SUBSCRIPTION_NAME" ) ; // Remove remaining subscriptions on all topics
engine . unsubscribe ( connection . getClientID ( ) , subscrip... |
public class CmsRoleManager { /** * Returns all groups of organizational units for which the current user
* has the { @ link CmsRole # ACCOUNT _ MANAGER } role . < p >
* @ param cms the current cms context
* @ param ouFqn the fully qualified name of the organizational unit
* @ param includeSubOus if sub organiz... | List < CmsGroup > groups = new ArrayList < CmsGroup > ( ) ; Iterator < CmsOrganizationalUnit > it = getOrgUnitsForRole ( cms , CmsRole . ACCOUNT_MANAGER . forOrgUnit ( ouFqn ) , includeSubOus ) . iterator ( ) ; while ( it . hasNext ( ) ) { CmsOrganizationalUnit orgUnit = it . next ( ) ; groups . addAll ( OpenCms . getO... |
public class UndirectedMultigraph { /** * { @ inheritDoc } */
public UndirectedMultigraph < T > copy ( Set < Integer > toCopy ) { } } | // special case for If the called is requesting a copy of the entire
// graph , which is more easily handled with the copy constructor
if ( toCopy . size ( ) == order ( ) && toCopy . equals ( vertices ( ) ) ) return new UndirectedMultigraph < T > ( this ) ; UndirectedMultigraph < T > g = new UndirectedMultigraph < T > ... |
public class LabelingJobDataAttributesMarshaller { /** * Marshall the given parameter object . */
public void marshall ( LabelingJobDataAttributes labelingJobDataAttributes , ProtocolMarshaller protocolMarshaller ) { } } | if ( labelingJobDataAttributes == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( labelingJobDataAttributes . getContentClassifiers ( ) , CONTENTCLASSIFIERS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to mars... |
public class XmlUtils { /** * Concatenate the given { @ code elements } using the given { @ code delimiter } to concatenate . */
@ Nonnull public static String join ( @ Nonnull Iterable < String > elements , @ Nonnull String delimiter ) { } } | StringBuilder result = new StringBuilder ( ) ; Iterator < String > it = elements . iterator ( ) ; while ( it . hasNext ( ) ) { String element = it . next ( ) ; result . append ( element ) ; if ( it . hasNext ( ) ) { result . append ( delimiter ) ; } } return result . toString ( ) ; |
public class Event { /** * Add a new event into array with selected event type and input date .
* @ param date The event date
* @ param useTemp True for using template to create new data
* @ return The generated event data map */
public HashMap addEvent ( String date , boolean useTemp ) { } } | HashMap ret = new HashMap ( ) ; if ( useTemp ) { ret . putAll ( template ) ; } else { ret . put ( "event" , eventType ) ; } ret . put ( "date" , date ) ; getInertIndex ( ret ) ; events . add ( next , ret ) ; return ret ; |
public class RuleItem { /** * Gets the dateRuleItem value for this RuleItem .
* @ return dateRuleItem */
public com . google . api . ads . adwords . axis . v201809 . rm . DateRuleItem getDateRuleItem ( ) { } } | return dateRuleItem ; |
public class VdmEditor { /** * React to changed selection .
* @ since 3.0 */
protected void selectionChanged ( ) { } } | if ( getSelectionProvider ( ) == null ) return ; INode element = computeHighlightRangeSourceReference ( ) ; // if
// ( getPreferenceStore ( ) . getBoolean ( PreferenceConstants . EDITOR _ SYNC _ OUTLINE _ ON _ CURSOR _ MOVE ) )
synchronizeOutlinePage ( element ) ; // if ( fIsBreadcrumbVisible & & fBreadcrumb ! = null &... |
public class SSTable { /** * If the given @ param key occupies only part of a larger buffer , allocate a new buffer that is only
* as large as necessary . */
public static DecoratedKey getMinimalKey ( DecoratedKey key ) { } } | return key . getKey ( ) . position ( ) > 0 || key . getKey ( ) . hasRemaining ( ) || ! key . getKey ( ) . hasArray ( ) ? new BufferDecoratedKey ( key . getToken ( ) , HeapAllocator . instance . clone ( key . getKey ( ) ) ) : key ; |
public class CollectionInterpreter { /** * < p > applyRowStatistic . < / p >
* @ param rowStats a { @ link com . greenpepper . Statistics } object . */
protected void applyRowStatistic ( Statistics rowStats ) { } } | if ( rowStats . exceptionCount ( ) > 0 ) { stats . exception ( ) ; } else if ( rowStats . wrongCount ( ) > 0 ) { stats . wrong ( ) ; } else if ( rowStats . rightCount ( ) > 0 ) { stats . right ( ) ; } else { stats . ignored ( ) ; } |
public class AbstractTreebankParserParams { /** * Returns an EquivalenceClasser that classes typed dependencies
* by the syntactic categories of mother , head and daughter ,
* plus direction .
* @ return An Equivalence class for typed dependencies */
public static EquivalenceClasser < List < String > , String > t... | return new EquivalenceClasser < List < String > , String > ( ) { public String equivalenceClass ( List < String > s ) { if ( s . get ( 5 ) . equals ( leftHeaded ) ) return s . get ( 2 ) + '(' + s . get ( 3 ) + "->" + s . get ( 4 ) + ')' ; return s . get ( 2 ) + '(' + s . get ( 4 ) + "<-" + s . get ( 3 ) + ')' ; } } ; |
public class SftpClient { /** * Returns the attributes of the file from the remote computer .
* @ param path
* the path of the file on the remote computer
* @ return the attributes
* @ throws SftpStatusException
* @ throws SshException */
public SftpFileAttributes stat ( String path ) throws SftpStatusExcepti... | String actual = resolveRemotePath ( path ) ; return sftp . getAttributes ( actual ) ; |
public class Node { /** * syck _ str _ blow _ away _ commas */
public void strBlowAwayCommas ( ) { } } | Data . Str d = ( ( Data . Str ) data ) ; byte [ ] buf = d . ptr . buffer ; int go = d . ptr . start ; int end = go + d . len ; for ( ; go < end ; go ++ ) { if ( buf [ go ] == ',' ) { d . len -- ; end -- ; System . arraycopy ( buf , go + 1 , buf , go , end - go ) ; } } |
public class WSRdbManagedConnectionImpl { /** * Process request for a LOCAL _ TRANSACTION _ COMMITTED event .
* @ param handle the Connection handle requesting to send an event .
* @ throws ResourceException if an error occurs committing the transaction or the state is
* not valid . */
public void processLocalTra... | // A application level local transaction has been committed .
final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "processLocalTransactionCommittedEvent" , handle ) ; if ( tc . isDebugEnabled ( ) ) { String cId = null ; try { cI... |
public class NameBasedCandidateFilter { /** * In this case we have to check whether we have conflicting naming
* fields . E . g . 2 fields of the same type , but we have to make sure
* we match on the correct name .
* Therefore we have to go through all other fields and make sure
* whenever we find a field that... | String mockName = getMockName ( mocks . iterator ( ) . next ( ) ) . toString ( ) ; for ( Field otherCandidateField : allRemainingCandidateFields ) { if ( ! otherCandidateField . equals ( candidateFieldToBeInjected ) && otherCandidateField . getType ( ) . equals ( candidateFieldToBeInjected . getType ( ) ) && otherCandi... |
public class InterpolateTransform { /** * Puts the next data point of an iterator in the next section of internal buffer .
* @ param i The index of the iterator .
* @ param datapoint The last data point returned by that iterator . */
private void putDataPoint ( int i , Entry < Long , Double > datapoint ) { } } | timestamps [ i ] = datapoint . getKey ( ) ; values [ i ] = datapoint . getValue ( ) ; |
public class Job { /** * Set all unknown fields
* @ param unknownFields the new unknown fields */
@ JsonIgnore public void setUnknownFields ( final Map < String , Object > unknownFields ) { } } | this . unknownFields . clear ( ) ; this . unknownFields . putAll ( unknownFields ) ; |
public class UnicodeSet { /** * Modifies this set to contain those code points which have the
* given value for the given property . Prior contents of this
* set are lost .
* @ param propertyAlias A string of the property alias .
* @ param valueAlias A string of the value alias .
* @ param symbols if not null... | checkFrozen ( ) ; int p ; int v ; boolean mustNotBeEmpty = false , invert = false ; if ( symbols != null && ( symbols instanceof XSymbolTable ) && ( ( XSymbolTable ) symbols ) . applyPropertyAlias ( propertyAlias , valueAlias , this ) ) { return this ; } if ( XSYMBOL_TABLE != null ) { if ( XSYMBOL_TABLE . applyProperty... |
public class SerializedLambdas { /** * < p > Converts a serializable lambda to its { @ link SerializedLambda } form . < / p >
* < p > See < a href = " https : / / www . jcp . org / en / jsr / detail ? id = 335 " > JSR 335 < / a > for more information : < / p >
* < blockquote > As with inner classes , serialization ... | Ensure . that ( lambda != null , "lambda != null" ) ; try { Method writeReplace = lambda . getClass ( ) . getDeclaredMethod ( "writeReplace" ) ; writeReplace . setAccessible ( true ) ; Object replacement = writeReplace . invoke ( lambda ) ; if ( ! ( replacement instanceof SerializedLambda ) ) { throw new NotASerialized... |
public class CascadingClassLoadHelper { /** * Called to give the ClassLoadHelper a chance to initialize itself , including
* the opportunity to " steal " the class loader off of the calling thread ,
* which is the thread that is initializing Quartz . */
public void initialize ( ) { } } | m_aLoadHelpers = new CommonsArrayList < > ( ) ; m_aLoadHelpers . add ( new LoadingLoaderClassLoadHelper ( ) ) ; m_aLoadHelpers . add ( new SimpleClassLoadHelper ( ) ) ; m_aLoadHelpers . add ( new ThreadContextClassLoadHelper ( ) ) ; m_aLoadHelpers . add ( new InitThreadContextClassLoadHelper ( ) ) ; for ( final IClassL... |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EEnum getIfcRailingTypeEnum ( ) { } } | if ( ifcRailingTypeEnumEEnum == null ) { ifcRailingTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 880 ) ; } return ifcRailingTypeEnumEEnum ; |
public class RRBudgetV1_3Generator { /** * This method gets Other type description and total cost for
* ParticipantTraineeSupportCosts based on BudgetPeriodInfo .
* @ param periodInfo
* ( BudgetPeriodInfo ) budget period entry .
* @ return Other other participant trainee support costs corresponding to
* the B... | gov . grants . apply . forms . rrBudget13V13 . BudgetYearDataType . ParticipantTraineeSupportCosts . Other other = gov . grants . apply . forms . rrBudget13V13 . BudgetYearDataType . ParticipantTraineeSupportCosts . Other . Factory . newInstance ( ) ; other . setDescription ( OTHERCOST_DESCRIPTION ) ; ScaleTwoDecimal o... |
public class DefaultFormModel { /** * Initialization of DefaultFormModel . Adds a listener on the Enabled
* property in order to switch validating state on or off . When disabling a
* formModel , no validation will happen . */
protected void init ( ) { } } | addPropertyChangeListener ( ENABLED_PROPERTY , new PropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent evt ) { validatingUpdated ( ) ; } } ) ; validationResultsModel . addPropertyChangeListener ( ValidationResultsModel . HAS_ERRORS_PROPERTY , childStateChangeHandler ) ; |
public class AbstractGedLine { /** * Read the source data until the a line is encountered at the same level as
* this one . That allows the reading of children .
* @ return The GedLine at the current level . Null if the end of data is
* reached first .
* @ throws IOException If this is a file source and we enco... | AbstractGedLine gedLine = source . createGedLine ( this ) ; while ( true ) { if ( gedLine == null || gedLine . getLevel ( ) == - 1 ) { break ; } if ( gedLine . getLevel ( ) <= this . getLevel ( ) ) { return gedLine ; } children . add ( gedLine ) ; gedLine = gedLine . readToNext ( ) ; } return null ; |
public class MembershipTypeHandlerImpl { /** * Persists new membership type entity . */
private MembershipType saveMembershipType ( Session session , MembershipTypeImpl mType , boolean broadcast ) throws Exception { } } | Node mtNode = getOrCreateMembershipTypeNode ( session , mType ) ; boolean isNew = mtNode . isNew ( ) ; if ( broadcast ) { preSave ( mType , isNew ) ; } String oldType = mtNode . getName ( ) . equals ( JCROrganizationServiceImpl . JOS_MEMBERSHIP_TYPE_ANY ) ? ANY_MEMBERSHIP_TYPE : mtNode . getName ( ) ; String newType = ... |
public class Headers { /** * / * - - - - - [ Set ] - - - - - */
public void set ( AsciiString name , String value ) { } } | if ( name == null ) return ; if ( value == null ) { remove ( name ) ; return ; } Header head = entry ( name , true ) ; if ( head . value == null ) head . value = value ; else { head . value = value ; Header next = head . sameNext ; head . sameNext = null ; head . samePrev = head ; removeSameNext ( next ) ; } assert val... |
public class DiskBasedCache { /** * Puts the entry with the specified key into the cache . */
@ Override public synchronized void put ( String key , Entry entry ) { } } | pruneIfNeeded ( entry . data . length ) ; File file = getFileForKey ( key ) ; try { BufferedOutputStream fos = new BufferedOutputStream ( new FileOutputStream ( file ) ) ; CacheHeader e = new CacheHeader ( key , entry ) ; boolean success = e . writeHeader ( fos ) ; if ( ! success ) { fos . close ( ) ; VolleyLog . d ( "... |
public class FragmentRedirectStrategy { /** * For local redirects , converts to relative urls .
* @ param request
* must be an { @ link OutgoingRequest } . */
@ Override public URI getLocationURI ( HttpRequest request , HttpResponse response , HttpContext context ) throws ProtocolException { } } | URI uri = this . redirectStrategy . getLocationURI ( request , response , context ) ; String resultingPageUrl = uri . toString ( ) ; DriverRequest driverRequest = ( ( OutgoingRequest ) request ) . getOriginalRequest ( ) ; // Remove context if present
if ( StringUtils . startsWith ( resultingPageUrl , driverRequest . ge... |
public class AbstractSequenceClassifier { /** * Write the classifications of the Sequence classifier out to a writer in a
* format determined by the DocumentReaderAndWriter used .
* @ param doc Documents to write out
* @ param printWriter Writer to use for output
* @ throws IOException If an IO problem */
publi... | if ( flags . lowerNewgeneThreshold ) { return ; } if ( flags . numRuns <= 1 ) { readerAndWriter . printAnswers ( doc , printWriter ) ; // out . println ( ) ;
printWriter . flush ( ) ; } |
public class StringNumberParser { /** * Parse given text as number representation . < br >
* < br > E . g . ' 2k ' will be returned as 2048 number .
* < br > Next formats are supported ( case insensitive ) : < br > kilobytes - k , kb < br > megabytes - m , mb
* < br > gigabytes - g , gb < br > terabytes - t , tb ... | final String text = numberText . toLowerCase ( ) . toUpperCase ( ) ; if ( text . endsWith ( "K" ) ) { return Double . valueOf ( text . substring ( 0 , text . length ( ) - 1 ) ) * 1024d ; } else if ( text . endsWith ( "KB" ) ) { return Double . valueOf ( text . substring ( 0 , text . length ( ) - 2 ) ) * 1024d ; } else ... |
public class Resolve { /** * where */
private Symbol choose ( Symbol boundSym , Symbol unboundSym ) { } } | if ( lookupSuccess ( boundSym ) && lookupSuccess ( unboundSym ) ) { return ambiguityError ( boundSym , unboundSym ) ; } else if ( lookupSuccess ( boundSym ) || ( canIgnore ( unboundSym ) && ! canIgnore ( boundSym ) ) ) { return boundSym ; } else if ( lookupSuccess ( unboundSym ) || ( canIgnore ( boundSym ) && ! canIgno... |
public class PolicyDefinitionsInner { /** * Creates or updates a policy definition .
* @ param policyDefinitionName The name of the policy definition to create .
* @ param parameters The policy definition properties .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the ob... | return createOrUpdateWithServiceResponseAsync ( policyDefinitionName , parameters ) . map ( new Func1 < ServiceResponse < PolicyDefinitionInner > , PolicyDefinitionInner > ( ) { @ Override public PolicyDefinitionInner call ( ServiceResponse < PolicyDefinitionInner > response ) { return response . body ( ) ; } } ) ; |
public class Input { /** * required参数视图 , 如果不存在毕传参数 , 那么返回空数组 , 而不是返回null */
@ JSONField ( serialize = false ) public List < Obj > getRequired ( ) { } } | List < Obj > requred = new ArrayList < > ( ) ; if ( getList ( ) != null ) { for ( Obj obj : getList ( ) ) { if ( obj . isRequired ( ) ) { requred . add ( obj ) ; } } } return requred ; |
public class Token { /** * Return the Tag that matches the given class */
@ SuppressWarnings ( "unchecked" ) public < T extends Tag > T getTag ( Class < T > tagClass ) { } } | List < T > matches = getTags ( tagClass ) ; T matchingTag = null ; if ( matches . size ( ) > 0 ) { matchingTag = matches . get ( 0 ) ; } // if ( matches . size ( ) > = 2 ) {
// throw new IllegalStateException ( " Multiple identical tags found ( " + matches + " ) " ) ;
// else if ( matches . size ( ) = = 1 ) {
// matchi... |
public class GitLabApi { /** * < p > Logs into GitLab using OAuth2 with the provided { @ code username } and { @ code password } ,
* and creates a new { @ code GitLabApi } instance using returned access token . < / p >
* @ param url GitLab URL
* @ param username user name for which private token should be obtaine... | try ( SecretString secretPassword = new SecretString ( password ) ) { return ( GitLabApi . oauth2Login ( ApiVersion . V4 , url , username , secretPassword , null , null , false ) ) ; } |
public class IOUtils { /** * generic processing of a stream with a custom buffer
* @ param inputStream
* the input stream to process
* @ param handler
* the handler to apply on the stream
* @ param buffer
* the buffer to use for stream handling
* @ throws IOException */
public static void process ( InputS... | LOGGER . trace ( "process(InputStream, StreamHandler, byte[])" ) ; LOGGER . debug ( "buffer size: {} bytes" , buffer != null ? buffer . length : "null" ) ; int read = - 1 ; while ( ( read = inputStream . read ( buffer ) ) != - 1 ) { LOGGER . debug ( "{} bytes read from stream" , read ) ; handler . handleStreamBuffer ( ... |
public class PassiveScanThread { /** * Returns the full set ( both default and " opted - in " ) which are to be
* applicable for passive scanning .
* @ return a set of { @ code Integer } representing all of the History Types
* which are applicable for passive scanning .
* @ since TODO add version */
public stat... | Set < Integer > allApplicableTypes = new HashSet < Integer > ( ) ; allApplicableTypes . addAll ( PluginPassiveScanner . getDefaultHistoryTypes ( ) ) ; if ( ! optedInHistoryTypes . isEmpty ( ) ) { allApplicableTypes . addAll ( optedInHistoryTypes ) ; } return allApplicableTypes ; |
public class StringUtils { /** * 将Exception的Stack Trace转为字符串 */
static public String getStackTrace ( Exception e ) { } } | ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; PrintStream ps = new PrintStream ( baos ) ; e . printStackTrace ( ps ) ; ps . flush ( ) ; try { return baos . toString ( "UTF-8" ) ; } catch ( UnsupportedEncodingException ee ) { return baos . toString ( ) ; } |
public class Symbol { /** * Adds the HIBC prefix and check digit to the specified data , returning the resultant data string .
* @ see < a href = " https : / / sourceforge . net / p / zint / code / ci / master / tree / backend / library . c " > Corresponding Zint code < / a > */
private String hibcProcess ( String so... | // HIBC 2.6 allows up to 110 characters , not including the " + " prefix or the check digit
if ( source . length ( ) > 110 ) { throw new OkapiException ( "Data too long for HIBC LIC" ) ; } source = source . toUpperCase ( ) ; if ( ! source . matches ( "[A-Z0-9-\\. \\$/+\\%]+?" ) ) { throw new OkapiException ( "Invalid c... |
public class WorkflowFactoryImpl { /** * Starts a new row one indentation level to the left . */
private Tree < Row > downLeft ( Element token ) { } } | return current = current . getParent ( ) . addSibling ( Tree . of ( new Row ( token ) ) ) ; |
public class NodeGroupClient { /** * Deletes the specified NodeGroup resource .
* < p > Sample code :
* < pre > < code >
* try ( NodeGroupClient nodeGroupClient = NodeGroupClient . create ( ) ) {
* ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName . of ( " [ PROJECT ] " , " [ ZONE ] " , " [ NODE _ G... | DeleteNodeGroupHttpRequest request = DeleteNodeGroupHttpRequest . newBuilder ( ) . setNodeGroup ( nodeGroup ) . build ( ) ; return deleteNodeGroup ( request ) ; |
public class ObjectUtils { /** * Returns the Long represented by the given value , or null if not an long value . */
private static Object toLong ( BigDecimal value ) { } } | Object number ; try { number = value . scale ( ) == 0 ? Long . valueOf ( value . longValueExact ( ) ) : null ; } catch ( Exception e ) { number = null ; } return number ; |
public class WebSocketExtensionFactory { /** * Returns a list of extensions that want to be part of websocket request
* @ param address WsResourceAddress to which a websocket connection is being attempted
* @ param extensionHelper extension helper
* @ return list of extensions that want to be part of the request ... | List < WebSocketExtension > list = new ArrayList < > ( ) ; for ( WebSocketExtensionFactorySpi factory : factoriesRO . values ( ) ) { WebSocketExtension extension = factory . offer ( extensionHelper , address ) ; if ( extension != null ) { list . add ( extension ) ; } } return list ; |
public class HomographyInducedStereo3Pts { /** * b = [ ( x cross ( A * x ) ) ^ T ( x cross e2 ) ] / | | x cross e2 | | ^ 2 */
private double computeB ( Point2D_F64 x ) { } } | GeometryMath_F64 . mult ( A , x , Ax ) ; GeometryMath_F64 . cross ( x , Ax , t0 ) ; GeometryMath_F64 . cross ( x , e2 , t1 ) ; double top = GeometryMath_F64 . dot ( t0 , t1 ) ; double bottom = t1 . normSq ( ) ; return top / bottom ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.