idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
6,300 | private static IndexEnvironment setupIndexer ( File outputDirectory , int memory , boolean storeDocs ) throws Exception { final IndexEnvironment env = new IndexEnvironment ( ) ; env . setMemory ( memory * ONE_MEGABYTE ) ; final Specification spec = env . getFileClassSpec ( "trectext" ) ; env . addFileClass ( spec ) ; e... | because its only reference is in native code then we will get a crash . |
6,301 | @ SuppressWarnings ( "unchecked" ) void registerConsumer ( Inspector < ? super OutT > subInspector ) { consumers . add ( ( Inspector < OutT > ) subInspector ) ; } | Inspector is contravariant in its type |
6,302 | public static int classifies ( AbstractGISTreeSetNode < ? , ? > node , GeoLocation location ) { if ( node . getZone ( ) == IcosepQuadTreeZone . ICOSEP ) { return classifiesIcocep ( node . verticalSplit , node . horizontalSplit , location . toBounds2D ( ) ) ; } return classifiesNonIcocep ( node . verticalSplit , node . ... | Replies the classificiation of the specified location . |
6,303 | static boolean contains ( int region , double cutX , double cutY , double pointX , double pointY ) { switch ( IcosepQuadTreeZone . values ( ) [ region ] ) { case SOUTH_WEST : return pointX <= cutX && pointY <= cutY ; case SOUTH_EAST : return pointX >= cutX && pointY <= cutY ; case NORTH_WEST : return pointX <= cutX && ... | Replies if the given region contains the given point . |
6,304 | private static boolean isOutsideNodeBuildingBounds ( AbstractGISTreeSetNode < ? , ? > node , Rectangle2afp < ? , ? , ? , ? , ? , ? > location ) { final Rectangle2d b2 = getNormalizedNodeBuildingBounds ( node , location ) ; if ( b2 == null ) { return false ; } return Rectangle2afp . classifiesRectangleRectangle ( b2 . g... | Replies if the given geolocation is outside the building bounds of the given node . |
6,305 | private static Rectangle2d union ( AbstractGISTreeSetNode < ? , ? > node , Rectangle2afp < ? , ? , ? , ? , ? , ? > shape ) { final Rectangle2d b = getNodeBuildingBounds ( node ) ; b . setUnion ( shape ) ; normalize ( b , shape ) ; return b ; } | Compute the union of the building bounds of the given node and the given geolocation . |
6,306 | public static Rectangle2d getNodeBuildingBounds ( AbstractGISTreeSetNode < ? , ? > node ) { assert node != null ; final double w = node . nodeWidth / 2. ; final double h = node . nodeHeight / 2. ; final IcosepQuadTreeZone zone = node . getZone ( ) ; final double lx ; final double ly ; if ( zone == null ) { lx = node . ... | Replies the bounds of the area covered by the node . The replied rectangle is not normalized . |
6,307 | private static < P extends GISPrimitive , N extends AbstractGISTreeSetNode < P , N > > N createNode ( N parent , IcosepQuadTreeZone region , GISTreeSetNodeFactory < P , N > builder ) { Rectangle2d area = parent . getAreaBounds ( ) ; if ( region == IcosepQuadTreeZone . ICOSEP ) { return builder . newNode ( IcosepQuadTre... | Create a child node that supports the specified region . |
6,308 | private static Rectangle2d computeIcosepSubarea ( IcosepQuadTreeZone region , Rectangle2d area ) { if ( area == null || area . isEmpty ( ) ) { return area ; } final double demiWidth = area . getWidth ( ) / 2. ; final double demiHeight = area . getHeight ( ) / 2. ; switch ( region ) { case ICOSEP : return area ; case SO... | Computes the area covered by a child node of an icosep - node . |
6,309 | private static < P extends GISPrimitive , N extends AbstractGISTreeSetNode < P , N > > Point2d computeCutPoint ( IcosepQuadTreeZone region , N parent ) { final double w = parent . nodeWidth / 4. ; final double h = parent . nodeHeight / 4. ; final double x ; final double y ; switch ( region ) { case SOUTH_WEST : x = par... | Computes the cut planes position of the given region . |
6,310 | private static < P extends GISPrimitive , N extends AbstractGISTreeSetNode < P , N > > N rearrangeTree ( AbstractGISTreeSet < P , N > tree , N node , Rectangle2afp < ? , ? , ? , ? , ? , ? > desiredBounds , GISTreeSetNodeFactory < P , N > builder ) { N topNode = node . getParentNode ( ) ; while ( topNode != null && isOu... | Try to rearrange the cut planes of the given node . |
6,311 | protected synchronized void addShapeGeometryChangeListener ( ShapeGeometryChangeListener listener ) { assert listener != null : AssertMessages . notNullParameter ( ) ; if ( this . geometryListeners == null ) { this . geometryListeners = new WeakArrayList < > ( ) ; } this . geometryListeners . add ( listener ) ; } | Add listener on geometry changes . |
6,312 | protected synchronized void removeShapeGeometryChangeListener ( ShapeGeometryChangeListener listener ) { assert listener != null : AssertMessages . notNullParameter ( ) ; if ( this . geometryListeners != null ) { this . geometryListeners . remove ( listener ) ; if ( this . geometryListeners . isEmpty ( ) ) { this . geo... | Remove listener on geometry changes . |
6,313 | protected synchronized void fireGeometryChange ( ) { if ( this . geometryListeners == null ) { return ; } final ShapeGeometryChangeListener [ ] array = new ShapeGeometryChangeListener [ this . geometryListeners . size ( ) ] ; this . geometryListeners . toArray ( array ) ; for ( final ShapeGeometryChangeListener listene... | Notify any listener of a geometry change . |
6,314 | protected void setupListeners ( ) { addDrawingListener ( new DrawingListener ( ) { private long time ; public void onDrawingStart ( ) { this . time = System . currentTimeMillis ( ) ; getCorner ( ) . setColor ( Color . ORANGERED ) ; } public void onDrawingEnd ( ) { getCorner ( ) . setColor ( null ) ; final long duration... | Setup the response based on listeners . |
6,315 | @ SuppressWarnings ( { "checkstyle:cyclomaticcomplexity" , "checkstyle:npathcomplexity" , "checkstyle:nestedifdepth" } ) protected void setupMousing ( ) { final ZoomableCanvas < T > canvas = getDocumentCanvas ( ) ; canvas . addEventHandler ( MouseEvent . MOUSE_PRESSED , e -> { this . pressX = e . getX ( ) ; this . pres... | Setup the response of the pane to mouse events . |
6,316 | protected void setupKeying ( ) { setOnKeyPressed ( event -> { switch ( event . getCode ( ) ) { case LEFT : moveLeft ( event . isShiftDown ( ) , event . isControlDown ( ) , false ) ; event . consume ( ) ; break ; case RIGHT : moveRight ( event . isShiftDown ( ) , event . isControlDown ( ) , false ) ; event . consume ( )... | Setup the response of the pane to key events . |
6,317 | public void moveLeft ( boolean isUnit , boolean isLarge , boolean isVeryLarge ) { double inc = isUnit ? this . hbar . getUnitIncrement ( ) : ( isLarge ? LARGE_MOVE_FACTOR : ( isVeryLarge ? VERY_LARGE_MOVE_FACTOR : STANDARD_MOVE_FACTOR ) ) * this . hbar . getBlockIncrement ( ) ; if ( ! isInvertedAxisX ( ) ) { inc = - in... | Move the viewport left . |
6,318 | public void moveUp ( boolean isUnit , boolean isLarge , boolean isVeryLarge ) { double inc = isUnit ? this . vbar . getUnitIncrement ( ) : ( isLarge ? LARGE_MOVE_FACTOR : ( isVeryLarge ? VERY_LARGE_MOVE_FACTOR : STANDARD_MOVE_FACTOR ) ) * this . vbar . getBlockIncrement ( ) ; if ( ! isInvertedAxisY ( ) ) { inc = - inc ... | Move the viewport up . |
6,319 | public ObjectProperty < Logger > loggerProperty ( ) { if ( this . logger == null ) { this . logger = new SimpleObjectProperty < Logger > ( this , LOGGER_PROPERTY , Logger . getLogger ( getClass ( ) . getName ( ) ) ) { protected void invalidated ( ) { final Logger log = get ( ) ; if ( log == null ) { set ( Logger . getL... | Replies the property that contains the logger . |
6,320 | public ObjectProperty < MouseButton > panButtonProperty ( ) { if ( this . panButton == null ) { this . panButton = new StyleableObjectProperty < MouseButton > ( DEFAULT_PAN_BUTTON ) { @ SuppressWarnings ( "synthetic-access" ) protected void invalidated ( ) { final MouseButton button = get ( ) ; if ( button == null ) { ... | Replies the property for the button that serves for starting the mouse scrolling . |
6,321 | public DoubleProperty panSensitivityProperty ( ) { if ( this . panSensitivity == null ) { this . panSensitivity = new StyleableDoubleProperty ( DEFAULT_PAN_SENSITIVITY ) { public void invalidated ( ) { if ( get ( ) <= MIN_PAN_SENSITIVITY ) { set ( MIN_PAN_SENSITIVITY ) ; } } public CssMetaData < ZoomablePane < ? > , Nu... | Replies the property that indicates the sensibility of the panning moves . The sensibility is a strictly positive number that is multiplied to the distance covered by the mouse motion for obtaining the move to apply to the document . The default value is 1 . |
6,322 | public double getPanSensitivity ( boolean unitSensitivityModifier , boolean hugeSensivityModifier ) { if ( unitSensitivityModifier ) { return DEFAULT_PAN_SENSITIVITY ; } final double sens = getPanSensitivity ( ) ; if ( hugeSensivityModifier ) { return sens * LARGE_MOVE_FACTOR ; } return sens ; } | Replies the sensibility of the panning moves after applying dynamic user interaction modifiers . The sensibility is a strictly positive number that is multiplied to the distance covered by the mouse motion for obtaining the move to apply to the document . The default value is 1 . |
6,323 | public static void setGlobalSplineApproximationRatio ( Double distance ) { if ( distance == null || Double . isNaN ( distance . doubleValue ( ) ) ) { globalSplineApproximation = GeomConstants . SPLINE_APPROXIMATION_RATIO ; } else { globalSplineApproximation = Math . max ( 0 , distance ) ; } } | Change the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve . |
6,324 | public ESRIBounds createUnion ( ESRIBounds bounds ) { final ESRIBounds eb = new ESRIBounds ( ) ; eb . minx = ( bounds . minx < this . minx ) ? bounds . minx : this . minx ; eb . maxx = ( bounds . maxx < this . maxx ) ? this . maxx : bounds . maxx ; eb . miny = ( bounds . miny < this . miny ) ? bounds . miny : this . mi... | Create and replies an union of this bounds and the given bounds . |
6,325 | public void add ( ESRIPoint point ) { if ( point . getX ( ) < this . minx ) { this . minx = point . getX ( ) ; } if ( point . getX ( ) > this . maxx ) { this . maxx = point . getX ( ) ; } if ( point . getY ( ) < this . miny ) { this . miny = point . getY ( ) ; } if ( point . getY ( ) > this . maxy ) { this . maxy = poi... | Add a point to this bounds . |
6,326 | public Rectangle2d toRectangle2d ( ) { final Rectangle2d bounds = new Rectangle2d ( ) ; bounds . setFromCorners ( this . minx , this . miny , this . maxx , this . maxy ) ; return bounds ; } | Replies the 2D bounds . |
6,327 | public void ensureMinMax ( ) { double t ; if ( this . maxx < this . minx ) { t = this . minx ; this . minx = this . maxx ; this . maxx = t ; } if ( this . maxy < this . miny ) { t = this . miny ; this . miny = this . maxy ; this . maxy = t ; } if ( this . maxz < this . minz ) { t = this . minz ; this . minz = this . ma... | Ensure that min and max values are correctly ordered . |
6,328 | public ESRIBounds getBoundsFromHeader ( ) { try { readHeader ( ) ; } catch ( IOException exception ) { return null ; } return new ESRIBounds ( this . minx , this . maxx , this . miny , this . maxy , this . minz , this . maxz , this . minm , this . maxm ) ; } | Replies the bounds read from the shape file header . |
6,329 | public E read ( ) throws IOException { boolean status = false ; try { readHeader ( ) ; E element ; try { do { element = readRecord ( this . nextExpectedRecordIndex ) ; if ( ! postRecordReadingStage ( element ) ) { element = null ; } ++ this . nextExpectedRecordIndex ; } while ( element == null ) ; } catch ( EOFExceptio... | Read the elements for a shape file . |
6,330 | protected void setReadingPosition ( int recordIndex , int byteIndex ) throws IOException { if ( this . seekEnabled ) { this . nextExpectedRecordIndex = recordIndex ; this . buffer . position ( byteIndex ) ; } else { throw new SeekOperationDisabledException ( ) ; } } | Set the reading position excluding the header . |
6,331 | protected void ensureAvailableBytes ( int amount ) throws IOException { if ( ! this . seekEnabled && amount > this . buffer . remaining ( ) ) { this . bufferPosition += this . buffer . position ( ) ; this . buffer . compact ( ) ; int limit = this . buffer . position ( ) ; final int read = this . stream . read ( this . ... | Ensure that the reading buffer is containing enoug bytes to read . |
6,332 | protected void skipBytes ( int amount ) throws IOException { ensureAvailableBytes ( amount ) ; this . buffer . position ( this . buffer . position ( ) + amount ) ; } | Skip an amount of bytes . |
6,333 | public Point2D < ? , ? > predictTargetPosition ( Point2D < ? , ? > targetPosition , Vector2D < ? , ? > targetLinearMotion ) { return new Point2d ( targetPosition . getX ( ) + targetLinearMotion . getX ( ) * this . predictionDuration , targetPosition . getY ( ) + targetLinearMotion . getY ( ) * this . predictionDuration... | Predict the next position of the target . |
6,334 | protected void reconnect ( Session session ) { if ( this . hsClient . isStarted ( ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Add reconnectRequest to connector " + session . getRemoteSocketAddress ( ) ) ; } HandlerSocketSession hSession = ( HandlerSocketSession ) session ; InetSocketAddress addr = hSession .... | Auto reconect request to hs4j server |
6,335 | public AStarSegmentReplacer < ST > setSegmentReplacer ( AStarSegmentReplacer < ST > replacer ) { final AStarSegmentReplacer < ST > old = this . segmentReplacer ; this . segmentReplacer = replacer ; return old ; } | Set the object to use to replace the segments in the shortest path . |
6,336 | public AStarSegmentOrientation < ST , PT > setSegmentOrientationTool ( AStarSegmentOrientation < ST , PT > tool ) { final AStarSegmentOrientation < ST , PT > old = this . segmentOrientation ; this . segmentOrientation = tool ; return old ; } | Set the tool that permits to retreive the orinetation of the segments . |
6,337 | public AStarCostComputer < ? super ST , ? super PT > setCostComputer ( AStarCostComputer < ? super ST , ? super PT > costComputer ) { final AStarCostComputer < ? super ST , ? super PT > old = this . costComputer ; this . costComputer = costComputer ; return old ; } | Set the tool that permits to compute the costs of the nodes and the edges . |
6,338 | protected double estimate ( PT p1 , PT p2 ) { assert p1 != null && p2 != null ; if ( this . heuristic == null ) { throw new IllegalStateException ( Locale . getString ( "E1" ) ) ; } return this . heuristic . evaluate ( p1 , p2 ) ; } | Evaluate the distance between two points in the graph . |
6,339 | protected double computeCostFor ( ST segment ) { if ( this . costComputer != null ) { return this . costComputer . computeCostFor ( segment ) ; } return segment . getLength ( ) ; } | Compute and replies the cost to traverse the given graph segment . |
6,340 | @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) protected GP newPath ( PT startPoint , ST segment ) { if ( this . pathFactory != null ) { return this . pathFactory . newPath ( startPoint , segment ) ; } try { return ( GP ) new GraphPath ( segment , startPoint ) ; } catch ( Throwable e ) { throw new IllegalStateExce... | Create an empty path . |
6,341 | protected boolean addToPath ( GP path , ST segment ) { if ( this . pathFactory != null ) { return this . pathFactory . addToPath ( path , segment ) ; } assert path != null ; assert segment != null ; try { return path . add ( segment ) ; } catch ( Throwable e ) { throw new IllegalStateException ( e ) ; } } | Add the given segment into the given path . |
6,342 | protected ST replaceSegment ( int index , ST segment ) { ST rep = null ; if ( this . segmentReplacer != null ) { rep = this . segmentReplacer . replaceSegment ( index , segment ) ; } if ( rep == null ) { rep = segment ; } return rep ; } | Invoked to replace a segment before adding it to the shortest path . |
6,343 | public static Vector2d convert ( Tuple2D < ? > tuple ) { if ( tuple instanceof Vector2d ) { return ( Vector2d ) tuple ; } return new Vector2d ( tuple . getX ( ) , tuple . getY ( ) ) ; } | Convert the given tuple to a real Vector2d . |
6,344 | public boolean addBusLine ( BusLine busLine ) { if ( busLine == null ) { return false ; } if ( this . busLines . indexOf ( busLine ) != - 1 ) { return false ; } if ( ! this . busLines . add ( busLine ) ) { return false ; } final boolean isValidLine = busLine . isValidPrimitive ( ) ; busLine . setEventFirable ( isEventF... | Add a bus line inside the bus network . |
6,345 | public void removeAllBusLines ( ) { for ( final BusLine busline : this . busLines ) { busline . setContainer ( null ) ; busline . setEventFirable ( true ) ; } this . busLines . clear ( ) ; fireShapeChanged ( new BusChangeEvent ( this , BusChangeEventType . ALL_LINES_REMOVED , null , - 1 , "shape" , null , null ) ) ; ch... | Remove all the bus lines from the current network . |
6,346 | public boolean removeBusLine ( BusLine busLine ) { final int index = this . busLines . indexOf ( busLine ) ; if ( index >= 0 ) { return removeBusLine ( index ) ; } return false ; } | Remove a bus line from this network . All the itineraries and the associated stops will be removed also . If this bus line removal implies empty hubs these hubs will be also removed . |
6,347 | public boolean removeBusLine ( String name ) { final Iterator < BusLine > iterator = this . busLines . iterator ( ) ; BusLine busLine ; int i = 0 ; while ( iterator . hasNext ( ) ) { busLine = iterator . next ( ) ; if ( name . equals ( busLine . getName ( ) ) ) { iterator . remove ( ) ; busLine . setContainer ( null ) ... | Remove the bus line with the given name . All the itineraries and the associated stops will be removed also . If this bus line removal implies empty hubs these hubs will be also removed . |
6,348 | public boolean removeBusLine ( int index ) { try { final BusLine busLine = this . busLines . remove ( index ) ; busLine . setContainer ( null ) ; busLine . setEventFirable ( true ) ; fireShapeChanged ( new BusChangeEvent ( this , BusChangeEventType . LINE_REMOVED , busLine , index , "shape" , null , null ) ) ; checkPri... | Remove the bus line at the specified index . All the itineraries and the associated stops will be removed also . If this bus line removal implies empty hubs these hubs will be also removed . |
6,349 | public BusLine getBusLine ( UUID uuid ) { if ( uuid == null ) { return null ; } for ( final BusLine busLine : this . busLines ) { if ( uuid . equals ( busLine . getUUID ( ) ) ) { return busLine ; } } return null ; } | Replies the bus line with the specified uuid . |
6,350 | public BusLine getBusLine ( String name , Comparator < String > nameComparator ) { if ( name == null ) { return null ; } final Comparator < String > cmp = nameComparator == null ? BusNetworkUtilities . NAME_COMPARATOR : nameComparator ; for ( final BusLine busLine : this . busLines ) { if ( cmp . compare ( name , busLi... | Replies the bus line with the specified name . |
6,351 | public boolean addBusStop ( BusStop busStop ) { if ( busStop == null ) { return false ; } if ( this . validBusStops . contains ( busStop ) ) { return false ; } if ( ListUtil . contains ( this . invalidBusStops , INVALID_STOP_COMPARATOR , busStop ) ) { return false ; } final boolean isValidPrimitive = busStop . isValidP... | Add a bus stop inside the bus network . |
6,352 | public void removeAllBusStops ( ) { for ( final BusStop busStop : this . validBusStops ) { busStop . setContainer ( null ) ; busStop . setEventFirable ( true ) ; } for ( final BusStop busStop : this . invalidBusStops ) { busStop . setContainer ( null ) ; busStop . setEventFirable ( true ) ; } this . validBusStops . cle... | Remove all the bus stops from the current network . |
6,353 | public boolean removeBusStop ( BusStop busStop ) { if ( this . validBusStops . remove ( busStop ) ) { busStop . setContainer ( null ) ; busStop . setEventFirable ( true ) ; fireShapeChanged ( new BusChangeEvent ( this , BusChangeEventType . STOP_REMOVED , busStop , - 1 , "shape" , null , null ) ) ; checkPrimitiveValidi... | Remove a bus stop from this network . If this bus stop removal implies empty hubs these hubs will be also removed . |
6,354 | public boolean removeBusStop ( String name ) { Iterator < BusStop > iterator ; BusStop busStop ; iterator = this . validBusStops . iterator ( ) ; while ( iterator . hasNext ( ) ) { busStop = iterator . next ( ) ; if ( name . equals ( busStop . getName ( ) ) ) { iterator . remove ( ) ; busStop . setContainer ( null ) ; ... | Remove the bus stops with the given name . If this bus stop removal implies empty hubs these hubs will be also removed . |
6,355 | public BusStop getBusStop ( UUID id ) { if ( id == null ) { return null ; } for ( final BusStop busStop : this . validBusStops ) { final UUID busid = busStop . getUUID ( ) ; if ( id . equals ( busid ) ) { return busStop ; } } for ( final BusStop busStop : this . invalidBusStops ) { final UUID busid = busStop . getUUID ... | Replies the bus stop with the specified id . |
6,356 | public BusStop getBusStop ( String name , Comparator < String > nameComparator ) { if ( name == null ) { return null ; } final Comparator < String > cmp = nameComparator == null ? BusNetworkUtilities . NAME_COMPARATOR : nameComparator ; for ( final BusStop busStop : this . validBusStops ) { if ( cmp . compare ( name , ... | Replies the bus stop with the specified name . |
6,357 | public Iterator < BusStop > getBusStopsIn ( Rectangle2afp < ? , ? , ? , ? , ? , ? > clipBounds ) { return Iterators . unmodifiableIterator ( this . validBusStops . iterator ( clipBounds ) ) ; } | Replies the set of bus stops that have an intersection with the specified rectangle . |
6,358 | public BusStop getNearestBusStop ( double x , double y ) { double distance = Double . POSITIVE_INFINITY ; BusStop bestStop = null ; double dist ; for ( final BusStop stop : this . validBusStops ) { dist = stop . distance ( x , y ) ; if ( dist < distance ) { distance = dist ; bestStop = stop ; } } return bestStop ; } | Replies the nearest bus stops to the given point . |
6,359 | private boolean addBusHub ( BusHub hub ) { if ( hub == null ) { return false ; } if ( this . validBusHubs . contains ( hub ) ) { return false ; } if ( ListUtil . contains ( this . invalidBusHubs , INVALID_HUB_COMPARATOR , hub ) ) { return false ; } final boolean isValidPrimitive = hub . isValidPrimitive ( ) ; if ( isVa... | Add the given bus hub in the network . |
6,360 | public void removeAllBusHubs ( ) { for ( final BusHub busHub : this . validBusHubs ) { busHub . setContainer ( null ) ; busHub . setEventFirable ( true ) ; } for ( final BusHub busHub : this . invalidBusHubs ) { busHub . setContainer ( null ) ; busHub . setEventFirable ( true ) ; } this . validBusHubs . clear ( ) ; thi... | Remove all the bus hubs from the current network . |
6,361 | public boolean removeBusHub ( BusHub busHub ) { if ( this . validBusHubs . remove ( busHub ) ) { busHub . setContainer ( null ) ; busHub . setEventFirable ( true ) ; firePrimitiveChanged ( new BusChangeEvent ( this , BusChangeEventType . HUB_REMOVED , busHub , - 1 , null , null , null ) ) ; checkPrimitiveValidity ( ) ;... | Remove a bus hubs from this network . |
6,362 | public boolean removeBusHub ( String name ) { Iterator < BusHub > iterator ; BusHub busHub ; iterator = this . validBusHubs . iterator ( ) ; while ( iterator . hasNext ( ) ) { busHub = iterator . next ( ) ; if ( name . equals ( busHub . getName ( ) ) ) { iterator . remove ( ) ; busHub . setContainer ( null ) ; busHub .... | Remove the bus hub with the given name . |
6,363 | public BusHub getBusHub ( UUID uuid ) { if ( uuid == null ) { return null ; } for ( final BusHub busHub : this . validBusHubs ) { if ( uuid . equals ( busHub . getUUID ( ) ) ) { return busHub ; } } for ( final BusHub busHub : this . invalidBusHubs ) { if ( uuid . equals ( busHub . getUUID ( ) ) ) { return busHub ; } } ... | Replies the bus hub with the specified uuid . |
6,364 | public BusHub getBusHub ( String name , Comparator < String > nameComparator ) { if ( name == null ) { return null ; } final Comparator < String > cmp = nameComparator == null ? BusNetworkUtilities . NAME_COMPARATOR : nameComparator ; for ( final BusHub busHub : this . validBusHubs ) { if ( cmp . compare ( name , busHu... | Replies the bus hub with the specified name . |
6,365 | public Iterator < BusHub > getBusHubsIn ( Rectangle2afp < ? , ? , ? , ? , ? , ? > clipBounds ) { return Iterators . unmodifiableIterator ( this . validBusHubs . iterator ( clipBounds ) ) ; } | Replies the set of bus hubs that have an intersection with the specified rectangle . |
6,366 | public void setValue ( Object instance , Object value ) { try { setMethod . invoke ( instance , value ) ; } catch ( Exception e ) { throw new PropertyNotFoundException ( klass , getType ( ) , fieldName ) ; } } | Set new value |
6,367 | public static Vector3dfx convert ( Tuple3D < ? > tuple ) { if ( tuple instanceof Vector3dfx ) { return ( Vector3dfx ) tuple ; } return new Vector3dfx ( tuple . getX ( ) , tuple . getY ( ) , tuple . getZ ( ) ) ; } | Convert the given tuple to a real Vector3dfx . |
6,368 | public void shuffleSelectedRightRowToLeftTableModel ( final int selectedRow ) { if ( - 1 < selectedRow ) { final T row = rightTableModel . removeAt ( selectedRow ) ; leftTableModel . add ( row ) ; } } | Shuffle selected right row to left table model . |
6,369 | public OffsetGroup startReferenceOffsetsForContentOffset ( CharOffset contentOffset ) { return characterRegions ( ) . get ( regionIndexContainingContentOffset ( contentOffset ) ) . startOffsetGroupForPosition ( contentOffset ) ; } | Get the earliest reference string offsets corresponding to the given content string offset . |
6,370 | public OffsetGroup endReferenceOffsetsForContentOffset ( CharOffset contentOffset ) { return characterRegions ( ) . get ( regionIndexContainingContentOffset ( contentOffset ) ) . endOffsetGroupForPosition ( contentOffset ) ; } | Get the latest reference string offsets corresponding to the given content string offset . |
6,371 | public final Optional < UnicodeFriendlyString > referenceSubstringByContentOffsets ( final OffsetRange < CharOffset > contentOffsets ) { if ( referenceString ( ) . isPresent ( ) ) { return Optional . of ( referenceString ( ) . get ( ) . substringByCodePoints ( OffsetGroupRange . from ( startReferenceOffsetsForContentOf... | Gets the substring of the reference string corresponding to a range of content string offsets . This will include intervening characters which may not themselves correspond to any content string character . |
6,372 | @ SuppressWarnings ( "checkstyle:localvariablename" ) public int getLatitudeMinute ( ) { double p = Math . abs ( this . phi ) ; p = p - ( int ) p ; return ( int ) ( p * 60. ) ; } | Replies the minute of the sexagesimal representation of the latitude phi . |
6,373 | @ SuppressWarnings ( "checkstyle:localvariablename" ) public double getLatitudeSecond ( ) { double p = Math . abs ( this . phi ) ; p = ( p - ( int ) p ) * 60. ; p = p - ( int ) p ; return p * 60. ; } | Replies the second of the sexagesimal representation of the latitude phi . |
6,374 | @ SuppressWarnings ( "checkstyle:localvariablename" ) public int getLongitudeMinute ( ) { double l = Math . abs ( this . lambda ) ; l = l - ( int ) l ; return ( int ) ( l * 60. ) ; } | Replies the minute of the sexagesimal representation of the longitude phi . |
6,375 | @ SuppressWarnings ( "checkstyle:localvariablename" ) public double getLongitudeSecond ( ) { double p = Math . abs ( this . lambda ) ; p = ( p - ( int ) p ) * 60. ; p = p - ( int ) p ; return p * 60. ; } | Replies the second of the sexagesimal representation of the longitude phi . |
6,376 | public static void setPreferredStringRepresentation ( GeodesicPositionStringRepresentation representation , boolean useSymbolicDirection ) { final Preferences prefs = Preferences . userNodeForPackage ( GeodesicPosition . class ) ; if ( prefs != null ) { if ( representation == null ) { prefs . remove ( "STRING_REPRESENT... | Set the preferred format of the string representation of a geodesic position . |
6,377 | public static GeodesicPositionStringRepresentation getPreferredStringRepresentation ( boolean allowNullValue ) { final Preferences prefs = Preferences . userNodeForPackage ( GeodesicPosition . class ) ; if ( prefs != null ) { final String v = prefs . get ( "STRING_REPRESENTATION" , null ) ; if ( v != null && ! "" . equ... | Replies the preferred format of the string representation of a geodesic position . |
6,378 | public static boolean getDirectionSymbolInPreferredStringRepresentation ( ) { final Preferences prefs = Preferences . userNodeForPackage ( GeodesicPosition . class ) ; if ( prefs != null ) { return prefs . getBoolean ( "SYMBOL_IN_STRING_REPRESENTATION" , DEFAULT_SYMBOL_IN_STRING_REPRESENTATION ) ; } return DEFAULT_SYMB... | Replies if the direction symbol should be output in the preferred string representation of a geodesic position . |
6,379 | public synchronized void addForestListener ( ForestListener listener ) { if ( this . listeners == null ) { this . listeners = new ArrayList < > ( ) ; } this . listeners . add ( listener ) ; } | Add forest listener . |
6,380 | public synchronized void removeForestListener ( ForestListener listener ) { if ( this . listeners != null ) { this . listeners . remove ( listener ) ; if ( this . listeners . isEmpty ( ) ) { this . listeners = null ; } } } | Remove forest listener . |
6,381 | @ SuppressWarnings ( "static-method" ) public Log4jIntegrationConfig getLog4jIntegrationConfig ( ConfigurationFactory configFactory , Injector injector ) { final Log4jIntegrationConfig config = Log4jIntegrationConfig . getConfiguration ( configFactory ) ; injector . injectMembers ( config ) ; return config ; } | Replies the instance of the log4j integration configuration .. |
6,382 | @ SuppressWarnings ( "static-method" ) public Logger provideRootLogger ( ConfigurationFactory configFactory , Provider < Log4jIntegrationConfig > config ) { final Logger root = Logger . getRootLogger ( ) ; SLF4JBridgeHandler . removeHandlersForRootLogger ( ) ; SLF4JBridgeHandler . install ( ) ; final Log4jIntegrationCo... | Provide the root logger . |
6,383 | protected void onInitializeComponents ( ) { lpNoProxy = new JLayeredPane ( ) ; lpNoProxy . setBorder ( new EtchedBorder ( EtchedBorder . RAISED , null , null ) ) ; lpHostOrIpaddress = new JLayeredPane ( ) ; lpHostOrIpaddress . setBorder ( new EtchedBorder ( EtchedBorder . RAISED , null , null ) ) ; rdbtnManualProxyConf... | Initialize components . |
6,384 | public static Iterator < BusItineraryHalt > getBusHalts ( BusLine busLine ) { assert busLine != null ; return new LineHaltIterator ( busLine ) ; } | Replies all the bus itinerary halts in the given bus line . |
6,385 | public static Iterator < BusItineraryHalt > getBusHalts ( BusNetwork busNetwork ) { assert busNetwork != null ; return new NetworkHaltIterator ( busNetwork ) ; } | Replies all the bus itinerary halts in the given bus network . |
6,386 | protected Method getActionMethod ( Class actionClass , String methodName ) throws NoSuchMethodException { Method method ; try { method = actionClass . getMethod ( methodName , new Class [ 0 ] ) ; } catch ( NoSuchMethodException e ) { try { String altMethodName = "do" + methodName . substring ( 0 , 1 ) . toUpperCase ( )... | This is copied from DefaultActionInvocation |
6,387 | private String cutYear ( String str ) { if ( str . length ( ) > 3 ) { return str . substring ( str . length ( ) - 3 , str . length ( ) ) ; } else { return str ; } } | Remove the 2 - bit year number from input date string |
6,388 | public Point3d getPivot ( ) { Point3d pivot = this . cachedPivot == null ? null : this . cachedPivot . get ( ) ; if ( pivot == null ) { pivot = getProjection ( 0. , 0. , 0. ) ; this . cachedPivot = new WeakReference < > ( pivot ) ; } return pivot ; } | Replies the pivot point around which the rotation must be done . |
6,389 | private static String decodeHTMLEntities ( String string ) { if ( string == null ) { return null ; } try { return URLDecoder . decode ( string , Charset . defaultCharset ( ) . displayName ( ) ) ; } catch ( UnsupportedEncodingException exception ) { return string ; } } | Replace the HTML entities by the current charset characters . |
6,390 | private static String encodeHTMLEntities ( String string ) { if ( string == null ) { return null ; } try { return URLEncoder . encode ( string , Charset . defaultCharset ( ) . displayName ( ) ) ; } catch ( UnsupportedEncodingException exception ) { return string ; } } | Replace the special characters by HTML entities . |
6,391 | @ Inline ( value = "URISchemeType.JAR.isURL($1)" , imported = { URISchemeType . class } ) public static boolean isJarURL ( URL url ) { return URISchemeType . JAR . isURL ( url ) ; } | Replies if the given URL has a jar scheme . |
6,392 | public static URL getJarURL ( URL url ) { if ( ! isJarURL ( url ) ) { return null ; } String path = url . getPath ( ) ; final int idx = path . lastIndexOf ( JAR_URL_FILE_ROOT ) ; if ( idx >= 0 ) { path = path . substring ( 0 , idx ) ; } try { return new URL ( path ) ; } catch ( MalformedURLException exception ) { retur... | Replies the jar part of the jar - scheme URL . |
6,393 | public static File getJarFile ( URL url ) { if ( isJarURL ( url ) ) { final String path = url . getPath ( ) ; final int idx = path . lastIndexOf ( JAR_URL_FILE_ROOT ) ; if ( idx >= 0 ) { return new File ( decodeHTMLEntities ( path . substring ( idx + 1 ) ) ) ; } } return null ; } | Replies the file part of the jar - scheme URL . |
6,394 | public static boolean isCaseSensitiveFilenameSystem ( ) { switch ( OperatingSystem . getCurrentOS ( ) ) { case AIX : case ANDROID : case BSD : case FREEBSD : case NETBSD : case OPENBSD : case LINUX : case SOLARIS : case HPUX : return true ; default : return false ; } } | Replies if the current operating system uses case - sensitive filename . |
6,395 | public static String extension ( File filename ) { if ( filename == null ) { return null ; } final String largeBasename = largeBasename ( filename ) ; final int idx = largeBasename . lastIndexOf ( getFileExtensionCharacter ( ) ) ; if ( idx <= 0 ) { return "" ; } return largeBasename . substring ( idx ) ; } | Reply the extension of the specified file . |
6,396 | public static boolean hasExtension ( File filename , String extension ) { if ( filename == null ) { return false ; } assert extension != null ; String extent = extension ; if ( ! "" . equals ( extent ) && ! extent . startsWith ( EXTENSION_SEPARATOR ) ) { extent = EXTENSION_SEPARATOR + extent ; } final String ext = exte... | Replies if the specified file has the specified extension . |
6,397 | public static File getSystemConfigurationDirectoryFor ( String software ) { if ( software == null || "" . equals ( software ) ) { throw new IllegalArgumentException ( ) ; } final OperatingSystem os = OperatingSystem . getCurrentOS ( ) ; if ( os == OperatingSystem . ANDROID ) { return join ( File . listRoots ( ) [ 0 ] ,... | Replies the system configuration directory for the specified software . |
6,398 | public static String getSystemSharedLibraryDirectoryNameFor ( String software ) { final File f = getSystemSharedLibraryDirectoryFor ( software ) ; if ( f == null ) { return null ; } return f . getAbsolutePath ( ) ; } | Replies the system shared library directory for the specified software . |
6,399 | public static File convertStringToFile ( String filename ) { if ( filename == null || "" . equals ( filename ) ) { return null ; } if ( isWindowsNativeFilename ( filename ) ) { return normalizeWindowsNativeFilename ( filename ) ; } return new File ( extractLocalPath ( filename ) . replaceAll ( Pattern . quote ( UNIX_SE... | Convert a string which represents a local file into a File . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.