signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AlternateSizeValidator { /** * { @ inheritDoc } check if given object is valid . * @ see javax . validation . ConstraintValidator # isValid ( Object , * javax . validation . ConstraintValidatorContext ) */ @ Override public final boolean isValid ( final Object pvalue , final ConstraintValidatorContext ...
String valueAsString = Objects . toString ( pvalue , StringUtils . EMPTY ) ; if ( StringUtils . isEmpty ( valueAsString ) ) { return true ; } if ( ignoreWhiteSpaces ) { valueAsString = valueAsString . replaceAll ( "\\s" , StringUtils . EMPTY ) ; } if ( ignoreMinus ) { valueAsString = valueAsString . replaceAll ( "-" , ...
public class VariableNumMap { /** * Ensures that all variable numbers which are shared between other * and this are mapped to the same variables . */ private final void checkCompatibility ( VariableNumMap other ) { } }
int i = 0 , j = 0 ; int [ ] otherNums = other . nums ; String [ ] otherNames = other . names ; Variable [ ] otherVars = other . vars ; while ( i < nums . length && j < otherNums . length ) { if ( nums [ i ] < otherNums [ j ] ) { i ++ ; } else if ( nums [ i ] > otherNums [ j ] ) { j ++ ; } else { // Equal Preconditions ...
public class DAOValidatorHelper { /** * Methode d ' extraction de toutes les sous - chaines respectant le pattern donne * @ param expressionExpression mere * @ param patternPattern a rechercher * @ returnListe des sous - chaines respectant ce pattern */ public static String [ ] extractToken ( String expression , ...
// Si la chaine est vide if ( expression == null || expression . trim ( ) . length ( ) == 0 ) { // On retourne null ; return null ; } // Si le pattern est null if ( pattern == null ) { // On retourne null ; return null ; } // On splitte par l ' espace String [ ] spacePlitted = expression . split ( SPLITTER_CHAIN ) ; //...
public class SymbolsExtractor { /** * to extract qualified name with prefix */ public static Set < QualifiedName > extractNames ( Expression expression , Set < NodeRef < Expression > > columnReferences ) { } }
ImmutableSet . Builder < QualifiedName > builder = ImmutableSet . builder ( ) ; new QualifiedNameBuilderVisitor ( columnReferences ) . process ( expression , builder ) ; return builder . build ( ) ;
public class DBCluster { /** * Provides the list of instances that make up the DB cluster . * @ param dBClusterMembers * Provides the list of instances that make up the DB cluster . */ public void setDBClusterMembers ( java . util . Collection < DBClusterMember > dBClusterMembers ) { } }
if ( dBClusterMembers == null ) { this . dBClusterMembers = null ; return ; } this . dBClusterMembers = new java . util . ArrayList < DBClusterMember > ( dBClusterMembers ) ;
public class Stage { /** * Answers the ActorProtocolActor [ ] for the newly created Actor instance . ( INTERNAL ONLY ) * @ param protocols the { @ code Class < ? > } [ ] protocols of the Actor * @ param definition the Definition of the Actor * @ param parent the Actor parent of this Actor * @ param maybeSupervi...
assertProtocolCompliance ( protocols ) ; return actorProtocolFor ( protocols , definition , parent , null , null , maybeSupervisor , logger ) ;
public class EditController { /** * Show an overview of geometric attributes of the geometry that ' s being edited . */ public void showGeometricInfo ( ) { } }
FeatureTransaction ft = getFeatureTransaction ( ) ; if ( infoLabel == null && ft != null && ft . getNewFeatures ( ) != null && ft . getNewFeatures ( ) . length > 0 ) { infoLabel = new GeometricInfoLabel ( ) ; infoLabel . addClickHandler ( new DestroyLabelInfoOnClick ( ) ) ; infoLabel . setGeometry ( ft . getNewFeatures...
public class GregorianCalendar { /** * Returns the fixed date of the first day of the year ( usually * January 1 ) before the specified date . * @ param date the date for which the first day of the year is * calculated . The date has to be in the cut - over year ( Gregorian * or Julian ) . * @ param fixedDate...
assert date . getNormalizedYear ( ) == gregorianCutoverYear || date . getNormalizedYear ( ) == gregorianCutoverYearJulian ; if ( gregorianCutoverYear != gregorianCutoverYearJulian ) { if ( fixedDate >= gregorianCutoverDate ) { // Dates before the cutover date don ' t exist // in the same ( Gregorian ) year . So , no //...
public class DeleteRelationalDatabaseRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteRelationalDatabaseRequest deleteRelationalDatabaseRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteRelationalDatabaseRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteRelationalDatabaseRequest . getRelationalDatabaseName ( ) , RELATIONALDATABASENAME_BINDING ) ; protocolMarshaller . marshall ( deleteRelationalData...
public class InstanceAdminClient { /** * Gets information about a particular instance . * < p > Sample code : * < pre > < code > * try ( InstanceAdminClient instanceAdminClient = InstanceAdminClient . create ( ) ) { * InstanceName name = InstanceName . of ( " [ PROJECT ] " , " [ INSTANCE ] " ) ; * Instance re...
GetInstanceRequest request = GetInstanceRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . build ( ) ; return getInstance ( request ) ;
public class BeanMappingUtil { /** * 对象属性的拷贝 , 与BeanUtils , BeanCopier功能类似 * @ param src * @ param target */ public static void copy ( Object src , Object target ) throws BeanMappingException { } }
BeanCopy copy = BeanCopy . create ( src . getClass ( ) , target . getClass ( ) ) ; copy . copy ( src , target ) ;
public class UriUtil { /** * Checks if the given URI is for a photo from the device ' s local media store . * @ param uri the URI to check * @ return true if the URI points to a media store photo */ public static boolean isLocalCameraUri ( Uri uri ) { } }
String uriString = uri . toString ( ) ; return uriString . startsWith ( MediaStore . Images . Media . EXTERNAL_CONTENT_URI . toString ( ) ) || uriString . startsWith ( MediaStore . Images . Media . INTERNAL_CONTENT_URI . toString ( ) ) ;
public class MessageProcessorControl { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . runtime . SIMPMessageProcessorControllable # getLocalSubscriptionIterator ( ) */ public SIMPIterator getLocalSubscriptionIterator ( ) throws SIMPException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getLocalSubscriptionIterator" ) ; SIMPIterator topicSpaces = getTopicSpaceIterator ( ) ; SubscriptionIndex subs = new SubscriptionIndex ( ) ; while ( topicSpaces . hasNext ( ) ) { Topicspace ts = ( Topicspace ) topicSpaces ...
public class AbstractSearch { /** * Returns the parameter settings in structured way * @ param index the index of the trace item to obtain * @ return the parameter settings */ public List < Entry < String , Object > > getTraceParameterSettings ( int index ) { } }
List < Entry < String , Object > > result = new ArrayList < Map . Entry < String , Object > > ( ) ; List < String > dimensions = getSearchDimensions ( ) ; for ( int i = 0 ; i < dimensions . size ( ) ; ++ i ) { String parameter = dimensions . get ( i ) ; Object value = m_Trace . get ( index ) . getValue ( ) . getValues ...
public class CheckpointStatistics { public static CheckpointStatistics generateCheckpointStatistics ( AbstractCheckpointStats checkpointStats , boolean includeTaskCheckpointStatistics ) { } }
Preconditions . checkNotNull ( checkpointStats ) ; Map < JobVertexID , TaskCheckpointStatistics > checkpointStatisticsPerTask ; if ( includeTaskCheckpointStatistics ) { Collection < TaskStateStats > taskStateStats = checkpointStats . getAllTaskStateStats ( ) ; checkpointStatisticsPerTask = new HashMap < > ( taskStateSt...
public class MtasPennTreebankParser { /** * ( non - Javadoc ) * @ see mtas . analysis . parser . MtasParser # createTokenCollection ( java . io . Reader ) */ @ Override public MtasTokenCollection createTokenCollection ( Reader reader ) throws MtasParserException , MtasConfigException { } }
tokenCollection = new MtasTokenCollection ( ) ; MtasTokenIdFactory mtasTokenIdFactory = new MtasTokenIdFactory ( ) ; List < Level > levels = new ArrayList < > ( ) ; // Map < String , MtasToken > referencesNode = new HashMap < > ( ) ; // Map < String , List < MtasToken > > referencesNullElement = new HashMap < > ( ) ; t...
public class Multipart { /** * Convenience method to add a form field to the request . * @ param name name of field * @ param value value of field * @ return self */ public Multipart field ( String name , String value ) { } }
formFields . add ( new FormField ( name , value ) ) ; return this ;
public class ExecutionEngineIPC { /** * the abstract api assumes construction initializes but here initialization * is just another command . */ public void initialize ( final int clusterIndex , final long siteId , final int partitionId , final int sitesPerHost , final int hostId , final String hostname , final int d...
synchronized ( printLockObject ) { System . out . println ( "Initializing an IPC EE " + this + " for hostId " + hostId + " siteId " + siteId + " from thread " + Thread . currentThread ( ) . getId ( ) ) ; } int result = ExecutionEngine . ERRORCODE_ERROR ; m_data . clear ( ) ; m_data . putInt ( Commands . Initialize . m_...
public class BaseExtension { /** * Add client request handlers */ protected void addClientRequestHandlers ( ) { } }
Set < String > commands = context . getClientRequestCommands ( ) ; for ( String command : commands ) addClientRequestHandler ( command ) ;
public class JPAPUnitInfo { /** * ( non - Javadoc ) * @ see javax . persistence . spi . PersistenceUnitInfo # getNonJtaDataSource ( ) */ @ Override public final DataSource getNonJtaDataSource ( ) { } }
if ( ivNonJtaDataSource == null || ivNonJtaDataSource instanceof GenericDataSource ) { // d455055 ivNonJtaDataSource = getJPADataSource ( ivNonJtaDataSourceJNDIName ) ; } return ivNonJtaDataSource ;
public class XMLConfigAdmin { /** * update the locale * @ param locale * @ throws SecurityException */ public void updateLocale ( String locale ) throws SecurityException { } }
checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_SETTING ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update regional setting" ) ; Element scope = _getRootElement ( "regional" ) ; scope . setAttribute ( "locale" , locale . trim ( ) ) ;
public class BigDecimal { /** * calculate divideAndRound for ldividend * 10 ^ raise / divisor * when abs ( dividend ) = = abs ( divisor ) ; */ private static BigDecimal roundedTenPower ( int qsign , int raise , int scale , int preferredScale ) { } }
if ( scale > preferredScale ) { int diff = scale - preferredScale ; if ( diff < raise ) { return scaledTenPow ( raise - diff , qsign , preferredScale ) ; } else { return valueOf ( qsign , scale - raise ) ; } } else { return scaledTenPow ( raise , qsign , scale ) ; }
public class Mutation { /** * For all types except { @ link Op # DELETE } , constructs a map from column name to value . This is * mainly intended as a convenience for testing ; direct access via { @ link # getColumns ( ) } and * { @ link # getValues ( ) } is more efficient . * @ throws IllegalStateException if {...
checkState ( operation != Op . DELETE , "asMap() cannot be called for a DELETE mutation" ) ; LinkedHashMap < String , Value > map = new LinkedHashMap < > ( ) ; for ( int i = 0 ; i < columns . size ( ) ; ++ i ) { Value existing = map . put ( columns . get ( i ) , values . get ( i ) ) ; } return Collections . unmodifiabl...
public class RequestUtil { /** * 打印header信息 . * @ param request */ public static void printHeaders ( HttpServletRequest request ) { } }
Enumeration < String > e = request . getHeaderNames ( ) ; while ( e . hasMoreElements ( ) ) { String name = e . nextElement ( ) ; String value = request . getHeader ( name ) ; logger . info ( "header " + name + ":" + value ) ; }
public class BufferUtils { /** * Flip the buffer to fill mode . * The position is set to the first unused position in the buffer * ( the old limit ) and the limit is set to the capacity . * If the buffer is empty , then this call is effectively { @ link # clearToFill ( ByteBuffer ) } . * If there is no unused s...
int position = buffer . position ( ) ; int limit = buffer . limit ( ) ; if ( position == limit ) { buffer . position ( 0 ) ; buffer . limit ( buffer . capacity ( ) ) ; return 0 ; } int capacity = buffer . capacity ( ) ; if ( limit == capacity ) { buffer . compact ( ) ; return 0 ; } buffer . position ( limit ) ; buffer ...
public class TableWorks { /** * A VoltDB extended variant of addIndex that supports indexed generalized non - column expressions . * @ param cols int [ ] * @ param indexExprs Expression [ ] * @ param name HsqlName * @ param unique boolean * @ param predicate Expression * @ return new index */ Index addExprI...
Index newindex ; if ( table . isEmpty ( session ) || table . isIndexingMutable ( ) ) { newindex = table . createAndAddExprIndexStructure ( name , col , indexExprs , unique , migrating , false ) ; } else { newindex = table . createIndexStructure ( name , col , null , null , unique , migrating , false , false ) . withExp...
public class LanguageServiceClient { /** * Analyzes the sentiment of the provided text . * < p > Sample code : * < pre > < code > * try ( LanguageServiceClient languageServiceClient = LanguageServiceClient . create ( ) ) { * Document document = Document . newBuilder ( ) . build ( ) ; * EncodingType encodingTy...
AnalyzeSentimentRequest request = AnalyzeSentimentRequest . newBuilder ( ) . setDocument ( document ) . setEncodingType ( encodingType ) . build ( ) ; return analyzeSentiment ( request ) ;
public class AbstractElement { /** * Click function that will wait for one of the ExpectedConditions to match . * { @ link org . openqa . selenium . TimeoutException } exception will be thrown if no conditions are matched within the * allowed time { @ link ConfigProperty # EXECUTION _ TIMEOUT } * @ param conditio...
dispatcher . beforeClick ( this , conditions ) ; getElement ( ) . click ( ) ; if ( Boolean . parseBoolean ( Config . getConfigProperty ( ConfigProperty . ENABLE_GUI_LOGGING ) ) ) { logUIAction ( UIActions . CLICKED ) ; } // If there are no expected objects , then it means user wants this method // to behave as a clicko...
public class ListBulkDeploymentDetailedReportsResult { /** * A list of the individual group deployments in the bulk deployment operation . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDeployments ( java . util . Collection ) } or { @ link # withDeployme...
if ( this . deployments == null ) { setDeployments ( new java . util . ArrayList < BulkDeploymentResult > ( deployments . length ) ) ; } for ( BulkDeploymentResult ele : deployments ) { this . deployments . add ( ele ) ; } return this ;
public class MessageItem { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . impl . interfaces . SIMPMessage # setMessageControlClassification ( java . lang . String ) */ @ Override public void setMessageControlClassification ( String classification ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setMessageControlClassification" , classification ) ; JsMessage localMsg = getJSMessage ( true ) ; // Cannot set this parameter on a Control message if ( localMsg . isApiMessage ( ) ) { if ( localMsg instanceof JsApi...
public class ScheduledExecutors { /** * Run runnable repeatedly with the given delay between calls , after the given * initial delay . Exceptions are caught and logged as errors . */ public static void scheduleWithFixedDelay ( final ScheduledExecutorService exec , final Duration initialDelay , final Duration delay , ...
scheduleWithFixedDelay ( exec , initialDelay , delay , new Callable < Signal > ( ) { @ Override public Signal call ( ) { runnable . run ( ) ; // ( Exceptions are handled for us ) return Signal . REPEAT ; } } ) ;
public class RequestBuilder { /** * Build the request * @ return The request */ public Request < T > build ( ) { } }
MultiMap headers = resolveHeaders ( ) ; MultiMap parameters = resolveParameters ( ) ; parameters . add ( "version" , Integer . toString ( version ) ) ; Request < T > request = new Request < T > ( ) ; request . setEntityName ( entityName ) ; request . setEntityType ( objectType ) ; request . setHeaders ( headers ) ; req...
public class ExtendedSAML2AuthnRequestsSignedSecurityHandler { /** * { @ inheritDoc } */ @ Override public void doInvoke ( MessageContext < SAMLObject > messageContext ) throws MessageHandlerException { } }
if ( this . wantAuthnRequestsSigned ) { SAMLObject samlMessage = messageContext . getMessage ( ) ; if ( ! ( samlMessage instanceof AuthnRequest ) ) { log . debug ( "Inbound message is not an instance of AuthnRequest, skipping evaluation..." ) ; return ; } if ( ! isMessageSigned ( messageContext ) ) { log . error ( "Aut...
public class HostsResource { /** * Sets the deployment of the job identified by its { @ link JobId } on the host named by * { @ code host } to { @ code deployment } . * @ param host The host to deploy to . * @ param jobId The job to deploy . * @ param deployment Deployment information . * @ param username The...
if ( ! jobId . isFullyQualified ( ) ) { throw badRequest ( new JobDeployResponse ( JobDeployResponse . Status . INVALID_ID , host , jobId ) ) ; } try { final Deployment actualDeployment = deployment . toBuilder ( ) . setDeployerUser ( username ) . build ( ) ; model . deployJob ( host , actualDeployment , token ) ; retu...
public class GenericTreeWalker { /** * Return the first child Node from the current node , after applying filter , * whatToshow . If result is not null , set the current Node . */ public Node firstChild ( ) { } }
if ( currentNode == null ) return null ; Node node = getFirstChild ( currentNode ) ; if ( node != null ) currentNode = node ; return node ;
public class AWSGlobalAcceleratorClient { /** * Update an accelerator . * @ param updateAcceleratorRequest * @ return Result of the UpdateAccelerator operation returned by the service . * @ throws AcceleratorNotFoundException * The accelerator that you specified doesn ' t exist . * @ throws InternalServiceErr...
request = beforeClientExecution ( request ) ; return executeUpdateAccelerator ( request ) ;
public class InmemCounter { /** * { @ inheritDoc } * @ since 0.4.2 */ @ Override public InmemCounter setCounterFactory ( AbstractCounterFactory counterFactory ) { } }
if ( counterFactory instanceof InmemCounterFactory ) { super . setCounterFactory ( counterFactory ) ; } else { throw new IllegalArgumentException ( "Argument must be an instance of " + InmemCounterFactory . class . getName ( ) ) ; } return this ;
public class Password { public static String obfuscate ( String s ) { } }
StringBuffer buf = new StringBuffer ( ) ; byte [ ] b = s . getBytes ( ) ; synchronized ( buf ) { buf . append ( "OBF:" ) ; for ( int i = 0 ; i < b . length ; i ++ ) { byte b1 = b [ i ] ; byte b2 = b [ s . length ( ) - ( i + 1 ) ] ; int i1 = ( int ) b1 + ( int ) b2 + 127 ; int i2 = ( int ) b1 - ( int ) b2 + 127 ; int i0...
public class ScriptContainer { /** * / / / / / Protected Support / / / / / */ protected void pushIdScope ( ) { } }
if ( _idScope != null ) { HttpServletRequest req = ( HttpServletRequest ) pageContext . getRequest ( ) ; ArrayList /* < String > */ list = ( ArrayList /* < String > */ ) RequestUtils . getOuterAttribute ( req , SCOPE_ID ) ; if ( list == null ) { list = new ArrayList /* < String > */ ( ) ; RequestUtils . setOuterAttribu...
public class EntityHelper { /** * 获取全部的Field * @ param entityClass * @ param fieldList * @ return */ private static List < Field > getAllField ( Class < ? > entityClass , List < Field > fieldList ) { } }
if ( fieldList == null ) { fieldList = new ArrayList < Field > ( ) ; } if ( entityClass . equals ( Object . class ) ) { return fieldList ; } Field [ ] fields = entityClass . getDeclaredFields ( ) ; for ( Field field : fields ) { // 排除静态字段 if ( ! Modifier . isStatic ( field . getModifiers ( ) ) ) { fieldList . add ( fie...
public class CommerceAddressRestrictionUtil { /** * Returns the last commerce address restriction in the ordered set where classNameId = & # 63 ; and classPK = & # 63 ; . * @ param classNameId the class name ID * @ param classPK the class pk * @ param orderByComparator the comparator to order the set by ( optiona...
return getPersistence ( ) . fetchByC_C_Last ( classNameId , classPK , orderByComparator ) ;
public class Scheduler { /** * 新增Task , 使用随机UUID * @ param pattern { @ link CronPattern } 对应的String表达式 * @ param task { @ link Task } * @ return ID */ public String schedule ( String pattern , Task task ) { } }
String id = UUID . randomUUID ( ) . toString ( ) ; schedule ( id , pattern , task ) ; return id ;
public class ExportManager { /** * Indicate to associated { @ link ExportGeneration } s to * prepare give up mastership for the given partition id to hostId * @ param partitionId */ synchronized public void prepareTransferMastership ( int partitionId , int hostId ) { } }
// remove mastership for partition id , so when failure happen during the mastership transfer // this node can be elected as new master again . m_masterOfPartitions . remove ( partitionId ) ; if ( exportLog . isDebugEnabled ( ) ) { exportLog . debug ( "Export stream masters on " + partitionId + " are going to migrate a...
public class Retryer { /** * Returns current { @ link AttemptTimelimit } instance * @ return */ public AttemptTimelimit < R > getTimelimiter ( ) { } }
return this . tryTimeout = ( null == this . tryTimeout ? new AttemptTimelimit < R > ( ) { // An implementation which actually does not attempt to limit time at all @ Override public R call ( Callable < R > callable ) throws Exception { return checkNotNull ( callable ) . call ( ) ; } } : this . tryTimeout ) ;
public class AmqpRunnableFactory { /** * Creates a new { @ link ExchangeConsumer } . For every message received ( or when the timeout waiting for messages is hit ) , the callback * is invoked with the message received . */ public ExchangeConsumer createExchangeListener ( final String name , final ConsumerCallback mes...
Preconditions . checkState ( connectionFactory != null , "connection factory was never injected!" ) ; return new ExchangeConsumer ( connectionFactory , amqpConfig , name , messageCallback ) ;
public class WTree { /** * Map all item idsin the model to their row index . As this can be expensive save the map onto the scratch pad . * This can be very expensive and should be avoided . This will load all the nodes in a tree ( including those already * not expanded ) . * @ return the map between the all the ...
// No user context present if ( getScratchMap ( ) == null ) { return createItemIdIndexMap ( false ) ; } Map < String , List < Integer > > map = ( Map < String , List < Integer > > ) getScratchMap ( ) . get ( ALL_IDS_TO_INDEX_SCRATCH_MAP_KEY ) ; if ( map == null ) { map = createItemIdIndexMap ( false ) ; getScratchMap (...
public class X509Token { /** * Used during setup to get the certification from the keystore and encrypt the auth _ value with * the private key */ public void setCertificate ( ) throws KeyStoreException , IOException , NoSuchAlgorithmException , CertificateException , NoSuchPaddingException , InvalidKeyException , Il...
KeyStore store = KeyStore . getInstance ( this . keystore_type ) ; InputStream inputStream = Thread . currentThread ( ) . getContextClassLoader ( ) . getResourceAsStream ( this . keystore_path ) ; if ( inputStream == null ) inputStream = new FileInputStream ( this . keystore_path ) ; store . load ( inputStream , this ....
public class MemoryMapArchiveBase { /** * { @ inheritDoc } * @ see org . jboss . shrinkwrap . api . Archive # delete ( java . lang . String ) */ @ Override public Node delete ( String archivePath ) { } }
Validate . notNull ( archivePath , "No path was specified" ) ; return delete ( ArchivePaths . create ( archivePath ) ) ;
public class LogRecord { /** * Retrieves the absolute position ( in the log ByteBuffer ) of the beginning * of this LogRecord ' s view buffer . */ protected int absolutePosition ( ) { } }
if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "absolutePosition" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "absolutePosition" , new Integer ( _absolutePosition ) ) ; return _absolutePosition ;
public class WaitFor { /** * Wait for http endpoint availability under given < b > internal < / b > container port . * Given port MUST be exposed ( with { @ link DockerRuleBuilder # expose ( String , String ) } or * { @ link DockerRuleBuilder # publishAllPorts ( boolean ) } ) ( reachable from the test * code poin...
return new StartCondition ( ) { @ Override public StartConditionCheck build ( DockerRule currentRule ) { String exposedPort = currentRule . getExposedContainerPort ( Integer . toString ( internalHttpPort ) ) ; String pingUrl = String . format ( "http://%s:%s/" , currentRule . getDockerHost ( ) , exposedPort ) ; log . d...
public class OptionalParamConverterProvider { /** * { @ inheritDoc } */ @ Override public < T > ParamConverter < T > getConverter ( final Class < T > rawType , final Type genericType , final Annotation [ ] annotations ) { } }
if ( Optional . class . equals ( rawType ) ) { final List < ClassTypePair > ctps = ReflectionHelper . getTypeArgumentAndClass ( genericType ) ; final ClassTypePair ctp = ( ctps . size ( ) == 1 ) ? ctps . get ( 0 ) : null ; if ( ctp == null || ctp . rawClass ( ) == String . class ) { return new ParamConverter < T > ( ) ...
public class HELM2NotationUtils { /** * method to get all chem polymers given a list of PolymerNotation objects * @ param polymers List of PolymerNotation objects * @ return list of chem polymers */ public final static List < PolymerNotation > getCHEMPolymers ( List < PolymerNotation > polymers ) { } }
List < PolymerNotation > chemPolymers = new ArrayList < PolymerNotation > ( ) ; for ( PolymerNotation polymer : polymers ) { if ( polymer . getPolymerID ( ) instanceof ChemEntity ) { chemPolymers . add ( polymer ) ; } } return chemPolymers ;
public class RestHelper { /** * Creates an absolute url using the given request ' s url as base and appending optional segments . * @ param request a { @ code non - null } { @ link RequestContext } * @ param pathSegments an option array of segments * @ return a string representing an absolute - url */ public stat...
return urlFrom ( request . uri ( ) , pathSegments ) ;
public class BaseClassFinderService { /** * Start up a basebundle service . * Note : You will probably want to call this from a thread and attach a service * listener since this may take some time . * @ param versionRange version * @ param secsToWait Time to wait for startup 0 = 0 , - 1 = default * @ param cl...
ServiceReference ServiceReference = getClassServiceReference ( ( bundleContext != null ) ? bundleContext : context , interfaceClassName , versionRange , filter ) ; if ( ( ServiceReference != null ) && ( ( ServiceReference . getBundle ( ) . getState ( ) & Bundle . ACTIVE ) != 0 ) ) return true ; // Already up ! // If th...
public class Base256Serializer { /** * Returns the { @ code String } representation of the specified { @ code ByteBuffer } . * @ param byteBuffer The { @ code ByteBuffer } to be converted . * @ return The { @ code String } representation of the specified { @ code ByteBuffer } . */ public static String string ( Byte...
ByteBuffer bb = ByteBufferUtil . clone ( byteBuffer ) ; byte [ ] bytes = new byte [ bb . remaining ( ) ] ; bb . get ( bytes ) ; return new String ( chars ( bytes ) ) ;
public class DatabaseRecordIterator { /** * Return the next record . If there are no more records , throws * a < code > NoSuchElementException < / code > . If an error occurs , * throws a < code > JournalException < / code > . * @ return next record * @ throws java . util . NoSuchElementException if there are n...
if ( ! hasNext ( ) ) { String msg = "No current record." ; throw new NoSuchElementException ( msg ) ; } close ( lastRecord ) ; lastRecord = record ; record = null ; return lastRecord ;
public class ArrayUtils { /** * Applies a 2D torus shift to the specified row major order array of specified dimensions . * The array is interpreted as an image of given width and height ( with elements in row major order ) * and is shifted by x to the right and by y to the bottom . * @ param a array * @ param ...
assertPositive ( w , ( ) -> "specified width is not positive. w=" + w ) ; assertPositive ( h , ( ) -> "specified height is not positive. h=" + h ) ; while ( x < 0 ) x = w + x ; while ( y < 0 ) y = h + y ; x %= w ; y %= h ; if ( x == 0 && y == 0 ) { return ; } for ( int row = 0 ; row < h ; row ++ ) { int offset = row * ...
public class N { /** * Note : Copied from Google Guava under Apache License v2.0 * < br / > * < br / > * If a thread is interrupted during such a call , the call continues to block until the result is available or the * timeout elapses , and only then re - interrupts the thread . * @ param timeout * @ param...
N . checkArgNotNull ( unit , "unit" ) ; N . checkArgNotNull ( cmd ) ; boolean interrupted = false ; try { long remainingNanos = unit . toNanos ( timeout ) ; final long sysNanos = System . nanoTime ( ) ; final long end = remainingNanos >= Long . MAX_VALUE - sysNanos ? Long . MAX_VALUE : sysNanos + remainingNanos ; while...
public class DataSetLineageService { /** * Return the schema for the given tableName . * @ param datasetName tableName * @ return Schema as JSON */ @ Override @ GraphTransaction public String getSchema ( String datasetName ) throws AtlasException { } }
datasetName = ParamChecker . notEmpty ( datasetName , "table name" ) ; LOG . info ( "Fetching schema for tableName={}" , datasetName ) ; TypeUtils . Pair < String , String > typeIdPair = validateDatasetNameExists ( datasetName ) ; return getSchemaForId ( typeIdPair . left , typeIdPair . right ) ;
public class Query { /** * < code > * Helper method that takes a ~ separated string of additional parameters that can be * used to trigger rules . Takes ~ separated name / value list * < / code > * @ param values * The list of name / values */ public Query addCustomUrlParamsByString ( String values ) { } }
if ( values == null ) { return this ; } String [ ] params = values . split ( "&" ) ; for ( String value : params ) { if ( StringUtils . isNotBlank ( value ) ) { String [ ] keyValue = value . split ( "=" ) ; if ( keyValue . length == 2 && StringUtils . isNotBlank ( keyValue [ 0 ] ) && StringUtils . isNotBlank ( keyValue...
public class Source { /** * Sets the velocity of the source . */ public void setVelocity ( float x , float y , float z ) { } }
if ( _vx != x || _vy != y || _vz != z ) { AL10 . alSource3f ( _id , AL10 . AL_VELOCITY , _vx = x , _vy = y , _vz = z ) ; }
public class Synchronizer { /** * writes the given { @ link byte [ ] } to the given { @ link FileChannel } . This method improves performance by 30 % , * because it is not needed anymore to create all AbstractKVStorable from byte - arrays . The given byte - array contains * only one { @ link AbstractKVStorable } . ...
// If the data is invalid . if ( KeyUtils . isNull ( newData , prototype . getKey ( ) . length ) ) { // if ( alreadyExist ) System . err . println ( " invalid from disk " ) ; return false ; } // if the last readChunk was full ByteBuffer toAdd = ByteBuffer . wrap ( newData ) ; long positionOfToAddInFile = writeOffset + ...
public class ImmutableMap { /** * Creates an immutable singleton instance . * @ param key * @ param value * @ return */ public static < K , V > Map < K , V > of ( K key , V value ) { } }
return new ImmutableMapEntry < K , V > ( key , value ) ;
public class ErrorCollector { /** * Adds a WarningMessage to the message set . */ public void addWarning ( WarningMessage message ) { } }
if ( message . isRelevant ( configuration . getWarningLevel ( ) ) ) { if ( this . warnings == null ) { this . warnings = new LinkedList ( ) ; } this . warnings . add ( message ) ; }
public class NodeTraverser { /** * Version of { @ link # postOrder ( NodeVisitor , Collection ) } with one root . * @ param nodeVisitor the visitor of the nodes * @ param root the root node * @ return the accumulation result of this traversal */ public Object postOrder ( NodeVisitor nodeVisitor , Node root ) { } ...
return postOrder ( nodeVisitor , Collections . singleton ( root ) ) ;
public class NonMaxLimiter { /** * Extracts local max and / or min from the intensity image . If more than the maximum features are found then * only the most intense ones will be returned * @ param intensity Feature image intensity */ public void process ( GrayF32 intensity ) { } }
originalMin . reset ( ) ; originalMax . reset ( ) ; nonmax . process ( intensity , null , null , originalMin , originalMax ) ; localExtreme . reset ( ) ; for ( int i = 0 ; i < originalMin . size ; i ++ ) { Point2D_I16 p = originalMin . get ( i ) ; float val = intensity . unsafe_get ( p . x , p . y ) ; localExtreme . gr...
public class vpnvserver_stats { /** * Use this API to fetch the statistics of all vpnvserver _ stats resources that are configured on netscaler . */ public static vpnvserver_stats [ ] get ( nitro_service service ) throws Exception { } }
vpnvserver_stats obj = new vpnvserver_stats ( ) ; vpnvserver_stats [ ] response = ( vpnvserver_stats [ ] ) obj . stat_resources ( service ) ; return response ;
public class GobblinEncryptionProvider { /** * Return a StreamEncryptor for the given algorithm and with appropriate parameters . * @ param algorithm Algorithm to build * @ param parameters Parameters for algorithm * @ return A StreamEncoder for that algorithm * @ throws IllegalArgumentException If the given al...
switch ( algorithm ) { case EncryptionConfigParser . ENCRYPTION_TYPE_ANY : case "aes_rotating" : CredentialStore cs = CredentialStoreFactory . buildCredentialStore ( parameters ) ; if ( cs == null ) { throw new IllegalArgumentException ( "Failed to build credential store; can't instantiate AES" ) ; } return new Rotatin...
public class KeyVaultClientBaseImpl { /** * Recovers the deleted certificate back to its current version under / certificates . * The RecoverDeletedCertificate operation performs the reversal of the Delete operation . The operation is applicable in vaults enabled for soft - delete , and must be issued during the rete...
return recoverDeletedCertificateWithServiceResponseAsync ( vaultBaseUrl , certificateName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class ParseLocalDateTime { /** * { @ inheritDoc } */ @ Override protected LocalDateTime parse ( final String string , final DateTimeFormatter formatter ) { } }
return LocalDateTime . parse ( string , formatter ) ;
public class IntegralImageOps { /** * Convolves a kernel around a single point in the integral image . * @ param integral Input integral image . Not modified . * @ param kernel Convolution kernel . * @ param x Pixel the convolution is performed at . * @ param y Pixel the convolution is performed at . * @ retu...
return ImplIntegralImageOps . convolveSparse ( integral , kernel , x , y ) ;
public class Stoichiometry { /** * Let a user - defined function handle the entire string representation of a stoichiometry . * @ param customStringGenerator * A function which accepts a list of subunit clusters and returns a string . */ public void setCustomStringGenerator ( Function < List < SubunitCluster > , St...
this . strategy = StringOverflowStrategy . CUSTOM ; this . customStringGenerator = customStringGenerator ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcOffsetCurve3D ( ) { } }
if ( ifcOffsetCurve3DEClass == null ) { ifcOffsetCurve3DEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 395 ) ; } return ifcOffsetCurve3DEClass ;
public class AgentOutput { /** * Send a SSH2 _ AGENTC _ SIGN _ REQUEST message to ssh - agent . * @ param rsaPublicKey The { @ link RSAPublicKey } that tells ssh - agent which private key to use to * sign the data . * @ param data The data in bytes to be signed . */ void signRequest ( final RSAPublicKey rsaPublic...
// TODO ( dxia ) Support more than just Rsa keys final String keyType = Rsa . RSA_LABEL ; final byte [ ] publicExponent = rsaPublicKey . getPublicExponent ( ) . toByteArray ( ) ; final byte [ ] modulus = rsaPublicKey . getModulus ( ) . toByteArray ( ) ; // Four bytes indicating length of string denoting key type // Fou...
public class DateTimeValue { /** * Sets month and day of the given calendar making use of of the monthDay * representation defined in EXI format * @ param monthDay * monthDay * @ param cal * calendar */ protected static void setMonthDay ( int monthDay , Calendar cal ) { } }
// monthDay = month * 32 + day ; int month = monthDay / MONTH_MULTIPLICATOR ; cal . set ( Calendar . MONTH , month - 1 ) ; int day = monthDay - month * MONTH_MULTIPLICATOR ; cal . set ( Calendar . DAY_OF_MONTH , day ) ;
public class HTODDynacache { /** * clearDiskCache ( ) * Clear the memory HTOD Dependency Id table and Template table . Delete all disk cache and * then opens a FileManager instance , recreates the three HOD instances on disk . */ public int clearDiskCache ( ) { } }
final String methodName = "clearDiskCache()" ; int returnCode = NO_EXCEPTION ; Exception diskException = null ; try { this . invalidationBuffer . setDiskClearInProgress ( true ) ; if ( delayOffload ) { if ( ! this . disableDependencyId ) { auxDataDependencyTable . clear ( ) ; } if ( ! this . disableTemplatesSupport ) {...
public class IotHubResourcesInner { /** * Get the health for routing endpoints . * Get the health for routing endpoints . * ServiceResponse < PageImpl < EndpointHealthDataInner > > * @ param resourceGroupName the String value * ServiceResponse < PageImpl < EndpointHealthDataInner > > * @ param iotHubName the Stri...
if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( iotHubN...
public class ThreadLocalXPathVariableResolver { /** * / * ( non - Javadoc ) * @ see javax . xml . xpath . XPathVariableResolver # resolveVariable ( javax . xml . namespace . String ) */ @ Override public Object resolveVariable ( QName variableName ) { } }
final Map < String , ? > variables = this . localVariables . get ( ) ; if ( variables == null ) { return null ; } final String localPart = variableName . getLocalPart ( ) ; return variables . get ( localPart ) ;
public class RendererBuilder { /** * Return the item view type used by the adapter to implement recycle mechanism . * @ param content to be rendered . * @ return an integer that represents the renderer inside the adapter . */ int getItemViewType ( T content ) { } }
Class prototypeClass = getPrototypeClass ( content ) ; validatePrototypeClass ( prototypeClass ) ; return getItemViewType ( prototypeClass ) ;
public class ConfirmSignUpRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ConfirmSignUpRequest confirmSignUpRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( confirmSignUpRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( confirmSignUpRequest . getClientId ( ) , CLIENTID_BINDING ) ; protocolMarshaller . marshall ( confirmSignUpRequest . getSecretHash ( ) , SECRETHASH_BINDING ) ; prot...
public class SrvI18n { /** * < p > Default initializer that load message bundle by default locale . < / p > */ public final void initDefault ( ) { } }
try { this . messages = null ; this . messages = ResourceBundle . getBundle ( "Messages" ) ; } catch ( Exception e ) { this . logger . error ( null , SrvI18n . class , " when loading msgs for default locale " , e ) ; } if ( messages != null ) { this . messagesMap . put ( Locale . getDefault ( ) . getLanguage ( ) , this...
public class ScriptBuilderImpl { /** * Create a SarlSpace builder . * @ param name the name of the SarlSpace . * @ return the builder . */ public ISarlSpaceBuilder addSarlSpace ( String name ) { } }
ISarlSpaceBuilder builder = this . sarlSpaceProvider . get ( ) ; builder . eInit ( getScript ( ) , name , getTypeResolutionContext ( ) ) ; return builder ;
public class MesosScheduler { /** * Start the scheduler driver and wait it to get registered */ protected void startSchedulerDriver ( ) { } }
// start the driver non - blocking , // since we need to set heron state after the scheduler driver is started . // Heron will block the main thread eventually driver . start ( ) ; // Staging the Mesos Framework LOG . info ( "Waiting for Mesos Framework get registered" ) ; long timeout = MesosContext . getHeronMesosFra...
public class RegexGatewayPersonAttributeDao { /** * @ see org . jasig . services . persondir . IPersonAttributeDao # getPossibleUserAttributeNames ( ) */ @ JsonIgnore @ Override public Set < String > getPossibleUserAttributeNames ( final IPersonAttributeDaoFilter filter ) { } }
return targetPersonAttributeDao . getPossibleUserAttributeNames ( filter ) ;
public class PageBlobImpl { /** * Callback after the data has been written to the mmap , which allows for * reads ( but not necessarily fsynced . ) */ @ Override public void afterDataFlush ( PageServiceImpl tableService , int sequenceFlush ) { } }
super . afterDataFlush ( tableService , sequenceFlush ) ; tableService . compareAndSetBlobPage ( this , _stub ) ; ArrayList < TempBuffer > buffers = _buffers ; _buffers = null ; if ( buffers != null ) { for ( TempBuffer buffer : buffers ) { buffer . free ( ) ; } }
public class Filters { /** * Combines the filters in a filter chain . * The given filters are applied one by one in the order that hey appear in the method * argument list . * The string returns by the * { @ link Filter # beforeAppend ( String , StringBuilder ) } method of one filter is passed a * parameter t...
return new FilterAdapter ( ) { @ Override protected String doBeforeAppend ( String string , StringBuilder buffer ) { String previousResult = null ; for ( Filter filter : filters ) { string = filter . beforeAppend ( string , buffer ) ; if ( string == null ) { return previousResult ; } previousResult = string ; } return ...
public class Mappings { /** * ( mapping ) wrap a base mapping , and return an optional value instead of original value * @ param base base mapping * @ param constraints constraints * @ param < T > base type * @ return new created mapping */ public static < T > Mapping < Optional < T > > optional ( Mapping < T >...
String mname = "optional " + base . meta ( ) . name ; return new FieldMapping < Optional < T > > ( base . options ( ) . _inputMode ( ) , ( ( name , data ) -> { logger . debug ( "optional - converting {}" , name ) ; if ( isEmptyInput ( name , data , base . options ( ) . _inputMode ( ) ) ) { return Optional . empty ( ) ;...
public class RegionDiskClient { /** * Retrieves the list of persistent disks contained within the specified region . * < p > Sample code : * < pre > < code > * try ( RegionDiskClient regionDiskClient = RegionDiskClient . create ( ) ) { * ProjectRegionName region = ProjectRegionName . of ( " [ PROJECT ] " , " [ ...
ListRegionDisksHttpRequest request = ListRegionDisksHttpRequest . newBuilder ( ) . setRegion ( region ) . build ( ) ; return listRegionDisks ( request ) ;
public class ServletsModuleBuilder { /** * the first level of the EDSL - - */ public ServletModule . ServletKeyBindingBuilder serve ( List < String > urlPatterns ) { } }
return new ServletKeyBindingBuilderImpl ( parsePatterns ( UriPatternType . SERVLET , urlPatterns ) ) ;
public class CassandraDeepJobConfig { /** * Validates if any of the mandatory fields have been configured or not . Throws an { @ link IllegalArgumentException } * if any of the mandatory properties have not been configured . */ void validate ( ) { } }
validateCassandraParams ( ) ; if ( pageSize <= 0 ) { throw new IllegalArgumentException ( "pageSize cannot be zero" ) ; } validateConsistencyLevels ( ) ; TableMetadata tableMetadata = fetchTableMetadata ( ) ; validateTableMetadata ( tableMetadata ) ; validateAdditionalFilters ( tableMetadata ) ; if ( ! ( this . isBisec...
public class AbstractParamContainerPanel { /** * Gets text field that shows the name of the selected panel . * @ return the text field that shows the name of the selected panel */ private ZapTextField getTxtHeadline ( ) { } }
if ( txtHeadline == null ) { txtHeadline = new ZapTextField ( ) ; txtHeadline . setBorder ( javax . swing . BorderFactory . createEtchedBorder ( javax . swing . border . EtchedBorder . RAISED ) ) ; txtHeadline . setEditable ( false ) ; txtHeadline . setEnabled ( false ) ; txtHeadline . setBackground ( java . awt . Colo...
public class DescribeTransitGatewaysRequest { /** * The IDs of the transit gateways . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setTransitGatewayIds ( java . util . Collection ) } or { @ link # withTransitGatewayIds ( java . util . Collection ) } if *...
if ( this . transitGatewayIds == null ) { setTransitGatewayIds ( new com . amazonaws . internal . SdkInternalList < String > ( transitGatewayIds . length ) ) ; } for ( String ele : transitGatewayIds ) { this . transitGatewayIds . add ( ele ) ; } return this ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcFlowSegmentType ( ) { } }
if ( ifcFlowSegmentTypeEClass == null ) { ifcFlowSegmentTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 249 ) ; } return ifcFlowSegmentTypeEClass ;
public class DatabaseTableConfigLoader { /** * Read a field into our table configuration for field = value line . */ private static < T > void readTableField ( DatabaseTableConfig < T > config , String field , String value ) { } }
if ( field . equals ( FIELD_NAME_DATA_CLASS ) ) { try { @ SuppressWarnings ( "unchecked" ) Class < T > clazz = ( Class < T > ) Class . forName ( value ) ; config . setDataClass ( clazz ) ; } catch ( ClassNotFoundException e ) { throw new IllegalArgumentException ( "Unknown class specified for dataClass: " + value ) ; }...
public class MailAddress { /** * Returns the decoded string , in case it contains non us - ascii characters . * Returns the same string if it doesn ' t or the passed value in case * of an UnsupportedEncodingException . * @ param str string to be decoded * @ return the decoded string , in case it contains non us...
try { return MimeUtility . decodeText ( str ) ; } catch ( UnsupportedEncodingException e ) { return str ; }
public class PathBuilder { /** * Create a new Set typed path * @ param < A > * @ param property property name * @ param type property type * @ return property path */ public < A > SetPath < A , PathBuilder < A > > getSet ( String property , Class < A > type ) { } }
return this . < A , PathBuilder < A > > getSet ( property , type , PathBuilder . class ) ;
public class DateTimePerformance { private void checkJodaGetYear ( ) { } }
int COUNT = COUNT_VERY_FAST ; DateTime dt = new DateTime ( GJChronology . getInstance ( ) ) ; for ( int i = 0 ; i < AVERAGE ; i ++ ) { start ( "Joda" , "getYear" ) ; for ( int j = 0 ; j < COUNT ; j ++ ) { int val = dt . getYear ( ) ; if ( val == 0 ) { System . out . println ( "Anti optimise" ) ; } } end ( COUNT ) ; }
public class CookieUtils { /** * 清除cookie * @ param response * 返回response * @ param cookieName * cookie名 */ public static void resetCookieValue ( HttpServletResponse response , String cookieName ) { } }
Cookie cookie = new Cookie ( cookieName , null ) ; cookie . setMaxAge ( 0 ) ; response . addCookie ( cookie ) ;
public class VirtualHostImpl { /** * This method is called by the VirtualHostMap when an endpoint that applies to * this virtual host ( matches one of the configured aliases ) has stopped . * @ param endpoint The endpoint that was stopped * @ param resolvedHostName A suitable hostname for use in messages * @ pa...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "listener stopped for " + this + " on port " + port , endpoint ) ; } if ( ! activated ) return ; EndpointState oldState = myEndpoints . get ( endpoint ) ; if ( oldState == null ) { // we must have been here before . . ...
public class MakeValidOp { /** * Return a set of segments from a linestring * @ param lines * @ return */ private Set < LineString > getSegments ( Collection < LineString > lines ) { } }
Set < LineString > set = new HashSet < > ( ) ; for ( LineString line : lines ) { Coordinate [ ] cc = line . getCoordinates ( ) ; for ( int i = 1 ; i < cc . length ; i ++ ) { if ( ! cc [ i - 1 ] . equals ( cc [ i ] ) ) { LineString segment = line . getFactory ( ) . createLineString ( new Coordinate [ ] { new Coordinate ...