signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ScanResultObject { /** * Load the class named returned by { @ link # getClassInfo ( ) } , or if that returns null , the class named by * { @ link # getClassName ( ) } . Returns a { @ code Class < ? > } reference for the class , cast to the requested superclass * or interface type . * @ param < T > ...
return loadClass ( superclassOrInterfaceType , /* ignoreExceptions = */ false ) ;
public class Deployment { /** * Use { @ link # getFilesMap ( ) } instead . */ @ java . lang . Deprecated public java . util . Map < java . lang . String , com . google . appengine . v1 . FileInfo > getFiles ( ) { } }
return getFilesMap ( ) ;
public class UriUtil { /** * Return a URI for the given resource ID . * The returned URI consists of a { @ link # LOCAL _ RESOURCE _ SCHEME } scheme and * the resource ID as path . * @ param resourceId the resource ID to use * @ return the URI */ public static Uri getUriForResourceId ( int resourceId ) { } }
return new Uri . Builder ( ) . scheme ( LOCAL_RESOURCE_SCHEME ) . path ( String . valueOf ( resourceId ) ) . build ( ) ;
public class UnitVectorProperty3dfx { /** * Change the coordinates of the vector . * @ param x x coordinate of the vector . * @ param y y coordinate of the vector . * @ param z z coordinate of the vector . */ public void set ( double x , double y , double z ) { } }
assert Vector3D . isUnitVector ( x , y , z ) : AssertMessages . normalizedParameters ( 0 , 1 , 2 ) ; if ( ( x != getX ( ) || y != getY ( ) || z != getZ ( ) ) && ! isBound ( ) ) { final Vector3dfx v = super . get ( ) ; v . set ( x , y , z ) ; fireValueChangedEvent ( ) ; }
public class PGPRGImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setYmOset ( Integer newYmOset ) { } }
Integer oldYmOset = ymOset ; ymOset = newYmOset ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . PGPRG__YM_OSET , oldYmOset , ymOset ) ) ;
public class LdapTemplate { /** * { @ inheritDoc } */ @ Override public boolean authenticate ( Name base , String filter , String password , final AuthenticatedLdapEntryContextCallback callback ) { } }
return authenticate ( base , filter , password , callback , new NullAuthenticationErrorCallback ( ) ) ;
public class AssetRendition { /** * Read dimension for original rendition from asset metadata . * @ param rendition Rendition * @ return Dimension or null */ private static @ Nullable Dimension getDimensionFromOriginal ( @ NotNull Rendition rendition ) { } }
Asset asset = rendition . getAsset ( ) ; // asset may have stored dimension in different property names long width = getAssetMetadataValueAsLong ( asset , TIFF_IMAGEWIDTH , EXIF_PIXELXDIMENSION ) ; long height = getAssetMetadataValueAsLong ( asset , TIFF_IMAGELENGTH , EXIF_PIXELYDIMENSION ) ; return toDimension ( width...
public class BestMatchBy { /** * Returns ' best ' result from by . * If there is no result : returns null , * if there is just one that is best , * otherwise the ' bestFunction ' is applied to all results to determine best . * @ param by by to use to find elements . * @ param context context to search in . ...
WebElement element = null ; List < WebElement > elements = context . findElements ( by ) ; if ( elements . size ( ) == 1 ) { element = elements . get ( 0 ) ; } else if ( elements . size ( ) > 1 ) { element = BEST_FUNCTION . apply ( context , elements ) ; } return ( T ) element ;
public class Criteria { /** * Explicitly wrap { @ link Criteria } inside not operation . * @ since 1.4 * @ return */ public Criteria notOperator ( ) { } }
Crotch c = new Crotch ( ) ; c . setNegating ( true ) ; c . add ( this ) ; return c ;
public class XSLTAttributeDef { /** * Process an attribute string of type T _ SIMPLEPATTERNLIST into * a vector of XPath match patterns . * @ param handler non - null reference to current StylesheetHandler that is constructing the Templates . * @ param uri The Namespace URI , or an empty string . * @ param name...
try { StringTokenizer tokenizer = new StringTokenizer ( value , " \t\n\r\f" ) ; int nPatterns = tokenizer . countTokens ( ) ; Vector patterns = new Vector ( nPatterns ) ; for ( int i = 0 ; i < nPatterns ; i ++ ) { XPath pattern = handler . createMatchPatternXPath ( tokenizer . nextToken ( ) , owner ) ; patterns . addEl...
public class CmsEditor { /** * Returns the editor action for a " cancel " button . < p > * This overwrites the cancel method of the CmsDialog class . < p > * Always use this value , do not write anything directly in the html page . < p > * @ return the default action for a " cancel " button */ public String butto...
String target = null ; if ( Boolean . valueOf ( getParamDirectedit ( ) ) . booleanValue ( ) ) { // editor is in direct edit mode if ( CmsStringUtil . isNotEmpty ( getParamBacklink ( ) ) ) { // set link to the specified back link target target = getParamBacklink ( ) ; } else { // set link to the edited resource target =...
public class SibRaManagedConnection { /** * Associates an existing connection handle with this managed connection . * The connection handle may still be associated with another managed * connection or may be dissociated . * @ param connection * the connection handle * @ throws ResourceAdapterInternalException...
if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "associateConnection" , connection ) ; } if ( connection instanceof SibRaConnection ) { final SibRaConnection sibRaConnection = ( SibRaConnection ) connection ; // Dissociate it from its old managed connection...
public class FastStr { /** * Wrapper of { @ link String # replaceFirst ( String , String ) } but return FastStr inance * @ param regex the regular expression specifies the place to be replaced * @ param replacement the string to replace the found part * @ return a FastStr that has the first found part replaced */...
return unsafeOf ( Pattern . compile ( regex ) . matcher ( this ) . replaceFirst ( replacement ) ) ;
public class TableExportAction { /** * Gets a { @ code List } of ( visible ) column names for the given table . * Called when exporting the column names . * @ return the { @ code List } of column names , never { @ code null } . */ protected List < String > getColumnNames ( ) { } }
List < String > columnNamesList = new ArrayList < > ( ) ; for ( int col = 0 ; col < getTable ( ) . getColumnCount ( ) ; col ++ ) { columnNamesList . add ( getTable ( ) . getColumnModel ( ) . getColumn ( col ) . getHeaderValue ( ) . toString ( ) ) ; } return columnNamesList ;
public class FilelistenerReadTrx { /** * { @ inheritDoc } */ @ Override public boolean fileExists ( String pRelativePath ) { } }
String paths [ ] = this . getFilePaths ( ) ; for ( String s : paths ) { if ( s . equals ( pRelativePath ) ) { return true ; } } return false ;
public class CmsTextBox { /** * Checks if the given key code represents a functional key . < p > * @ param keyCode the key code to check * @ return < code > true < / code > if the given key code represents a functional key */ protected boolean isNavigationKey ( int keyCode ) { } }
for ( int i = 0 ; i < NAVIGATION_CODES . length ; i ++ ) { if ( NAVIGATION_CODES [ i ] == keyCode ) { return true ; } } return false ;
public class StringBlock { /** * ( Comment taken from platform ResourceTypes . cpp ) * Strings in UTF - 16 format have length indicated by a length encoded in the * stored data . It is either 1 or 2 characters of length data . This allows a * maximum length of 0x7FFFFF ( 2147483647 bytes ) , but if you ' re stori...
int length = buffer . get ( ) ; if ( ( length & 0x80 ) != 0 ) { length = ( ( length & 0x7F ) << 8 ) | buffer . get ( ) ; } return length ;
public class PgBinaryWriter { /** * Writes primitive boolean to the output stream * @ param value value to write */ public void writeBoolean ( boolean value ) { } }
try { buffer . writeInt ( 1 ) ; if ( value ) { buffer . writeByte ( 1 ) ; } else { buffer . writeByte ( 0 ) ; } } catch ( Exception e ) { throw new BinaryWriteFailedException ( e ) ; }
public class StatisticalMoments { /** * Get the skewness using sample variance . * @ return Skewness */ public double getSampleSkewness ( ) { } }
if ( ! ( m2 > 0 ) || ! ( n > 2 ) ) { throw new ArithmeticException ( "Skewness not defined when variance is 0 or weight <= 2.0!" ) ; } return ( m3 * n / ( n - 1 ) / ( n - 2 ) ) / FastMath . pow ( getSampleVariance ( ) , 1.5 ) ;
public class DatabaseThreatDetectionPoliciesInner { /** * Gets a database ' s threat detection policy . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . ...
return getWithServiceResponseAsync ( resourceGroupName , serverName , databaseName ) . map ( new Func1 < ServiceResponse < DatabaseSecurityAlertPolicyInner > , DatabaseSecurityAlertPolicyInner > ( ) { @ Override public DatabaseSecurityAlertPolicyInner call ( ServiceResponse < DatabaseSecurityAlertPolicyInner > response...
public class SharedResourcesBrokerImpl { /** * Get a { @ link org . apache . gobblin . broker . iface . ConfigView } for the input scope , key , and factory . */ public < K extends SharedResourceKey > KeyedScopedConfigViewImpl < S , K > getConfigView ( S scope , K key , String factoryName ) { } }
Config config = ConfigFactory . empty ( ) ; for ( ScopedConfig < S > scopedConfig : this . scopedConfigs ) { if ( scopedConfig . getScopeType ( ) . equals ( scopedConfig . getScopeType ( ) . rootScope ( ) ) ) { config = ConfigUtils . getConfigOrEmpty ( scopedConfig . getConfig ( ) , factoryName ) . withFallback ( confi...
public class JsonUtil { /** * Gets json . * @ param kernelDims the kernel dims * @ return the json */ @ javax . annotation . Nonnull public static JsonArray getJson ( @ javax . annotation . Nonnull final int [ ] kernelDims ) { } }
@ javax . annotation . Nonnull final JsonArray array = new JsonArray ( ) ; for ( final int k : kernelDims ) { array . add ( new JsonPrimitive ( k ) ) ; } return array ;
public class AmazonEC2Client { /** * Describes the specified key pairs or all of your key pairs . * For more information about key pairs , see < a * href = " https : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / ec2 - key - pairs . html " > Key Pairs < / a > in the < i > Amazon * Elastic Compute C...
request = beforeClientExecution ( request ) ; return executeDescribeKeyPairs ( request ) ;
public class AssertUtils { /** * Assert that a Map has entries ; that is , it must not be < code > null < / code > * and must have at least one entry . * < pre class = " code " > * Assert . notEmpty ( map , & quot ; Map must have entries & quot ; ) ; * < / pre > * @ param map the map to check * @ param mess...
if ( map == null || map . isEmpty ( ) ) { throw new IllegalArgumentException ( message ) ; }
public class IfcPhysicalComplexQuantityImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < IfcPhysicalQuantity > getHasQuantities ( ) { } }
return ( EList < IfcPhysicalQuantity > ) eGet ( Ifc4Package . Literals . IFC_PHYSICAL_COMPLEX_QUANTITY__HAS_QUANTITIES , true ) ;
public class ArrayListIterate { /** * Iterates over the section of the list covered by the specified indexes . The indexes are both inclusive . If the * from is less than the to , the list is iterated in forward order . If the from is greater than the to , then the * list is iterated in the reverse order . The inde...
ListIterate . rangeCheck ( from , to , list . size ( ) ) ; if ( ArrayListIterate . isOptimizableArrayList ( list , to - from + 1 ) ) { T [ ] elements = ArrayListIterate . getInternalArray ( list ) ; InternalArrayIterate . forEachWithIndexWithoutChecks ( elements , from , to , objectIntProcedure ) ; } else { RandomAcces...
public class OperationsApi { /** * Get used skills . * Get all [ CfgSkill ] ( https : / / docs . genesys . com / Documentation / PSDK / latest / ConfigLayerRef / CfgSkill ) that are linked to existing [ CfgPerson ] ( https : / / docs . genesys . com / Documentation / PSDK / latest / ConfigLayerRef / CfgPerson ) objec...
String aioId = UUID . randomUUID ( ) . toString ( ) ; asyncCallbacks . put ( aioId , callback ) ; try { ApiAsyncSuccessResponse resp = operationsApi . getUsedSkillsAsync ( aioId ) ; if ( ! resp . getStatus ( ) . getCode ( ) . equals ( 1 ) ) { throw new ProvisioningApiException ( "Error getting used skills. Code: " + re...
public class NetUtils { /** * 添加Cookie * @ param response { @ link HttpServletResponse } * @ param name Cookie名 * @ param value Cookie值 * @ return { @ link Boolean } * @ since 1.0.8 */ public static boolean addCookie ( HttpServletResponse response , String name , String value ) { } }
return addCookie ( new Cookie ( name , value ) , response ) ;
public class Telefonnummer { /** * Liefert die Nummer der Ortsvermittlungsstelle , d . h . die Telefonnummer * ohne Vorwahl und Laenderkennzahl . * @ return z . B . " 32168" */ public Telefonnummer getRufnummer ( ) { } }
String inlandsnummer = RegExUtils . replaceAll ( this . getInlandsnummer ( ) . toString ( ) , "[ /]+" , " " ) ; return new Telefonnummer ( StringUtils . substringAfter ( inlandsnummer , " " ) . replaceAll ( " " , "" ) ) ;
public class AgentPoolsInner { /** * Creates or updates an agent pool . * Creates or updates an agent pool in the specified managed cluster . * @ param resourceGroupName The name of the resource group . * @ param managedClusterName The name of the managed cluster resource . * @ param agentPoolName The name of t...
return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , managedClusterName , agentPoolName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class TemplateExecution { /** * Import the passed classNamer ' s type present in the passed packageNamer ' s package name . */ public void require ( Namer packageNamer , Namer classNamer ) { } }
requireFirstTime ( packageNamer . getPackageName ( ) + "." + classNamer . getType ( ) ) ;
public class CollectionLiterals { /** * Creates an empty mutable { @ link HashMap } instance . * @ return a new { @ link HashMap } * @ since 2.13 */ @ Pure public static < K , V > HashMap < K , V > newHashMap ( ) { } }
return new HashMap < K , V > ( ) ;
public class CmsXmlContentDefinition { /** * Generates an XML schema for the content definition . < p > * @ return the generated XML schema */ public Document getSchema ( ) { } }
Document result ; if ( m_schemaDocument == null ) { result = DocumentHelper . createDocument ( ) ; Element root = result . addElement ( XSD_NODE_SCHEMA ) ; root . addAttribute ( XSD_ATTRIBUTE_ELEMENT_FORM_DEFAULT , XSD_ATTRIBUTE_VALUE_QUALIFIED ) ; Element include = root . addElement ( XSD_NODE_INCLUDE ) ; include . ad...
public class ResourceHandler { void handlePut ( HttpRequest request , HttpResponse response , String pathInContext , Resource resource ) throws IOException { } }
if ( log . isDebugEnabled ( ) ) log . debug ( "PUT " + pathInContext + " in " + resource ) ; boolean exists = resource != null && resource . exists ( ) ; if ( exists && ! passConditionalHeaders ( request , response , resource ) ) return ; if ( pathInContext . endsWith ( "/" ) ) { if ( ! exists ) { if ( ! resource . get...
public class AbstractPrimitiveService { /** * Configures the given operation on the given executor . * @ param operationId the operation identifier * @ param method the operation method * @ param executor the service executor */ private void configure ( OperationId operationId , Method method , ServiceExecutor ex...
if ( method . getReturnType ( ) == Void . TYPE ) { if ( method . getParameterTypes ( ) . length == 0 ) { executor . register ( operationId , ( ) -> { try { method . invoke ( this ) ; } catch ( IllegalAccessException | InvocationTargetException e ) { throw new PrimitiveException . ServiceException ( e ) ; } } ) ; } else...
public class RssGenerator { /** * Helper method to create an instance of SitemapGenerator * @ param baseUrl Base URL * @ param root If Base URL is root ( for example http : / / www . javavids . com or if * it ' s some path like http : / / www . javalibs . com / blog ) * @ return Instance of RssGenerator */ publ...
return new RssGenerator ( baseUrl , root , null , null ) ;
public class PathParser { /** * Update the target ' s data to match the source . * Before calling this , make sure canMorph ( target , source ) is true . * @ param target The target path represented in an array of PathDataNode * @ param source The source path represented in an array of PathDataNode */ public stat...
for ( int i = 0 ; i < source . length ; i ++ ) { target [ i ] . mType = source [ i ] . mType ; for ( int j = 0 ; j < source [ i ] . mParams . length ; j ++ ) { target [ i ] . mParams [ j ] = source [ i ] . mParams [ j ] ; } }
public class ResultUtil { /** * Given a list of String , do a case insensitive search for target string * Used by resultsetMetadata to search for target column name * @ param source source string list * @ param target target string to match * @ return index in the source string list that matches the target stri...
for ( int i = 0 ; i < source . size ( ) ; i ++ ) { if ( target . equalsIgnoreCase ( source . get ( i ) ) ) { return i ; } } return - 1 ;
public class LWJGL3TypeConversions { /** * Convert stencil functions to GL constants . * @ param function The function . * @ return The resulting GL constant . */ public static int stencilFunctionToGL ( final JCGLStencilFunction function ) { } }
switch ( function ) { case STENCIL_ALWAYS : return GL11 . GL_ALWAYS ; case STENCIL_EQUAL : return GL11 . GL_EQUAL ; case STENCIL_GREATER_THAN : return GL11 . GL_GREATER ; case STENCIL_GREATER_THAN_OR_EQUAL : return GL11 . GL_GEQUAL ; case STENCIL_LESS_THAN : return GL11 . GL_LESS ; case STENCIL_LESS_THAN_OR_EQUAL : ret...
public class BindContentProviderBuilder { /** * Generate on shutdown . * @ param dataSourceNameClazz * the data source name clazz */ private void generateOnShutdown ( String dataSourceNameClazz ) { } }
MethodSpec . Builder methodBuilder = MethodSpec . methodBuilder ( "shutdown" ) . addModifiers ( Modifier . PUBLIC ) . addAnnotation ( Override . class ) . returns ( Void . TYPE ) ; methodBuilder . addJavadoc ( "<p>Close database.</p>\n" ) ; methodBuilder . addJavadoc ( "\n" ) ; methodBuilder . addJavadoc ( "@see androi...
public class KEYBase { /** * Converts the DNSKEY / KEY Record to a String */ String rrToString ( ) { } }
StringBuffer sb = new StringBuffer ( ) ; sb . append ( flags ) ; sb . append ( " " ) ; sb . append ( proto ) ; sb . append ( " " ) ; sb . append ( alg ) ; if ( key != null ) { if ( Options . check ( "multiline" ) ) { sb . append ( " (\n" ) ; sb . append ( base64 . formatString ( key , 64 , "\t" , true ) ) ; sb . append...
public class Property_Builder { /** * Returns a newly - created { @ link org . inferred . freebuilder . processor . property . Property } based on * the contents of this { @ code Builder } . * @ throws IllegalStateException if any field has not been set */ public org . inferred . freebuilder . processor . property ...
Preconditions . checkState ( _unsetProperties . isEmpty ( ) , "Not set: %s" , _unsetProperties ) ; return new Value ( this ) ;
public class DeployerProxy { /** * Creates a proxied HTTP GET request to Apache Brooklyn to retrieve Sensors from a particular Entity * @ param brooklynId of the desired application to fetch . This ID may differ from SeaClouds Application ID * @ param brooklynEntityId of the desired entity . This Entity ID should b...
Invocation invocation = getJerseyClient ( ) . target ( getEndpoint ( ) + "/v1/applications/" + brooklynId + "/entities/" + brooklynEntityId + "/sensors" ) . request ( ) . buildGet ( ) ; return invocation . invoke ( ) . readEntity ( new GenericType < List < SensorSummary > > ( ) { } ) ;
public class ZipUtils { /** * Zips the contents of the specified { @ link File directory } . * @ param directory { @ link File } referring to the file system path / location containing the contents to zip . * @ return a { @ link File ZIP file } containing the compressed contents of the specified { @ link File direc...
Assert . isTrue ( FileUtils . isDirectory ( directory ) , "[%s] is not a valid directory" , directory ) ; File zip = new File ( directory . getParent ( ) , directory . getName ( ) . concat ( ZIP_FILE_EXTENSION ) ) ; Assert . state ( zip . createNewFile ( ) , "Failed to create new ZIP file [%s]" , zip ) ; try ( ZipOutpu...
public class CmsOrgUnitOverviewDialog { /** * Creates the dialog HTML for all defined widgets of the named dialog ( page ) . < p > * This overwrites the method from the super class to create a layout variation for the widgets . < p > * @ param dialog the dialog ( page ) to get the HTML for * @ return the dialog H...
StringBuffer result = new StringBuffer ( 1024 ) ; result . append ( createWidgetTableStart ( ) ) ; // show error header once if there were validation errors result . append ( createWidgetErrorHeader ( ) ) ; if ( dialog . equals ( PAGES [ 0 ] ) ) { // create the widgets for the first dialog page result . append ( dialog...
public class Log4JLogger { /** * Log an error to the Log4j Logger with < code > DEBUG < / code > priority . */ public void debug ( Object message , Throwable t ) { } }
if ( IS12 ) { getLogger ( ) . log ( FQCN , Level . DEBUG , message , t ) ; } else { getLogger ( ) . log ( FQCN , Level . DEBUG , message , t ) ; }
public class ToolDescriptor { /** * Default value for { @ link ToolInstallation # getProperties ( ) } used in the form binding . * @ since 1.305 */ public DescribableList < ToolProperty < ? > , ToolPropertyDescriptor > getDefaultProperties ( ) throws IOException { } }
DescribableList < ToolProperty < ? > , ToolPropertyDescriptor > r = new DescribableList < > ( NOOP ) ; List < ? extends ToolInstaller > installers = getDefaultInstallers ( ) ; if ( ! installers . isEmpty ( ) ) r . add ( new InstallSourceProperty ( installers ) ) ; return r ;
public class Comparer { /** * Returns the result of ( delegate = = target1 ) | | ( delegate = = target2 ) | | . . . | | ( delegate = = targetN ) * @ param targets * @ return */ public boolean any ( Object ... targets ) { } }
if ( null == targets ) { return null == this . delegate ; } for ( Object target : targets ) { if ( null == target ) { if ( null == this . delegate ) { return true ; } continue ; } if ( target == this . delegate ) { return true ; } } return false ;
public class StreamProcessor { /** * Consumes up to 4 bytes and returns them as int ( taking into account endianess ) . * Throws exception if specified number of bytes cannot be consumed . * @ param is the input stream to read bytes from * @ param numBytes the number of bytes to read * @ param isLittleEndian wh...
int value = 0 ; for ( int i = 0 ; i < numBytes ; i ++ ) { int b = is . read ( ) ; if ( b == - 1 ) { throw new IOException ( "no more bytes" ) ; } if ( isLittleEndian ) { value |= ( b & 0xFF ) << ( i * 8 ) ; } else { value = ( value << 8 ) | ( b & 0xFF ) ; } } return value ;
public class BuildWithDetails { /** * Stream build console output log as text using BuildConsoleStreamListener * Method can be used to asynchronously obtain logs for running build . * @ param listener interface used to asynchronously obtain logs * @ param poolingInterval interval ( seconds ) used to pool jenkins ...
// Calculate start and timeout final long startTime = System . currentTimeMillis ( ) ; final long timeoutTime = startTime + ( poolingTimeout * 1000 ) ; int bufferOffset = 0 ; while ( true ) { Thread . sleep ( poolingInterval * 1000 ) ; ConsoleLog consoleLog = null ; consoleLog = getConsoleOutputText ( bufferOffset , cr...
public class BatchGetObjectInformationMarshaller { /** * Marshall the given parameter object . */ public void marshall ( BatchGetObjectInformation batchGetObjectInformation , ProtocolMarshaller protocolMarshaller ) { } }
if ( batchGetObjectInformation == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( batchGetObjectInformation . getObjectReference ( ) , OBJECTREFERENCE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall r...
public class MetadataReferenceDao { /** * Query by the metadata ids * @ param fileId * file id * @ return metadata references * @ throws SQLException * upon failure */ public List < MetadataReference > queryByMetadata ( long fileId ) throws SQLException { } }
QueryBuilder < MetadataReference , Void > qb = queryBuilder ( ) ; qb . where ( ) . eq ( MetadataReference . COLUMN_FILE_ID , fileId ) ; List < MetadataReference > metadataReferences = qb . query ( ) ; return metadataReferences ;
public class AuthenticationFilter { /** * Cleans the path by removing the servlet paths and URL parameters . * @ param path a non - null path * @ return a non - null path */ static String cleanPath ( String path ) { } }
return path . replaceFirst ( "^" + ServletRegistrationComponent . REST_CONTEXT + "/" , "/" ) . replaceFirst ( "^" + ServletRegistrationComponent . WEBSOCKET_CONTEXT + "/" , "/" ) . replaceFirst ( "\\?.*" , "" ) ;
public class Right { /** * supports column level GRANT */ String getTableRightsSQL ( Table table ) { } }
StringBuffer sb = new StringBuffer ( ) ; if ( isFull ) { return Tokens . T_ALL ; } if ( isFullSelect ) { sb . append ( Tokens . T_SELECT ) ; sb . append ( ',' ) ; } else if ( selectColumnSet != null ) { sb . append ( Tokens . T_SELECT ) ; getColumnList ( table , selectColumnSet , sb ) ; sb . append ( ',' ) ; } if ( isF...
public class HttpHandler { /** * Creates an HTTP request based on the message context . * @ param msgContext the Axis message context * @ return a new { @ link HttpRequest } with content and headers populated */ private HttpRequest createHttpRequest ( MessageContext msgContext ) throws SOAPException , IOException {...
Message requestMessage = Preconditions . checkNotNull ( msgContext . getRequestMessage ( ) , "Null request message on message context" ) ; // Construct the output stream . String contentType = requestMessage . getContentType ( msgContext . getSOAPConstants ( ) ) ; ByteArrayOutputStream bos = new ByteArrayOutputStream (...
public class CoreOAuthConsumerSupport { /** * Internal use of configuring the URL for protected access , the resource details already having been loaded . * @ param url The URL . * @ param requestToken The request token . * @ param details The details . * @ param httpMethod The http method . * @ param additio...
String file ; if ( ! "POST" . equalsIgnoreCase ( httpMethod ) && ! "PUT" . equalsIgnoreCase ( httpMethod ) && ! details . isAcceptsAuthorizationHeader ( ) ) { StringBuilder fileb = new StringBuilder ( url . getPath ( ) ) ; String queryString = getOAuthQueryString ( details , requestToken , url , httpMethod , additional...
public class ParaClient { /** * Invoke a POST request to the Para API . * @ param resourcePath the subpath after ' / v1 / ' , should not start with ' / ' * @ param entity request body * @ return a { @ link Response } object */ public Response invokePost ( String resourcePath , Entity < ? > entity ) { } }
logger . debug ( "POST {}, entity: {}" , getFullPath ( resourcePath ) , entity ) ; return invokeSignedRequest ( getApiClient ( ) , accessKey , key ( true ) , POST , getEndpoint ( ) , getFullPath ( resourcePath ) , null , null , entity ) ;
public class MalisisSlot { /** * Sets the item stack size . * @ param stackSize the stack size * @ return the amount of items that were added to the slot . */ public int setItemStackSize ( int stackSize ) { } }
if ( itemStack . isEmpty ( ) ) return 0 ; int start = itemStack . getCount ( ) ; itemStack . setCount ( Math . min ( stackSize , Math . min ( itemStack . getMaxStackSize ( ) , getSlotStackLimit ( ) ) ) ) ; return itemStack . getCount ( ) - start ;
public class MRJobLauncher { /** * Add local non - jar files the job depends on to DistributedCache . */ @ SuppressWarnings ( "deprecation" ) private void addLocalFiles ( Path jobFileDir , String jobFileList , Configuration conf ) throws IOException { } }
DistributedCache . createSymlink ( conf ) ; for ( String jobFile : SPLITTER . split ( jobFileList ) ) { Path srcJobFile = new Path ( jobFile ) ; // DistributedCache requires absolute path , so we need to use makeQualified . Path destJobFile = new Path ( this . fs . makeQualified ( jobFileDir ) , srcJobFile . getName ( ...
public class RemoveAdGroup { /** * Runs the example . * @ param adWordsServices the services factory . * @ param session the session . * @ param adGroupId the ID of the ad group to remove . * @ throws ApiException if the API request failed with one or more service errors . * @ throws RemoteException if the AP...
// Get the AdGroupService . AdGroupServiceInterface adGroupService = adWordsServices . get ( session , AdGroupServiceInterface . class ) ; // Create ad group with REMOVED status . AdGroup adGroup = new AdGroup ( ) ; adGroup . setId ( adGroupId ) ; adGroup . setStatus ( AdGroupStatus . REMOVED ) ; // Create operations ....
public class PixelMarkerOverlay { /** * Sets the argument as the only point marked by this overlay . * @ param p the point to mark ; if { @ code null } , then no points will be selected */ public void setPoint ( Point p ) { } }
points . clear ( ) ; if ( p != null ) { points . add ( new Point ( p ) ) ; } repaint ( ) ;
public class CmsStringUtil { /** * Substitutes searchString in content with replaceItem . < p > * @ param content the content which is scanned * @ param searchString the String which is searched in content * @ param replaceItem the new String which replaces searchString * @ param occurences must be a " g " if a...
String translationRule = "s#" + searchString + "#" + replaceItem + "#" + occurences ; Perl5Util perlUtil = new Perl5Util ( ) ; try { return perlUtil . substitute ( translationRule , content ) ; } catch ( MalformedPerl5PatternException e ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ...
public class AT_Context { /** * Sets the left and right frame margin . * @ param frameLeft margin * @ param frameRight margin * @ return this to allow chaining */ public AT_Context setFrameLeftRightMargin ( int frameLeft , int frameRight ) { } }
if ( frameRight > - 1 && frameLeft > - 1 ) { this . frameLeftMargin = frameLeft ; this . frameRightMargin = frameRight ; } return this ;
public class FormLayoutFormBuilder { /** * Set a panel with the provided layout layout . * @ param layout JGoodies FormLayout * @ param panel JPanel on which the builder will place the components . */ public void setLayout ( FormLayout layout , JPanel panel ) { } }
this . panel = panel ; this . layout = layout ; panel . setLayout ( layout ) ; cc = new CellConstraints ( ) ; row = - 1 ;
public class FixtureFactory { /** * Creates new instance of fixture . * @ param clazz class to instantiate . * @ param < T > type to create . * @ return instance of clazz ( subclass , actually ) that will have # aroundSlimInvoke ( ) invoked on each method call . */ public < T extends InteractionAwareFixture > T c...
return create ( clazz , null , null ) ;
public class Atomix { /** * Starts the Atomix instance . * The returned future will be completed once this instance completes startup . Note that in order to complete startup , * all partitions must be able to form . For Raft partitions , that requires that a majority of the nodes in each * partition be started c...
if ( closeFuture != null ) { return Futures . exceptionalFuture ( new IllegalStateException ( "Atomix instance " + ( closeFuture . isDone ( ) ? "shutdown" : "shutting down" ) ) ) ; } LOGGER . info ( BUILD ) ; return super . start ( ) . thenRun ( ( ) -> { if ( enableShutdownHook ) { if ( shutdownHook == null ) { shutdow...
public class EmulatedFields { /** * Finds and returns the double value of a given field named { @ code name } * in the receiver . If the field has not been assigned any value yet , the * default value { @ code defaultValue } is returned instead . * @ param name * the name of the field to find . * @ param defa...
ObjectSlot slot = findMandatorySlot ( name , double . class ) ; return slot . defaulted ? defaultValue : ( ( Double ) slot . fieldValue ) . doubleValue ( ) ;
public class SynchronizedUniqueIDGeneratorFactory { /** * Get the synchronized ID generator instance . * @ param synchronizedGeneratorIdentity An instance of { @ link SynchronizedGeneratorIdentity } to ( re ) use for * acquiring the generator ID . * @ param mode Generator mode . * @ return An instance of this c...
String instanceKey = synchronizedGeneratorIdentity . getZNode ( ) ; if ( ! instances . containsKey ( instanceKey ) ) { logger . debug ( "Creating new instance." ) ; instances . putIfAbsent ( instanceKey , new BaseUniqueIDGenerator ( synchronizedGeneratorIdentity , mode ) ) ; } return instances . get ( instanceKey ) ;
public class CmsResultFacets { /** * Filters the available folder facets . < p > * @ param folderFacets the folder facets * @ return the filtered facets */ private Collection < Count > filterFolderFacets ( Collection < Count > folderFacets ) { } }
String siteRoot = A_CmsUI . getCmsObject ( ) . getRequestContext ( ) . getSiteRoot ( ) ; if ( ! siteRoot . endsWith ( "/" ) ) { siteRoot += "/" ; } Collection < Count > result = new ArrayList < Count > ( ) ; for ( Count value : folderFacets ) { if ( value . getName ( ) . startsWith ( siteRoot ) && ( value . getName ( )...
public class Request { /** * Starts a new Request configured to upload a photo to the user ' s default photo album . The photo * will be read from the specified stream . * This should only be called from the UI thread . * This method is deprecated . Prefer to call Request . newUploadPhotoRequest ( . . . ) . execu...
return newUploadPhotoRequest ( session , file , callback ) . executeAsync ( ) ;
public class ClassicLayoutManager { /** * Layout columns in groups by reading the corresponding report options . * @ throws LayoutException */ protected void layoutGroups ( ) { } }
log . debug ( "Starting groups layout..." ) ; for ( DJGroup columnsGroup : getReport ( ) . getColumnsGroups ( ) ) { JRDesignGroup jgroup = getJRGroupFromDJGroup ( columnsGroup ) ; jgroup . setStartNewPage ( columnsGroup . isStartInNewPage ( ) ) ; jgroup . setStartNewColumn ( columnsGroup . isStartInNewColumn ( ) ) ; jg...
public class AlluxioURI { /** * Returns true if the current AlluxioURI is an ancestor of another AlluxioURI . * otherwise , return false . * @ param alluxioURI potential children to check * @ return true the current alluxioURI is an ancestor of the AlluxioURI */ public boolean isAncestorOf ( AlluxioURI alluxioURI...
// To be an ancestor of another URI , authority and scheme must match if ( ! Objects . equals ( getAuthority ( ) , alluxioURI . getAuthority ( ) ) ) { return false ; } if ( ! Objects . equals ( getScheme ( ) , alluxioURI . getScheme ( ) ) ) { return false ; } return PathUtils . hasPrefix ( PathUtils . normalizePath ( a...
public class FileSystem { /** * Normalize the given string contains a Windows & reg ; native long filename * and replies a Java - standard version . * < p > Long filenames ( LFN ) , spelled " long file names " by Microsoft Corporation , * are Microsoft ' s way of implementing filenames longer than the 8.3, * or...
final String fn = extractLocalPath ( filename ) ; if ( fn != null && fn . length ( ) > 0 ) { final Pattern pattern = Pattern . compile ( WINDOW_NATIVE_FILENAME_PATTERN ) ; final Matcher matcher = pattern . matcher ( fn ) ; if ( matcher . find ( ) ) { return new File ( fn . replace ( WINDOWS_SEPARATOR_CHAR , File . sepa...
public class PaymentProtocol { /** * Parse transactions from payment message . * @ param params network parameters ( needed for transaction deserialization ) * @ param paymentMessage payment message to parse * @ return list of transactions */ public static List < Transaction > parseTransactionsFromPaymentMessage ...
final List < Transaction > transactions = new ArrayList < > ( paymentMessage . getTransactionsCount ( ) ) ; for ( final ByteString transaction : paymentMessage . getTransactionsList ( ) ) transactions . add ( params . getDefaultSerializer ( ) . makeTransaction ( transaction . toByteArray ( ) ) ) ; return transactions ;
public class AsynchronousRequest { /** * For more info on Character Skills API go < a href = " https : / / wiki . guildwars2 . com / wiki / API : 2 / characters # Skills " > here < / a > < br / > * Give user the access to { @ link Callback # onResponse ( Call , Response ) } and { @ link Callback # onFailure ( Call , ...
isParamValid ( new ParamChecker ( ParamType . API , API ) , new ParamChecker ( ParamType . CHAR , name ) ) ; gw2API . getCharacterSkills ( name , API ) . enqueue ( callback ) ;
public class RDBMSQuery { /** * Gets the column list . * @ param m * the m * @ param results * the results * @ return the column list */ List < String > getColumnList ( EntityMetadata m , String [ ] results , EmbeddableType compoundKey ) { } }
List < String > columns = new ArrayList < String > ( ) ; if ( results != null && results . length > 0 ) { MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( m . getPersistenceUnit ( ) ) ; EntityType entity = metaModel . entity ( m . getEntityClazz ( ) ) ; for ( int...
public class GetCelebrityRecognitionResult { /** * Array of celebrities recognized in the video . * @ param celebrities * Array of celebrities recognized in the video . */ public void setCelebrities ( java . util . Collection < CelebrityRecognition > celebrities ) { } }
if ( celebrities == null ) { this . celebrities = null ; return ; } this . celebrities = new java . util . ArrayList < CelebrityRecognition > ( celebrities ) ;
public class DefaultErrorHandler { /** * Find the sibling { @ link HelpBlock } . * @ param widget the { @ link Widget } to search . * @ return the found { @ link HelpBlock } of null if not found . */ private HelpBlock findHelpBlock ( Widget widget ) { } }
if ( widget instanceof HelpBlock ) { return ( HelpBlock ) widget ; } // Try and find the HelpBlock in the children of the given widget . if ( widget instanceof HasWidgets ) { for ( Widget w : ( HasWidgets ) widget ) { if ( w instanceof HelpBlock ) { return ( HelpBlock ) w ; } } } if ( ! ( widget instanceof HasValidatio...
public class Specification { /** * < p > marshallize . < / p > * @ return a { @ link java . util . Vector } object . */ public Vector < Object > marshallize ( ) { } }
Vector < Object > parameters = super . marshallize ( ) ; Vector < Object > suts = XmlRpcDataMarshaller . toXmlRpcSystemUnderTestsParameters ( targetedSystemUnderTests ) ; parameters . add ( SPECIFICATION_SUTS_IDX , suts ) ; if ( isNotBlank ( dialectClass ) ) { parameters . add ( SPECIFICATION_DIALECT_IDX , dialectClass...
public class PoolManager { /** * Put the mcw in the hash map * @ param mc * @ param mcw */ public void putMcToMCWMap ( ManagedConnection mc , MCWrapper mcw ) { } }
mcToMCWMapWrite . lock ( ) ; try { mcToMCWMap . put ( mc , mcw ) ; } finally { mcToMCWMapWrite . unlock ( ) ; }
public class FileSystem { /** * Reply the basename of the specified file without the last extension . * @ param filename is the name to parse . * @ return the basename of the specified file without the last extension . * @ see # shortBasename ( URL ) * @ see # largeBasename ( URL ) * @ see # dirname ( URL ) ...
if ( filename == null ) { return null ; } final String largeBasename = filename . getPath ( ) ; assert ! isWindowsNativeFilename ( largeBasename ) ; int end = largeBasename . length ( ) ; int idx ; do { end -- ; idx = largeBasename . lastIndexOf ( URL_PATH_SEPARATOR_CHAR , end ) ; } while ( idx >= 0 && end >= 0 && idx ...
public class CommandLineInterface { /** * Using all language profiles from the given directory . */ private LanguageDetector makeDetector ( ) throws IOException { } }
double alpha = getParamDouble ( "alpha" , DEFAULT_ALPHA ) ; String profileDirectory = requireParamString ( "directory" ) + "/" ; Optional < Long > seed = Optional . fromNullable ( getParamLongOrNull ( "seed" ) ) ; List < LanguageProfile > languageProfiles = new LanguageProfileReader ( ) . readAll ( new File ( profileDi...
public class ArrayList { /** * Appends all of the elements in the specified collection to the end of * this list , in the order that they are returned by the * specified collection ' s Iterator . The behavior of this operation is * undefined if the specified collection is modified while the operation * is in pr...
Object [ ] a = c . toArray ( ) ; int numNew = a . length ; ensureCapacityInternal ( size + numNew ) ; // Increments modCount System . arraycopy ( a , 0 , elementData , size , numNew ) ; size += numNew ; return numNew != 0 ;
public class Fetch { /** * Updates this fetch , adding a single field . If the field is a reference , the reference will be * fetched with the Fetch that is provided . * @ param field the name of the field to fetch * @ param fetch the fetch to use for this field , if the field is a reference * @ return this Fet...
attrFetchMap . put ( field , fetch ) ; return this ;
public class ConnectionUtility { /** * Destroy all the data sources created before . * If any exception occurred , it will be logged but never propagated . */ public static void destroyDataSources ( ) { } }
synchronized ( dataSourcesStructureLock ) { for ( Map . Entry < String , DataSource > dsEntry : dataSources . entrySet ( ) ) { String dsName = dsEntry . getKey ( ) ; DataSource ds = dsEntry . getValue ( ) ; for ( Map . Entry < String , DataSourceProvider > dspEntry : dataSourceProviders . entrySet ( ) ) { // try them o...
public class WDataTable { /** * Indicates whether the table supports sorting . * @ return true if the table and model both support sorting , false otherwise . */ public boolean isSortable ( ) { } }
// First check global override which turns sorting off if ( getSortMode ( ) == SortMode . NONE ) { return false ; } // Otherwise , the table is sortable if at least one column is sortable . TableDataModel dataModel = getDataModel ( ) ; final int columnCount = getColumnCount ( ) ; for ( int i = 0 ; i < columnCount ; i +...
public class JpaLocalTxnInterceptor { /** * Returns True if rollback DID NOT HAPPEN ( i . e . if commit should continue ) . * @ param transactional The metadata annotaiton of the method * @ param e The exception to test for rollback * @ param txn A JPA Transaction to issue rollbacks on */ private boolean rollback...
boolean commit = true ; // check rollback clauses for ( Class < ? extends Exception > rollBackOn : transactional . rollbackOn ( ) ) { // if one matched , try to perform a rollback if ( rollBackOn . isInstance ( e ) ) { commit = false ; // check ignore clauses ( supercedes rollback clause ) for ( Class < ? extends Excep...
public class CollectSerIteratorFactory { /** * Creates an iterator wrapper for a value retrieved from a parent iterator . * Allows the parent iterator to define the child iterator using generic type information . * This handles cases such as a { @ code List } as the value in a { @ code Map } . * @ param value the...
Class < ? > declaredType = parent . valueType ( ) ; List < Class < ? > > childGenericTypes = parent . valueTypeTypes ( ) ; if ( value instanceof Grid ) { if ( childGenericTypes . size ( ) == 1 ) { return grid ( ( Grid < ? > ) value , declaredType , childGenericTypes . get ( 0 ) , EMPTY_VALUE_TYPES ) ; } return grid ( (...
public class MicroBeanMapUtil { /** * @ param beanObj * @ param fieldName * @ param value */ public static void setBeanProperty ( Object beanObj , String fieldName , Object value ) throws Exception { } }
Class cls = beanObj . getClass ( ) ; Field field = cls . getDeclaredField ( fieldName ) ; Class fieldCls = field . getType ( ) ; field . setAccessible ( true ) ; Object fieldObj = str2Obj ( fieldCls , value ) ; field . set ( beanObj , fieldObj ) ;
public class BingVideosImpl { /** * The Video Trending Search API lets you search on Bing and get back a list of videos that are trending based on search requests made by others . The videos are broken out into different categories . For example , Top Music Videos . For a list of markets that support trending videos , ...
final String acceptLanguage = trendingOptionalParameter != null ? trendingOptionalParameter . acceptLanguage ( ) : null ; final String userAgent = trendingOptionalParameter != null ? trendingOptionalParameter . userAgent ( ) : this . client . userAgent ( ) ; final String clientId = trendingOptionalParameter != null ? t...
public class ResponseHandler { /** * Helper method which schedules the given { @ link CouchbaseRequest } with a delay for further retry . * @ param request the request to retry . */ private void scheduleForRetry ( final CouchbaseRequest request , final boolean isNotMyVbucket ) { } }
CoreEnvironment env = environment ; long delayTime ; TimeUnit delayUnit ; if ( request . retryDelay ( ) != null ) { Delay delay = request . retryDelay ( ) ; if ( request . retryCount ( ) == 0 ) { delayTime = request . retryAfter ( ) ; request . incrementRetryCount ( ) ; } else { delayTime = delay . calculate ( request ...
public class snmp_user { /** * < pre > * Use this operation to add SNMP User . * < / pre > */ public static snmp_user add ( nitro_service client , snmp_user resource ) throws Exception { } }
resource . validate ( "add" ) ; return ( ( snmp_user [ ] ) resource . perform_operation ( client , "add" ) ) [ 0 ] ;
public class RepairPriorityQueue { /** * Gets an element in the queue given its key . * @ param key the key to look for . * @ return the element which corresponds to the key or null . */ public RepairDigramRecord get ( String key ) { } }
RepairQueueNode el = this . elements . get ( key ) ; if ( null != el ) { return el . payload ; } return null ;
public class PostInitializeProcessor { /** * { @ inheritDoc } */ @ Override public void afterSingletonsInstantiated ( ) { } }
final long startTimestamp = System . currentTimeMillis ( ) ; this . initializeAnnotations ( ) ; this . processInitialization ( ) ; int methodCount = this . postInitializingMethods . values ( ) . stream ( ) . mapToInt ( List :: size ) . sum ( ) ; log . info ( "Launched {} method(s) in {}ms" , methodCount , System . curr...
public class RgbaColor { /** * Takes two adjustments and applies the one that conforms to the * range . If the first modification moves the value out of range * [ 0-100 ] , the second modification will be applied < b > and clipped * if necessary < / b > . * @ param index * The index in HSL * @ param first ...
float [ ] HSL = convertToHsl ( ) ; float firstvalue = HSL [ index ] + first ; // check if it ' s in bounds if ( slCheck ( firstvalue ) == firstvalue ) { // it is , keep this transform HSL [ index ] = firstvalue ; } else if ( second == 0 ) { // just take the first one because there is no second , but // bounds check it ...
public class LocalSubscriptionControl { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . runtime . ControlAdapter # registerControlAdapterAsMBean ( ) */ public void registerControlAdapterAsMBean ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "registerControlAdapterAsMBean" ) ; if ( isRegistered ( ) ) { // Don ' t register a 2nd time . } else { super . registerControlAdapterAsMBean ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) )...
public class Axis { /** * Add a label to the axis at given location . */ public Axis addLabel ( String label , double location ) { } }
if ( labels == null ) { labels = new HashMap < > ( ) ; } labels . put ( label , location ) ; setSlice ( ) ; initGridLines ( ) ; initGridLabels ( ) ; return this ;
public class DefaultRewriteContentHandler { /** * Converts the RTE externalized form of media reference to internal form . * @ param ref Externalize media reference * @ return Internal media reference */ private String unexternalizeImageRef ( String ref ) { } }
String unexternalizedRef = ref ; if ( StringUtils . isNotEmpty ( unexternalizedRef ) ) { // decode if required unexternalizedRef = decodeIfEncoded ( unexternalizedRef ) ; // TODO : implementation has to be aligned with MediaSource implementations ! // remove default servlet extension that is needed for inline images in...
public class WorkflowJPA { /** * / * ( non - Javadoc ) * @ see nz . co . senanque . workflow . WorkflowDAO # findProcessInstance ( java . lang . Long ) */ @ Transactional public ProcessInstance findProcessInstance ( Long id ) { } }
log . debug ( "findProcessInstance {}" , id ) ; ProcessInstance ret = null ; try { ret = m_entityManager . find ( ProcessInstance . class , id , LockModeType . PESSIMISTIC_WRITE ) ; if ( ret == null ) { throw new WorkflowException ( "Could not find process instance id=" + id ) ; } ret . getAudits ( ) . size ( ) ; } cat...
public class VisibilityAlgorithm { /** * Compute isovist polygon * @ param position View coordinate * @ param addEnvelope If true add circle bounding box . This function does not work properly if the view point is not * enclosed by segments * @ return Visibility polygon */ public Polygon getIsoVist ( Coordinate...
// Add bounding circle List < SegmentString > bounded = new ArrayList < > ( originalSegments . size ( ) + numPoints ) ; // Compute envelope Envelope env = new Envelope ( ) ; for ( SegmentString segment : originalSegments ) { env . expandToInclude ( segment . getCoordinate ( 0 ) ) ; env . expandToInclude ( segment . get...