idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
6,500 | public static Point2d WSG84_L1 ( double lambda , double phi ) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi ( lambda , phi ) ; return NTFLambdaPhi_NTFLambert ( ntfLambdaPhi . getX ( ) , ntfLambdaPhi . getY ( ) , LAMBERT_1_N , LAMBERT_1_C , LAMBERT_1_XS , LAMBERT_1_YS ) ; } | This function convert WSG84 GPS coordinate to France Lambert I coordinate . |
6,501 | public static Point2d WSG84_L2 ( double lambda , double phi ) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi ( lambda , phi ) ; return NTFLambdaPhi_NTFLambert ( ntfLambdaPhi . getX ( ) , ntfLambdaPhi . getY ( ) , LAMBERT_2_N , LAMBERT_2_C , LAMBERT_2_XS , LAMBERT_2_YS ) ; } | This function convert WSG84 GPS coordinate to France Lambert II coordinate . |
6,502 | public static Point2d WSG84_L3 ( double lambda , double phi ) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi ( lambda , phi ) ; return NTFLambdaPhi_NTFLambert ( ntfLambdaPhi . getX ( ) , ntfLambdaPhi . getY ( ) , LAMBERT_3_N , LAMBERT_3_C , LAMBERT_3_XS , LAMBERT_3_YS ) ; } | This function convert WSG84 GPS coordinate to France Lambert III coordinate . |
6,503 | public static Point2d WSG84_L4 ( double lambda , double phi ) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi ( lambda , phi ) ; return NTFLambdaPhi_NTFLambert ( ntfLambdaPhi . getX ( ) , ntfLambdaPhi . getY ( ) , LAMBERT_4_N , LAMBERT_4_C , LAMBERT_4_XS , LAMBERT_4_YS ) ; } | This function convert WSG84 GPS coordinate to France Lambert IV coordinate . |
6,504 | public static Point2d WSG84_L93 ( double lambda , double phi ) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi ( lambda , phi ) ; return NTFLambdaPhi_NTFLambert ( ntfLambdaPhi . getX ( ) , ntfLambdaPhi . getY ( ) , LAMBERT_93_N , LAMBERT_93_C , LAMBERT_93_XS , LAMBERT_93_YS ) ; } | This function convert WSG84 GPS coordinate to France Lambert 93 coordinate . |
6,505 | @ SuppressWarnings ( { "checkstyle:parametername" , "checkstyle:magicnumber" , "checkstyle:localfinalvariablename" , "checkstyle:localvariablename" } ) private static Point2d NTFLambdaPhi_NTFLambert ( double lambda , double phi , double n , double c , double Xs , double Ys ) { final double a_n = 6378249.2 ; final doubl... | This function convert the geographical NTF Lambda - Phi coordinate to one of the France NTF standard coordinate . |
6,506 | @ SuppressWarnings ( { "checkstyle:parametername" , "checkstyle:magicnumber" , "checkstyle:localfinalvariablename" , "checkstyle:localvariablename" } ) private static Point2d WSG84_NTFLamdaPhi ( double lambda , double phi ) { final double lambda_w = Math . toRadians ( lambda ) ; final double phi_w = Math . toRadians ( ... | This function convert WSG84 GPS coordinate to one of the NTF Lambda - Phi coordinate . |
6,507 | public ObjectProperty < WeakReference < Segment1D < ? , ? > > > segmentProperty ( ) { if ( this . segment == null ) { this . segment = new SimpleObjectProperty < > ( this , MathFXAttributeNames . SEGMENT ) ; } return this . segment ; } | Replies the segment property . |
6,508 | void set ( ObjectProperty < WeakReference < Segment1D < ? , ? > > > segment , DoubleProperty x , DoubleProperty y ) { this . segment = segment ; this . x = x ; this . y = y ; } | Change the x and y properties . |
6,509 | public static boolean intersectsSegmentCapsule ( double sx1 , double sy1 , double sz1 , double sx2 , double sy2 , double sz2 , double mx1 , double my1 , double mz1 , double mx2 , double my2 , double mz2 , double radius ) { double d = distanceSquaredSegmentSegment ( sx1 , sy1 , sz1 , sx2 , sy2 , sz2 , mx1 , my1 , mz1 , ... | Tests if the capsule is intersecting a segment . |
6,510 | public static boolean intersectsLineLine ( double x1 , double y1 , double z1 , double x2 , double y2 , double z2 , double x3 , double y3 , double z3 , double x4 , double y4 , double z4 ) { double s = computeLineLineIntersectionFactor ( x1 , y1 , z1 , x2 , y2 , z2 , x3 , y3 , z3 , x4 , y4 , z4 ) ; return ! Double . isNa... | Replies if two lines are intersecting . |
6,511 | public static double distanceSquaredSegmentPoint ( double sx1 , double sy1 , double sz1 , double sx2 , double sy2 , double sz2 , double px , double py , double pz ) { double ratio = getPointProjectionFactorOnSegmentLine ( px , py , pz , sx1 , sy1 , sz1 , sx2 , sy2 , sz2 ) ; if ( ratio <= 0. ) return FunctionalPoint3D .... | Compute and replies the perpendicular squared distance from a point to a segment . |
6,512 | public static double distanceSegmentPoint ( double sx1 , double sy1 , double sz1 , double sx2 , double sy2 , double sz2 , double px , double py , double pz ) { double ratio = getPointProjectionFactorOnSegmentLine ( px , py , pz , sx1 , sy1 , sz1 , sx2 , sy2 , sz2 ) ; if ( ratio <= 0. ) return FunctionalPoint3D . distan... | Compute and replies the perpendicular distance from a point to a segment . |
6,513 | public static double getPointProjectionFactorOnSegmentLine ( double px , double py , double pz , double s1x , double s1y , double s1z , double s2x , double s2y , double s2z ) { double dx = s2x - s1x ; double dy = s2y - s1y ; double dz = s2z - s1z ; if ( dx == 0. && dy == 0. && dz == 0. ) return 0. ; return ( ( px - s1x... | Replies the projection a point on a segment . |
6,514 | public static double distanceSegmentSegment ( double ax1 , double ay1 , double az1 , double ax2 , double ay2 , double az2 , double bx1 , double by1 , double bz1 , double bx2 , double by2 , double bz2 ) { return Math . sqrt ( distanceSquaredSegmentSegment ( ax1 , ay1 , az1 , ax2 , ay2 , az2 , bx1 , by1 , bz1 , bx2 , by2... | Compute and replies the distance between two segments . |
6,515 | public static double distanceSquaredSegmentSegment ( double ax1 , double ay1 , double az1 , double ax2 , double ay2 , double az2 , double bx1 , double by1 , double bz1 , double bx2 , double by2 , double bz2 ) { Vector3f u = new Vector3f ( ax2 - ax1 , ay2 - ay1 , az2 - az1 ) ; Vector3f v = new Vector3f ( bx2 - bx1 , by2... | Compute and replies the squared distance between two segments . |
6,516 | public double distanceSegment ( Point3D point ) { return distanceSegmentPoint ( getX1 ( ) , getY1 ( ) , getZ1 ( ) , getX2 ( ) , getY2 ( ) , getZ2 ( ) , point . getX ( ) , point . getY ( ) , point . getZ ( ) ) ; } | Replies the distance between this segment and the given point . |
6,517 | public double distanceLine ( Point3D point ) { return distanceLinePoint ( getX1 ( ) , getY1 ( ) , getZ1 ( ) , getX2 ( ) , getY2 ( ) , getZ2 ( ) , point . getX ( ) , point . getY ( ) , point . getZ ( ) ) ; } | Replies the distance between the line of this segment and the given point . |
6,518 | public double distanceSquaredSegment ( Point3D point ) { return distanceSquaredSegmentPoint ( getX1 ( ) , getY1 ( ) , getZ1 ( ) , getX2 ( ) , getY2 ( ) , getZ2 ( ) , point . getX ( ) , point . getY ( ) , point . getZ ( ) ) ; } | Replies the squared distance between this segment and the given point . |
6,519 | public double distanceSquaredLine ( Point3D point ) { return distanceSquaredLinePoint ( getX1 ( ) , getY1 ( ) , getZ1 ( ) , getX2 ( ) , getY2 ( ) , getZ2 ( ) , point . getX ( ) , point . getY ( ) , point . getZ ( ) ) ; } | Replies the squared distance between the line of this segment and the given point . |
6,520 | protected boolean onBusLineAdded ( BusLine line , int index ) { if ( this . autoUpdate . get ( ) ) { try { addMapLayer ( index , new BusLineLayer ( line , isLayerAutoUpdated ( ) ) ) ; return true ; } catch ( Throwable exception ) { } } return false ; } | Invoked when a bus line was added in the attached network . |
6,521 | protected boolean onBusLineRemoved ( BusLine line , int index ) { if ( this . autoUpdate . get ( ) ) { try { removeMapLayerAt ( index ) ; return true ; } catch ( Throwable exception ) { } } return false ; } | Invoked when a bus line was removed from the attached network . |
6,522 | public static ImmutableKeyValueSource < Symbol , ByteSource > fromFileMap ( final Map < Symbol , File > fileMap ) { return new FileMapKeyToByteSource ( fileMap ) ; } | Creates a new key - value source based on the contents of the specified symbol to file map . |
6,523 | public static ImmutableKeyValueSource < Symbol , ByteSource > fromPalDB ( final File dbFile ) throws IOException { return PalDBKeyValueSource . fromFile ( dbFile ) ; } | Creates a new key - value source based on the contents of the specified embedded database . |
6,524 | protected JTree newTree ( ) { JTree tree = new JTree ( ) ; tree . setModel ( newTreeModel ( getModel ( ) ) ) ; tree . setEditable ( true ) ; tree . getSelectionModel ( ) . setSelectionMode ( TreeSelectionModel . SINGLE_TREE_SELECTION ) ; tree . addMouseListener ( new MouseAdapter ( ) { public void mousePressed ( MouseE... | New tree . |
6,525 | public void add ( Iterator < AbstractPathElement3F > iterator ) { AbstractPathElement3F element ; while ( iterator . hasNext ( ) ) { element = iterator . next ( ) ; switch ( element . type ) { case MOVE_TO : moveTo ( element . getToX ( ) , element . getToY ( ) , element . getToZ ( ) ) ; break ; case LINE_TO : lineTo ( ... | Add the elements replied by the iterator into this path . |
6,526 | public double length ( ) { if ( this . isEmpty ( ) ) return 0 ; double length = 0 ; PathIterator3f pi = getPathIterator ( MathConstants . SPLINE_APPROXIMATION_RATIO ) ; AbstractPathElement3F pathElement = pi . next ( ) ; if ( pathElement . type != PathElementType . MOVE_TO ) { throw new IllegalArgumentException ( "miss... | FIXME TO BE IMPLEMENTED IN POLYLINE |
6,527 | private ImmutableMap < Integer , Integer > lightEREOffsetToEDTOffset ( String document ) { final ImmutableMap . Builder < Integer , Integer > offsetMap = ImmutableMap . builder ( ) ; int EDT = 0 ; document = document . replaceAll ( "\\r\\n" , "\n" ) ; for ( int i = 0 ; i < document . length ( ) ; i ++ ) { final String ... | lightERE offsets are indexed into the document including text inside tags EDT offsets are |
6,528 | protected boolean validate ( String text ) { try { String [ ] strings = text . split ( "," ) ; for ( int i = 0 ; i < strings . length ; i ++ ) { Integer . parseInt ( strings [ i ] . trim ( ) ) ; } return true ; } catch ( NumberFormatException e ) { return false ; } } | Validate the given string that it is a int array |
6,529 | private Collection < EqClassT > getAlignedTo ( final Object item ) { if ( rightEquivalenceClassesToProvenances . containsKey ( item ) && leftEquivalenceClassesToProvenances . containsKey ( item ) ) { return ImmutableList . of ( ( EqClassT ) item ) ; } else { return ImmutableList . of ( ) ; } } | Any equivalence class is by definition aligned to itself if it is present on both the left and the right . Otherwise it has no alignment . |
6,530 | public synchronized < T extends EventListener > void add ( Class < T > type , T listener ) { assert listener != null ; if ( this . listeners == NULL ) { this . listeners = new Object [ ] { type , listener } ; } else { final int i = this . listeners . length ; final Object [ ] tmp = new Object [ i + 2 ] ; System . array... | Adds the listener as a listener of the specified type . |
6,531 | public synchronized < T extends EventListener > void remove ( Class < T > type , T listener ) { assert listener != null ; int index = - 1 ; for ( int i = this . listeners . length - 2 ; i >= 0 ; i -= 2 ) { if ( ( this . listeners [ i ] == type ) && ( this . listeners [ i + 1 ] . equals ( listener ) ) ) { index = i ; br... | Removes the listener as a listener of the specified type . |
6,532 | private void writeObject ( ObjectOutputStream stream ) throws IOException { final Object [ ] lList = this . listeners ; stream . defaultWriteObject ( ) ; for ( int i = 0 ; i < lList . length ; i += 2 ) { final Class < ? > t = ( Class < ? > ) lList [ i ] ; final EventListener l = ( EventListener ) lList [ i + 1 ] ; if (... | Serialization support . |
6,533 | public static MathFunctionRange [ ] createDiscreteSet ( double ... values ) { final MathFunctionRange [ ] bounds = new MathFunctionRange [ values . length ] ; for ( int i = 0 ; i < values . length ; ++ i ) { bounds [ i ] = new MathFunctionRange ( values [ i ] ) ; } return bounds ; } | Create a set of bounds that correspond to the specified discrete values . |
6,534 | public static MathFunctionRange [ ] createSet ( double ... values ) { final MathFunctionRange [ ] bounds = new MathFunctionRange [ values . length / 2 ] ; for ( int i = 0 , j = 0 ; i < values . length ; i += 2 , ++ j ) { bounds [ j ] = new MathFunctionRange ( values [ i ] , values [ i + 1 ] ) ; } return bounds ; } | Create a set of bounds that correspond to the specified values . |
6,535 | public Interceptor interceptToProgressResponse ( ) { return new Interceptor ( ) { public Response intercept ( Chain chain ) throws IOException { Response response = chain . proceed ( chain . request ( ) ) ; ResponseBody body = new ForwardResponseBody ( response . body ( ) ) ; return response . newBuilder ( ) . body ( b... | intercept the Response body stream progress |
6,536 | void setStartPoint ( StandardRoadConnection desiredConnection ) { final StandardRoadConnection oldPoint = getBeginPoint ( StandardRoadConnection . class ) ; if ( oldPoint != null ) { oldPoint . removeConnectedSegment ( this , true ) ; } this . firstConnection = desiredConnection ; if ( desiredConnection != null ) { fin... | Move the start point of a road segment . |
6,537 | void setEndPoint ( StandardRoadConnection desiredConnection ) { final StandardRoadConnection oldPoint = getEndPoint ( StandardRoadConnection . class ) ; if ( oldPoint != null ) { oldPoint . removeConnectedSegment ( this , false ) ; } this . lastConnection = desiredConnection ; if ( desiredConnection != null ) { final P... | Move the end point of a road segment . |
6,538 | private static < K , V > ImmutableMap < K , V > filterMapToKeysPreservingOrder ( final ImmutableMap < ? extends K , ? extends V > map , Iterable < ? extends K > keys ) { final ImmutableMap . Builder < K , V > ret = ImmutableMap . builder ( ) ; for ( final K key : keys ) { final V value = map . get ( key ) ; checkArgume... | Filters a map down to the specified keys such that the new map has the same iteration order as the specified keys . |
6,539 | public static Component getRootJDialog ( Component component ) { while ( null != component . getParent ( ) ) { component = component . getParent ( ) ; if ( component instanceof JDialog ) { break ; } } return component ; } | Gets the root JDialog from the given Component Object . |
6,540 | public static Component getRootJFrame ( Component component ) { while ( null != component . getParent ( ) ) { component = component . getParent ( ) ; if ( component instanceof JFrame ) { break ; } } return component ; } | Gets the root JFrame from the given Component Object . |
6,541 | public static Component getRootParent ( Component component ) { while ( null != component . getParent ( ) ) { component = component . getParent ( ) ; } return component ; } | Gets the root parent from the given Component Object . |
6,542 | public static void setIconImage ( final String resourceName , final Window window ) throws IOException { final InputStream isLogo = ClassExtensions . getResourceAsStream ( resourceName ) ; final BufferedImage biLogo = ImageIO . read ( isLogo ) ; window . setIconImage ( biLogo ) ; } | Sets the icon image from the given resource name and add it to the given window object . |
6,543 | public double getDistance ( Point2D < ? , ? > point ) { double dist = super . getDistance ( point ) ; dist -= this . radius ; return dist ; } | Replies the distance between this MapCircle and point . |
6,544 | public static Point3dfx convert ( Tuple3D < ? > tuple ) { if ( tuple instanceof Point3dfx ) { return ( Point3dfx ) tuple ; } return new Point3dfx ( tuple . getX ( ) , tuple . getY ( ) , tuple . getZ ( ) ) ; } | Convert the given tuple to a real Point3dfx . |
6,545 | @ SuppressWarnings ( { "TypeParameterUnusedInFormals" , "unchecked" } ) private < T > T fetch ( final String id ) { checkNotNull ( id ) ; checkArgument ( ! id . isEmpty ( ) ) ; final T ret = ( T ) idMap . get ( id ) ; if ( ret == null ) { throw new EREException ( String . format ( "Lookup failed for id %s." , id ) ) ; ... | no way around unchecked cast for heterogeneous container |
6,546 | public void setSpecialChars ( String [ ] [ ] chars ) { assert chars != null : AssertMessages . notNullParameter ( ) ; this . specialChars . clear ( ) ; for ( final String [ ] pair : chars ) { assert pair != null ; assert pair . length == 2 ; assert pair [ 0 ] . length ( ) > 0 ; assert pair [ 1 ] . length ( ) > 0 ; this... | Change the special characters . |
6,547 | public void setValidCharRange ( int minValidChar , int maxValidChar ) { if ( minValidChar <= maxValidChar ) { this . minValidChar = minValidChar ; this . maxValidChar = maxValidChar ; } else { this . maxValidChar = minValidChar ; this . minValidChar = maxValidChar ; } } | Change the range of the valid characters that should not be escaped . Any character outside the given range is automatically escaped . |
6,548 | @ SuppressWarnings ( "checkstyle:magicnumber" ) public String escape ( CharSequence text ) { final StringBuilder result = new StringBuilder ( ) ; for ( int i = 0 ; i < text . length ( ) ; ++ i ) { final char c = text . charAt ( i ) ; final String cs = Character . toString ( c ) ; if ( this . escapeCharacters . contains... | Escape the given text . |
6,549 | public static void shuffle ( final int [ ] arr , final Random rng ) { for ( int i = arr . length ; i > 1 ; i -- ) { final int a = i - 1 ; final int b = rng . nextInt ( i ) ; final int tmp = arr [ b ] ; arr [ b ] = arr [ a ] ; arr [ a ] = tmp ; } } | Fisher - Yates suffer a primitive int array |
6,550 | protected void setupRoadBorders ( ZoomableGraphicsContext gc , RoadPolyline element ) { final Color color = gc . rgb ( getDrawingColor ( element ) ) ; gc . setStroke ( color ) ; final double width ; if ( element . isWidePolyline ( ) ) { width = 2 + gc . doc2fxSize ( element . getWidth ( ) ) ; } else { width = 3 ; } gc ... | Setup for drawing the road borders . |
6,551 | protected void setupRoadInterior ( ZoomableGraphicsContext gc , RoadPolyline element ) { final Color color ; if ( isSelected ( element ) ) { color = gc . rgb ( SELECTED_ROAD_COLOR ) ; } else { color = gc . rgb ( ROAD_COLOR ) ; } gc . setStroke ( color ) ; if ( element . isWidePolyline ( ) ) { gc . setLineWidthInMeters ... | Setup for drawing the road interior . |
6,552 | public static String lowerEqualParameter ( int aindex , Object avalue , Object value ) { return msg ( "A11" , aindex , avalue , value ) ; } | Parameter A must be lower than or equal to the given value . |
6,553 | public static String lowerEqualParameters ( int aindex , Object avalue , int bindex , Object bvalue ) { return msg ( "A3" , aindex , avalue , bindex , bvalue ) ; } | Parameter A must be lower than or equal to Parameter B . |
6,554 | public static String outsideRangeInclusiveParameter ( int parameterIndex , Object currentValue , Object minValue , Object maxValue ) { return msg ( "A6" , parameterIndex , currentValue , minValue , maxValue ) ; } | Value is outside range . |
6,555 | @ Inline ( value = "AssertMessages.outsideRangeInclusiveParameter(0, $1, $2, $3)" , imported = { AssertMessages . class } ) public static String outsideRangeInclusiveParameter ( Object currentValue , Object minValue , Object maxValue ) { return outsideRangeInclusiveParameter ( 0 , currentValue , minValue , maxValue ) ;... | First parameter value is outside range . |
6,556 | @ Inline ( value = "AssertMessages.tooSmallArrayParameter(0, $1, $2)" , imported = { AssertMessages . class } ) public static String tooSmallArrayParameter ( int currentSize , int expectedSize ) { return tooSmallArrayParameter ( 0 , currentSize , expectedSize ) ; } | Size of the first array parameter is too small . |
6,557 | public static String tooSmallArrayParameter ( int parameterIndex , int currentSize , int expectedSize ) { return msg ( "A5" , parameterIndex , currentSize , expectedSize ) ; } | Size of the array parameter is too small . |
6,558 | public static ShapeElementType toESRI ( Class < ? extends MapElement > type ) { if ( MapPolyline . class . isAssignableFrom ( type ) ) { return ShapeElementType . POLYLINE ; } if ( MapPolygon . class . isAssignableFrom ( type ) ) { return ShapeElementType . POLYGON ; } if ( MapMultiPoint . class . isAssignableFrom ( ty... | Replies the type of map element which is corresponding to the given GIS class . |
6,559 | @ SuppressWarnings ( "unchecked" ) public static < T , V > ImmutableMap < V , Alignment < T , T > > splitAlignmentByKeyFunction ( Alignment < ? extends T , ? extends T > alignment , Function < ? super T , ? extends V > keyFunction ) { final ImmutableSet < ? extends V > allKeys = FluentIterable . from ( ( ImmutableSet <... | Splits an alignment into many alignments based on a function mapping aligned items to some set of keys . Returns a map where the keys are all observed outputs of the key function on items in the alignment and the values are new alignments containing only elements which yield that output when the key function is applied... |
6,560 | protected void fireStateChange ( ) { if ( this . listeners != null ) { final ProgressionEvent event = new ProgressionEvent ( this , isRootModel ( ) ) ; for ( final ProgressionListener listener : this . listeners . getListeners ( ProgressionListener . class ) ) { listener . onProgressionStateChanged ( event ) ; } } } | Notify listeners about state change . |
6,561 | protected void fireValueChange ( ) { if ( this . listeners != null ) { final ProgressionEvent event = new ProgressionEvent ( this , isRootModel ( ) ) ; for ( final ProgressionListener listener : this . listeners . getListeners ( ProgressionListener . class ) ) { listener . onProgressionValueChanged ( event ) ; } } } | Notify listeners about value change . |
6,562 | void setValue ( SubProgressionModel subTask , double newValue , String comment ) { setProperties ( newValue , this . min , this . max , this . isAdjusting , comment == null ? this . comment : comment , true , true , false , subTask ) ; } | Set the value with a float - point precision . This method is invoked from a subtask . |
6,563 | void disconnectSubTask ( SubProgressionModel subTask , double value , boolean overwriteComment ) { if ( this . child == subTask ) { if ( overwriteComment ) { final String cmt = subTask . getComment ( ) ; if ( cmt != null ) { this . comment = cmt ; } } this . child = null ; setProperties ( value , this . min , this . ma... | Set the parent value and disconnect this subtask from its parent . This method is invoked from a subtask . |
6,564 | protected boolean onBusItineraryAdded ( BusItinerary itinerary , int index ) { if ( this . autoUpdate . get ( ) ) { try { addMapLayer ( index , new BusItineraryLayer ( itinerary , isLayerAutoUpdated ( ) ) ) ; return true ; } catch ( Throwable exception ) { } } return false ; } | Invoked when a bus itinerary was added in the attached line . |
6,565 | protected boolean onBusItineraryRemoved ( BusItinerary itinerary , int index ) { if ( this . autoUpdate . get ( ) ) { try { removeMapLayerAt ( index ) ; return true ; } catch ( Throwable exception ) { } } return false ; } | Invoked when a bus itinerary was removed from the attached line . |
6,566 | @ SuppressWarnings ( "checkstyle:cyclomaticcomplexity" ) public static Class < ? extends MapElement > fromESRI ( ShapeElementType type ) { switch ( type ) { case MULTIPOINT : case MULTIPOINT_M : case MULTIPOINT_Z : return MapMultiPoint . class ; case POINT : case POINT_M : case POINT_Z : return MapPoint . class ; case ... | Replies the type of map element which is corresponding to the given ESRI type . |
6,567 | public Class < ? extends MapElement > getMapElementType ( ) { if ( this . elementType != null ) { return this . elementType ; } try { return fromESRI ( getShapeElementType ( ) ) ; } catch ( IllegalArgumentException exception ) { } return null ; } | Replies the type of map element replied by this reader . |
6,568 | protected static UUID extractUUID ( AttributeProvider provider ) { AttributeValue value ; value = provider . getAttribute ( UUID_ATTR ) ; if ( value != null ) { try { return value . getUUID ( ) ; } catch ( InvalidAttributeTypeException e ) { } catch ( AttributeNotInitializedException e ) { } } value = provider . getAtt... | Extract the UUID from the attributes . |
6,569 | protected void onShowPopup ( final MouseEvent e ) { if ( e . isPopupTrigger ( ) ) { System . out . println ( e . getSource ( ) ) ; popupMenu . show ( e . getComponent ( ) , e . getX ( ) , e . getY ( ) ) ; } } | Callback method that is called on show popup . |
6,570 | private final Command takeExecutingCommand ( ) { try { return this . commandAlreadySent . take ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } return null ; } | get current command from queue |
6,571 | public static void load ( URL filename ) throws IOException { if ( disable ) { return ; } if ( URISchemeType . FILE . isURL ( filename ) ) { try { load ( new File ( filename . toURI ( ) ) ) ; } catch ( URISyntaxException e ) { throw new FileNotFoundException ( filename . toExternalForm ( ) ) ; } } else { final String l... | Loads a code file with the specified filename from the local file system as a dynamic library . The filename argument must be a complete path name . |
6,572 | private E readPoint ( int elementIndex , ShapeElementType type ) throws IOException { final boolean hasZ = type . hasZ ( ) ; final boolean hasM = type . hasM ( ) ; final double x = fromESRI_x ( readLEDouble ( ) ) ; final double y = fromESRI_y ( readLEDouble ( ) ) ; double z = 0 ; double measure = Double . NaN ; if ( ha... | Read a point . |
6,573 | @ SuppressWarnings ( { "checkstyle:cyclomaticcomplexity" , "checkstyle:npathcomplexity" } ) private E readPolyElement ( int elementIndex , ShapeElementType type ) throws IOException { final boolean hasZ = type . hasZ ( ) ; final boolean hasM = type . hasM ( ) ; skipBytes ( 8 * 4 ) ; final int numParts ; if ( type == Sh... | Read a polyelement . |
6,574 | private E readMultiPatch ( int elementIndex , ShapeElementType type ) throws IOException { skipBytes ( 8 * 4 ) ; final int partCount = readLEInt ( ) ; final int pointCount = readLEInt ( ) ; final int [ ] parts = new int [ partCount ] ; for ( int idxParts = 0 ; idxParts < partCount ; ++ idxParts ) { parts [ idxParts ] =... | Read a multipatch . |
6,575 | private void readAttributesFromDBaseFile ( E created_element ) throws IOException { if ( this . dbfReader != null ) { final List < DBaseFileField > dbfColumns = this . dbfReader . getDBFFields ( ) ; final DBaseFileRecord record = this . dbfReader . readNextDBFRecord ( ) ; if ( record != null ) { for ( final DBaseFileFi... | Create the attribute values that correspond to the dBase content . |
6,576 | public static double noiseValue ( double value , MathFunction noiseLaw ) throws MathException { try { double noise = Math . abs ( noiseLaw . f ( value ) ) ; initRandomNumberList ( ) ; noise *= uniformRandomVariableList . nextFloat ( ) ; if ( uniformRandomVariableList . nextBoolean ( ) ) { noise = - noise ; } return val... | Add a noise to the specified value . |
6,577 | public void setRotation ( Quaternion rotation ) { this . m00 = 1.0f - 2.0f * rotation . getY ( ) * rotation . getY ( ) - 2.0f * rotation . getZ ( ) * rotation . getZ ( ) ; this . m10 = 2.0f * ( rotation . getX ( ) * rotation . getY ( ) + rotation . getW ( ) * rotation . getZ ( ) ) ; this . m20 = 2.0f * ( rotation . get... | Set the rotation for the object but do not change the translation . |
6,578 | public final void makeRotationMatrix ( Quaternion rotation ) { this . m00 = 1.0f - 2.0f * rotation . getY ( ) * rotation . getY ( ) - 2.0f * rotation . getZ ( ) * rotation . getZ ( ) ; this . m10 = 2.0f * ( rotation . getX ( ) * rotation . getY ( ) + rotation . getW ( ) * rotation . getZ ( ) ) ; this . m20 = 2.0f * ( r... | Sets the value of this matrix to a rotation matrix and no translation . |
6,579 | void setPosition ( Point2D < ? , ? > position ) { this . location = position == null ? null : new SoftReference < > ( Point2d . convert ( position ) ) ; } | Set the temporary buffer of the position of the road connection . |
6,580 | void addConnectedSegment ( RoadPolyline segment , boolean attachToStartPoint ) { if ( segment == null ) { return ; } if ( this . connectedSegments . isEmpty ( ) ) { this . connectedSegments . add ( new Connection ( segment , attachToStartPoint ) ) ; } else { final double newSegmentAngle = computeAngle ( segment , attac... | Add a segment to this connection point . |
6,581 | int removeConnectedSegment ( RoadSegment segment , boolean attachToStartPoint ) { if ( segment == null ) { return - 1 ; } final int idx = indexOf ( segment , attachToStartPoint ) ; if ( idx != - 1 ) { this . connectedSegments . remove ( idx ) ; fireIteratorUpdate ( ) ; } return idx ; } | Remove a connection with a segment . |
6,582 | protected void addListeningIterator ( IClockwiseIterator iterator ) { if ( this . listeningIterators == null ) { this . listeningIterators = new WeakArrayList < > ( ) ; } this . listeningIterators . add ( iterator ) ; } | Add a listening iterator . |
6,583 | protected void removeListeningIterator ( IClockwiseIterator iterator ) { if ( this . listeningIterators != null ) { this . listeningIterators . remove ( iterator ) ; if ( this . listeningIterators . isEmpty ( ) ) { this . listeningIterators = null ; } } } | Remove a listening iterator . |
6,584 | protected void fireIteratorUpdate ( ) { if ( this . listeningIterators != null ) { for ( final IClockwiseIterator iterator : this . listeningIterators ) { if ( iterator != null ) { iterator . dataStructureUpdated ( ) ; } } } } | Notify the iterators about changes . |
6,585 | public static int getPreferredRoadColor ( RoadType roadType , boolean useSystemValue ) { final RoadType rt = roadType == null ? RoadType . OTHER : roadType ; final Preferences prefs = Preferences . userNodeForPackage ( RoadNetworkLayerConstants . class ) ; if ( prefs != null ) { final String str = prefs . get ( "ROAD_C... | Replies the preferred color to draw the content of the roads of the given type . |
6,586 | public static void setPreferredRoadColor ( RoadType roadType , Integer color ) { final RoadType rt = roadType == null ? RoadType . OTHER : roadType ; final Preferences prefs = Preferences . userNodeForPackage ( RoadNetworkLayerConstants . class ) ; if ( prefs != null ) { if ( color == null || color . intValue ( ) == DE... | Set the preferred color to draw the content of the roads of the given type . |
6,587 | public static boolean getPreferredRoadInternDrawing ( ) { final Preferences prefs = Preferences . userNodeForPackage ( RoadNetworkLayerConstants . class ) ; if ( prefs != null ) { return prefs . getBoolean ( "ROAD_INTERN_DRAWING" , DEFAULT_ROAD_INTERN_DRAWING ) ; } return DEFAULT_ROAD_INTERN_DRAWING ; } | Replies if the internal data structure used to store the road network may be drawn on the displayers . |
6,588 | public static void setPreferredRoadInternDrawing ( Boolean draw ) { final Preferences prefs = Preferences . userNodeForPackage ( RoadNetworkLayerConstants . class ) ; if ( prefs != null ) { if ( draw == null ) { prefs . remove ( "ROAD_INTERN_DRAWING" ) ; } else { prefs . putBoolean ( "ROAD_INTERN_DRAWING" , draw ) ; } ... | Set if the internal data structure used to store the road network may be drawn on the displayers . |
6,589 | public static int getPreferredRoadInternColor ( ) { final Preferences prefs = Preferences . userNodeForPackage ( RoadNetworkLayerConstants . class ) ; if ( prefs != null ) { final String color = prefs . get ( "ROAD_INTERN_COLOR" , null ) ; if ( color != null ) { try { return Integer . valueOf ( color ) ; } catch ( Thro... | Replies the color of the internal data structures used when they are drawn on the displayers . |
6,590 | public static void setPreferredRoadInternColor ( Integer color ) { final Preferences prefs = Preferences . userNodeForPackage ( RoadNetworkLayerConstants . class ) ; if ( prefs != null ) { if ( color == null ) { prefs . remove ( "ROAD_INTERN_COLOR" ) ; } else { prefs . put ( "ROAD_INTERN_COLOR" , Integer . toString ( c... | Set the color of the internal data structures used when they are drawn on the displayers . |
6,591 | public static double clamp ( double v , double min , double max ) { assert min <= max : AssertMessages . lowerEqualParameters ( 1 , min , 2 , max ) ; if ( v < min ) { return min ; } if ( v > max ) { return max ; } return v ; } | Clamp the given value to the given range . |
6,592 | public static double clampCyclic ( double value , double min , double max ) { assert min <= max : AssertMessages . lowerEqualParameters ( 1 , min , 2 , max ) ; if ( Double . isNaN ( max ) || Double . isNaN ( min ) || Double . isNaN ( max ) ) { return Double . NaN ; } if ( value < min ) { final double perimeter = max - ... | Clamp the given value to fit between the min and max values according to a cyclic heuristic . If the given value is not between the minimum and maximum values the replied value is modulo the min - max range . |
6,593 | public static DoubleRange getMinMax ( double value1 , double value2 , double value3 ) { final double min ; final double max ; if ( value1 <= value2 ) { if ( value1 <= value3 ) { min = value1 ; if ( value2 <= value3 ) { max = value3 ; } else { max = value2 ; } } else { max = value2 ; if ( Double . isNaN ( value3 ) ) { m... | Determine the min and max values from a set of three values . |
6,594 | @ Inline ( value = "1./Math.sin($1)" , imported = { Math . class } ) public static double csc ( double angle ) { return 1. / Math . sin ( angle ) ; } | Replies the cosecant of the specified angle . |
6,595 | @ Inline ( value = "1./Math.cos($1)" , imported = { Math . class } ) public static double sec ( double angle ) { return 1. / Math . cos ( angle ) ; } | Replies the secant of the specified angle . |
6,596 | @ Inline ( value = "1./Math.tan($1)" , imported = { Math . class } ) public static double cot ( double angle ) { return 1. / Math . tan ( angle ) ; } | Replies the cotangent of the specified angle . |
6,597 | @ Inline ( value = "1.-Math.cos($1)" , imported = { Math . class } ) public static double versin ( double angle ) { return 1. - Math . cos ( angle ) ; } | Replies the versine of the specified angle . |
6,598 | @ Inline ( value = "2.*Math.sin(($1)/2.)" , imported = { Math . class } ) public static double crd ( double angle ) { return 2. * Math . sin ( angle / 2. ) ; } | Replies the chord of the specified angle . |
6,599 | public static Point2dfx convert ( Tuple2D < ? > tuple ) { if ( tuple instanceof Point2dfx ) { return ( Point2dfx ) tuple ; } return new Point2dfx ( tuple . getX ( ) , tuple . getY ( ) ) ; } | Convert the given tuple to a real Point2dfx . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.