repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
gallandarakhneorg/afc
advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java
AttributeValueImpl.parse
@Pure @SuppressWarnings("checkstyle:cyclomaticcomplexity") public static AttributeValueImpl parse(String text) { final AttributeValueImpl value = new AttributeValueImpl(text); if (text != null && !text.isEmpty()) { Object binValue; for (final AttributeType type : AttributeType.values()) { try { bin...
java
@Pure @SuppressWarnings("checkstyle:cyclomaticcomplexity") public static AttributeValueImpl parse(String text) { final AttributeValueImpl value = new AttributeValueImpl(text); if (text != null && !text.isEmpty()) { Object binValue; for (final AttributeType type : AttributeType.values()) { try { bin...
[ "@", "Pure", "@", "SuppressWarnings", "(", "\"checkstyle:cyclomaticcomplexity\"", ")", "public", "static", "AttributeValueImpl", "parse", "(", "String", "text", ")", "{", "final", "AttributeValueImpl", "value", "=", "new", "AttributeValueImpl", "(", "text", ")", ";"...
Replies the best attribute value that is representing the given text. @param text the text. @return the attribute value, never <code>null</code>.
[ "Replies", "the", "best", "attribute", "value", "that", "is", "representing", "the", "given", "text", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java#L380-L453
train
gallandarakhneorg/afc
advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java
AttributeValueImpl.compareValues
@Pure public static int compareValues(AttributeValue arg0, AttributeValue arg1) { if (arg0 == arg1) { return 0; } if (arg0 == null) { return Integer.MAX_VALUE; } if (arg1 == null) { return Integer.MIN_VALUE; } Object v0; Object v1; try { v0 = arg0.getValue(); } catch (Exception except...
java
@Pure public static int compareValues(AttributeValue arg0, AttributeValue arg1) { if (arg0 == arg1) { return 0; } if (arg0 == null) { return Integer.MAX_VALUE; } if (arg1 == null) { return Integer.MIN_VALUE; } Object v0; Object v1; try { v0 = arg0.getValue(); } catch (Exception except...
[ "@", "Pure", "public", "static", "int", "compareValues", "(", "AttributeValue", "arg0", ",", "AttributeValue", "arg1", ")", "{", "if", "(", "arg0", "==", "arg1", ")", "{", "return", "0", ";", "}", "if", "(", "arg0", "==", "null", ")", "{", "return", ...
Compare the two specified values. @param arg0 first value. @param arg1 second value. @return replies a negative value if {@code arg0} is lesser than {@code arg1}, a positive value if {@code arg0} is greater than {@code arg1}, or <code>0</code> if they are equal. @see AttributeValueComparator
[ "Compare", "the", "two", "specified", "values", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java#L464-L492
train
gallandarakhneorg/afc
advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java
AttributeValueImpl.compareRawValues
@Pure @SuppressWarnings({"unchecked", "rawtypes", "checkstyle:returncount", "checkstyle:npathcomplexity"}) private static int compareRawValues(Object arg0, Object arg1) { if (arg0 == arg1) { return 0; } if (arg0 == null) { return Integer.MAX_VALUE; } if (arg1 == null) { return Integer.MIN_VALUE; ...
java
@Pure @SuppressWarnings({"unchecked", "rawtypes", "checkstyle:returncount", "checkstyle:npathcomplexity"}) private static int compareRawValues(Object arg0, Object arg1) { if (arg0 == arg1) { return 0; } if (arg0 == null) { return Integer.MAX_VALUE; } if (arg1 == null) { return Integer.MIN_VALUE; ...
[ "@", "Pure", "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", ",", "\"checkstyle:returncount\"", ",", "\"checkstyle:npathcomplexity\"", "}", ")", "private", "static", "int", "compareRawValues", "(", "Object", "arg0", ",", "Object", "arg1", ")...
Compare the internal objects of two specified values. @param arg0 first value. @param arg1 second value. @return replies a negative value if {@code arg0} is lesser than {@code arg1}, a positive value if {@code arg0} is greater than {@code arg1}, or <code>0</code> if they are equal.
[ "Compare", "the", "internal", "objects", "of", "two", "specified", "values", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java#L502-L553
train
gallandarakhneorg/afc
advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java
AttributeValueImpl.setInternalValue
protected void setInternalValue(Object value, AttributeType type) { this.value = value; this.assigned = this.value != null; this.type = type; }
java
protected void setInternalValue(Object value, AttributeType type) { this.value = value; this.assigned = this.value != null; this.type = type; }
[ "protected", "void", "setInternalValue", "(", "Object", "value", ",", "AttributeType", "type", ")", "{", "this", ".", "value", "=", "value", ";", "this", ".", "assigned", "=", "this", ".", "value", "!=", "null", ";", "this", ".", "type", "=", "type", "...
Set this value with the content of the specified one. <p>The type of the attribute will be NOT detected from the type of the object. It means that it will be equal to the given type, even if the given value is incompatible. The given value must be compatible with internal representation of the attribute implementation...
[ "Set", "this", "value", "with", "the", "content", "of", "the", "specified", "one", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java#L849-L853
train
gallandarakhneorg/afc
advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java
AttributeValueImpl.extractDate
private static Date extractDate(String text, Locale locale) { DateFormat fmt; for (int style = 0; style <= 3; ++style) { // Date and time parsing for (int style2 = 0; style2 <= 3; ++style2) { fmt = DateFormat.getDateTimeInstance(style, style2, locale); try { return fmt.parse(text); } catch (P...
java
private static Date extractDate(String text, Locale locale) { DateFormat fmt; for (int style = 0; style <= 3; ++style) { // Date and time parsing for (int style2 = 0; style2 <= 3; ++style2) { fmt = DateFormat.getDateTimeInstance(style, style2, locale); try { return fmt.parse(text); } catch (P...
[ "private", "static", "Date", "extractDate", "(", "String", "text", ",", "Locale", "locale", ")", "{", "DateFormat", "fmt", ";", "for", "(", "int", "style", "=", "0", ";", "style", "<=", "3", ";", "++", "style", ")", "{", "// Date and time parsing", "for"...
Parse a date according to the specified locale.
[ "Parse", "a", "date", "according", "to", "the", "specified", "locale", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java#L1111-L1139
train
gallandarakhneorg/afc
advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileFilter.java
DBaseFileFilter.isDbaseFile
@Pure public static boolean isDbaseFile(File file) { return FileType.isContentType( file, MimeName.MIME_DBASE_FILE.getMimeConstant()); }
java
@Pure public static boolean isDbaseFile(File file) { return FileType.isContentType( file, MimeName.MIME_DBASE_FILE.getMimeConstant()); }
[ "@", "Pure", "public", "static", "boolean", "isDbaseFile", "(", "File", "file", ")", "{", "return", "FileType", ".", "isContentType", "(", "file", ",", "MimeName", ".", "MIME_DBASE_FILE", ".", "getMimeConstant", "(", ")", ")", ";", "}" ]
Replies if the specified file content is a dBase file. @param file is the file to test @return <code>true</code> if the given file contains dBase data, othersiwe <code>false</code>.
[ "Replies", "if", "the", "specified", "file", "content", "is", "a", "dBase", "file", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileFilter.java#L83-L88
train
gallandarakhneorg/afc
advanced/gis/giscorefx/src/main/java/org/arakhne/afc/gis/ui/drawers/AbstractMapCircleDrawer.java
AbstractMapCircleDrawer.stroke
protected void stroke(ZoomableGraphicsContext gc, T element) { final double radius = element.getRadius(); final double diameter = radius * radius; final double minx = element.getX() - radius; final double miny = element.getY() - radius; gc.strokeOval(minx, miny, diameter, diameter); }
java
protected void stroke(ZoomableGraphicsContext gc, T element) { final double radius = element.getRadius(); final double diameter = radius * radius; final double minx = element.getX() - radius; final double miny = element.getY() - radius; gc.strokeOval(minx, miny, diameter, diameter); }
[ "protected", "void", "stroke", "(", "ZoomableGraphicsContext", "gc", ",", "T", "element", ")", "{", "final", "double", "radius", "=", "element", ".", "getRadius", "(", ")", ";", "final", "double", "diameter", "=", "radius", "*", "radius", ";", "final", "do...
Stroke the circle. @param gc the graphics context that must be used for drawing. @param element the map element.
[ "Stroke", "the", "circle", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscorefx/src/main/java/org/arakhne/afc/gis/ui/drawers/AbstractMapCircleDrawer.java#L42-L48
train
gallandarakhneorg/afc
advanced/gis/giscorefx/src/main/java/org/arakhne/afc/gis/ui/drawers/AbstractMapCircleDrawer.java
AbstractMapCircleDrawer.fill
protected void fill(ZoomableGraphicsContext gc, T element) { final double radius = element.getRadius(); final double diameter = radius * radius; final double minx = element.getX() - radius; final double miny = element.getY() - radius; gc.fillOval(minx, miny, diameter, diameter); }
java
protected void fill(ZoomableGraphicsContext gc, T element) { final double radius = element.getRadius(); final double diameter = radius * radius; final double minx = element.getX() - radius; final double miny = element.getY() - radius; gc.fillOval(minx, miny, diameter, diameter); }
[ "protected", "void", "fill", "(", "ZoomableGraphicsContext", "gc", ",", "T", "element", ")", "{", "final", "double", "radius", "=", "element", ".", "getRadius", "(", ")", ";", "final", "double", "diameter", "=", "radius", "*", "radius", ";", "final", "doub...
Fill the circle. @param gc the graphics context that must be used for drawing. @param element the map element.
[ "Fill", "the", "circle", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscorefx/src/main/java/org/arakhne/afc/gis/ui/drawers/AbstractMapCircleDrawer.java#L55-L61
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.getFirstFreeBushaltName
@Pure public static String getFirstFreeBushaltName(BusItinerary busItinerary) { if (busItinerary == null) { return null; } int nb = busItinerary.size(); String name; do { ++nb; name = Locale.getString("NAME_TEMPLATE", Integer.toString(nb)); //$NON-NLS-1$ } while (busItinerary.getBusHalt(name) !=...
java
@Pure public static String getFirstFreeBushaltName(BusItinerary busItinerary) { if (busItinerary == null) { return null; } int nb = busItinerary.size(); String name; do { ++nb; name = Locale.getString("NAME_TEMPLATE", Integer.toString(nb)); //$NON-NLS-1$ } while (busItinerary.getBusHalt(name) !=...
[ "@", "Pure", "public", "static", "String", "getFirstFreeBushaltName", "(", "BusItinerary", "busItinerary", ")", "{", "if", "(", "busItinerary", "==", "null", ")", "{", "return", "null", ";", "}", "int", "nb", "=", "busItinerary", ".", "size", "(", ")", ";"...
Replies a bus halt name that was not exist in the specified bus itinerary. @param busItinerary is the bus itinerary for which a free bus halt name may be computed. @return a name suitable for bus halt.
[ "Replies", "a", "bus", "halt", "name", "that", "was", "not", "exist", "in", "the", "specified", "bus", "itinerary", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L184-L197
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.setBusStop
public boolean setBusStop(BusStop busStop) { final BusStop old = getBusStop(); if ((busStop == null && old != null) || (busStop != null && !busStop.equals(old))) { if (old != null) { old.removeBusHalt(this); } this.busStop = busStop == null ? null : new WeakReference<>(busStop); if (busStop != nu...
java
public boolean setBusStop(BusStop busStop) { final BusStop old = getBusStop(); if ((busStop == null && old != null) || (busStop != null && !busStop.equals(old))) { if (old != null) { old.removeBusHalt(this); } this.busStop = busStop == null ? null : new WeakReference<>(busStop); if (busStop != nu...
[ "public", "boolean", "setBusStop", "(", "BusStop", "busStop", ")", "{", "final", "BusStop", "old", "=", "getBusStop", "(", ")", ";", "if", "(", "(", "busStop", "==", "null", "&&", "old", "!=", "null", ")", "||", "(", "busStop", "!=", "null", "&&", "!...
Set the bus stop associated to this halt. @param busStop is the bus stop associated to this halt, or <code>null</code> if this halt is not associated to a bus stop. @return <code>true</code> if the bus stop was correctly set, otherwise <code>false</code>.
[ "Set", "the", "bus", "stop", "associated", "to", "this", "halt", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L315-L332
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.getRoadSegment
@Pure public RoadSegment getRoadSegment() { final BusItinerary itinerary = getContainer(); if (itinerary != null && this.roadSegmentIndex >= 0 && this.roadSegmentIndex < itinerary.getRoadSegmentCount()) { return itinerary.getRoadSegmentAt(this.roadSegmentIndex); } return null; }
java
@Pure public RoadSegment getRoadSegment() { final BusItinerary itinerary = getContainer(); if (itinerary != null && this.roadSegmentIndex >= 0 && this.roadSegmentIndex < itinerary.getRoadSegmentCount()) { return itinerary.getRoadSegmentAt(this.roadSegmentIndex); } return null; }
[ "@", "Pure", "public", "RoadSegment", "getRoadSegment", "(", ")", "{", "final", "BusItinerary", "itinerary", "=", "getContainer", "(", ")", ";", "if", "(", "itinerary", "!=", "null", "&&", "this", ".", "roadSegmentIndex", ">=", "0", "&&", "this", ".", "roa...
Replies the road segment on which this bus halt was. @return the road segment
[ "Replies", "the", "road", "segment", "on", "which", "this", "bus", "halt", "was", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L418-L425
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.getRoadSegmentDirection
@Pure public Direction1D getRoadSegmentDirection() { final BusItinerary itinerary = getContainer(); if (itinerary != null && this.roadSegmentIndex >= 0 && this.roadSegmentIndex < itinerary.getRoadSegmentCount()) { return itinerary.getRoadSegmentDirection(this.roadSegmentIndex); } return null; }
java
@Pure public Direction1D getRoadSegmentDirection() { final BusItinerary itinerary = getContainer(); if (itinerary != null && this.roadSegmentIndex >= 0 && this.roadSegmentIndex < itinerary.getRoadSegmentCount()) { return itinerary.getRoadSegmentDirection(this.roadSegmentIndex); } return null; }
[ "@", "Pure", "public", "Direction1D", "getRoadSegmentDirection", "(", ")", "{", "final", "BusItinerary", "itinerary", "=", "getContainer", "(", ")", ";", "if", "(", "itinerary", "!=", "null", "&&", "this", ".", "roadSegmentIndex", ">=", "0", "&&", "this", "....
Replies on which direction the bus halt is located on the road segment. @return {@link Direction1D#SEGMENT_DIRECTION} or {@link Direction1D#REVERTED_DIRECTION}.
[ "Replies", "on", "which", "direction", "the", "bus", "halt", "is", "located", "on", "the", "road", "segment", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L480-L487
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.setType
public void setType(BusItineraryHaltType type) { if (type != null && type != this.type) { this.type = type; firePrimitiveChanged(); } }
java
public void setType(BusItineraryHaltType type) { if (type != null && type != this.type) { this.type = type; firePrimitiveChanged(); } }
[ "public", "void", "setType", "(", "BusItineraryHaltType", "type", ")", "{", "if", "(", "type", "!=", "null", "&&", "type", "!=", "this", ".", "type", ")", "{", "this", ".", "type", "=", "type", ";", "firePrimitiveChanged", "(", ")", ";", "}", "}" ]
Set the type of the bus halt. @param type the type of the bus.
[ "Set", "the", "type", "of", "the", "bus", "halt", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L504-L509
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.insideBusHub
@Pure public boolean insideBusHub() { final BusStop busStop = getBusStop(); if (busStop != null) { return busStop.insideBusHub(); } return false; }
java
@Pure public boolean insideBusHub() { final BusStop busStop = getBusStop(); if (busStop != null) { return busStop.insideBusHub(); } return false; }
[ "@", "Pure", "public", "boolean", "insideBusHub", "(", ")", "{", "final", "BusStop", "busStop", "=", "getBusStop", "(", ")", ";", "if", "(", "busStop", "!=", "null", ")", "{", "return", "busStop", ".", "insideBusHub", "(", ")", ";", "}", "return", "fal...
Replies if this bus halt is inside a hub throught an associated bus stop. @return <code>true</code> if this bus stop is inside a hub, otherwise <code>false</code>
[ "Replies", "if", "this", "bus", "halt", "is", "inside", "a", "hub", "throught", "an", "associated", "bus", "stop", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L585-L592
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.busHubs
@Pure public Iterable<BusHub> busHubs() { final BusStop busStop = getBusStop(); if (busStop != null) { return busStop.busHubs(); } return Collections.emptyList(); }
java
@Pure public Iterable<BusHub> busHubs() { final BusStop busStop = getBusStop(); if (busStop != null) { return busStop.busHubs(); } return Collections.emptyList(); }
[ "@", "Pure", "public", "Iterable", "<", "BusHub", ">", "busHubs", "(", ")", "{", "final", "BusStop", "busStop", "=", "getBusStop", "(", ")", ";", "if", "(", "busStop", "!=", "null", ")", "{", "return", "busStop", ".", "busHubs", "(", ")", ";", "}", ...
Replies the hubs in which this bus halt is located in throught an associated bus stop. @return the hubs
[ "Replies", "the", "hubs", "in", "which", "this", "bus", "halt", "is", "located", "in", "throught", "an", "associated", "bus", "stop", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L599-L606
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.busHubIterator
@Pure public Iterator<BusHub> busHubIterator() { final BusStop busStop = getBusStop(); if (busStop != null) { return busStop.busHubIterator(); } return Collections.emptyIterator(); }
java
@Pure public Iterator<BusHub> busHubIterator() { final BusStop busStop = getBusStop(); if (busStop != null) { return busStop.busHubIterator(); } return Collections.emptyIterator(); }
[ "@", "Pure", "public", "Iterator", "<", "BusHub", ">", "busHubIterator", "(", ")", "{", "final", "BusStop", "busStop", "=", "getBusStop", "(", ")", ";", "if", "(", "busStop", "!=", "null", ")", "{", "return", "busStop", ".", "busHubIterator", "(", ")", ...
Replies the hubs in which this bus stop is located in throught an associated bus stop. @return the hubs
[ "Replies", "the", "hubs", "in", "which", "this", "bus", "stop", "is", "located", "in", "throught", "an", "associated", "bus", "stop", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L613-L620
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.getGeoPosition
@Pure public GeoLocationPoint getGeoPosition() { final Point2d p = getPosition2D(); if (p != null) { return new GeoLocationPoint(p.getX(), p.getY()); } return null; }
java
@Pure public GeoLocationPoint getGeoPosition() { final Point2d p = getPosition2D(); if (p != null) { return new GeoLocationPoint(p.getX(), p.getY()); } return null; }
[ "@", "Pure", "public", "GeoLocationPoint", "getGeoPosition", "(", ")", "{", "final", "Point2d", "p", "=", "getPosition2D", "(", ")", ";", "if", "(", "p", "!=", "null", ")", "{", "return", "new", "GeoLocationPoint", "(", "p", ".", "getX", "(", ")", ",",...
Replies the geo position. @return the geo position.
[ "Replies", "the", "geo", "position", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L655-L662
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.distanceToBusStop
@Pure public double distanceToBusStop() { final Point2d p1 = getPosition2D(); if (p1 != null) { final BusStop stop = getBusStop(); if (stop != null) { final Point2d p2 = stop.getPosition2D(); if (p2 != null) { return p1.getDistance(p2); } } } return Double.NaN; }
java
@Pure public double distanceToBusStop() { final Point2d p1 = getPosition2D(); if (p1 != null) { final BusStop stop = getBusStop(); if (stop != null) { final Point2d p2 = stop.getPosition2D(); if (p2 != null) { return p1.getDistance(p2); } } } return Double.NaN; }
[ "@", "Pure", "public", "double", "distanceToBusStop", "(", ")", "{", "final", "Point2d", "p1", "=", "getPosition2D", "(", ")", ";", "if", "(", "p1", "!=", "null", ")", "{", "final", "BusStop", "stop", "=", "getBusStop", "(", ")", ";", "if", "(", "sto...
Replies the distance between the position of this bus itinerary halt and the position of the bus stop associated to this bus itinerary halt. @return the distance between the position of this bus itinerary halt and the position of the bus stop associated to this bus itinerary halt. @since 2.0
[ "Replies", "the", "distance", "between", "the", "position", "of", "this", "bus", "itinerary", "halt", "and", "the", "position", "of", "the", "bus", "stop", "associated", "to", "this", "bus", "itinerary", "halt", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L673-L686
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.distance
@Pure public double distance(Point2D<?, ?> point) { assert point != null; final GeoLocationPoint p = getGeoPosition(); if (p != null) { return Point2D.getDistancePointPoint(p.getX(), p.getY(), point.getX(), point.getY()); } return Double.NaN; }
java
@Pure public double distance(Point2D<?, ?> point) { assert point != null; final GeoLocationPoint p = getGeoPosition(); if (p != null) { return Point2D.getDistancePointPoint(p.getX(), p.getY(), point.getX(), point.getY()); } return Double.NaN; }
[ "@", "Pure", "public", "double", "distance", "(", "Point2D", "<", "?", ",", "?", ">", "point", ")", "{", "assert", "point", "!=", "null", ";", "final", "GeoLocationPoint", "p", "=", "getGeoPosition", "(", ")", ";", "if", "(", "p", "!=", "null", ")", ...
Replies the distance between the given point and this bus halt. @param point the point @return the distance to this bus halt
[ "Replies", "the", "distance", "between", "the", "given", "point", "and", "this", "bus", "halt", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L708-L716
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.distance
@Pure public double distance(BusItineraryHalt halt) { assert halt != null; final GeoLocationPoint p = getGeoPosition(); final GeoLocationPoint p2 = halt.getGeoPosition(); if (p != null && p2 != null) { return Point2D.getDistancePointPoint(p.getX(), p.getY(), p2.getX(), p2.getY()); } return Double.NaN; ...
java
@Pure public double distance(BusItineraryHalt halt) { assert halt != null; final GeoLocationPoint p = getGeoPosition(); final GeoLocationPoint p2 = halt.getGeoPosition(); if (p != null && p2 != null) { return Point2D.getDistancePointPoint(p.getX(), p.getY(), p2.getX(), p2.getY()); } return Double.NaN; ...
[ "@", "Pure", "public", "double", "distance", "(", "BusItineraryHalt", "halt", ")", "{", "assert", "halt", "!=", "null", ";", "final", "GeoLocationPoint", "p", "=", "getGeoPosition", "(", ")", ";", "final", "GeoLocationPoint", "p2", "=", "halt", ".", "getGeoP...
Replies the distance between the given bus halt and this bus halt. @param halt the halt. @return the distance to this bus halt
[ "Replies", "the", "distance", "between", "the", "given", "bus", "halt", "and", "this", "bus", "halt", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L723-L732
train
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java
BusItineraryHalt.distance
@Pure public double distance(BusStop busStop) { assert busStop != null; final GeoLocationPoint p = getGeoPosition(); final GeoLocationPoint p2 = busStop.getGeoPosition(); if (p != null && p2 != null) { return Point2D.getDistancePointPoint(p.getX(), p.getY(), p2.getX(), p2.getY()); } return Double.NaN; ...
java
@Pure public double distance(BusStop busStop) { assert busStop != null; final GeoLocationPoint p = getGeoPosition(); final GeoLocationPoint p2 = busStop.getGeoPosition(); if (p != null && p2 != null) { return Point2D.getDistancePointPoint(p.getX(), p.getY(), p2.getX(), p2.getY()); } return Double.NaN; ...
[ "@", "Pure", "public", "double", "distance", "(", "BusStop", "busStop", ")", "{", "assert", "busStop", "!=", "null", ";", "final", "GeoLocationPoint", "p", "=", "getGeoPosition", "(", ")", ";", "final", "GeoLocationPoint", "p2", "=", "busStop", ".", "getGeoP...
Replies the distance between the given bus stop and this bus halt. @param busStop the stop. @return the distance to this bus halt
[ "Replies", "the", "distance", "between", "the", "given", "bus", "stop", "and", "this", "bus", "halt", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItineraryHalt.java#L739-L748
train
BBN-E/bue-common-open
nlp-core-open/src/main/java/com/bbn/nlp/parsing/EnglishAndChineseHeadRules.java
EnglishAndChineseHeadRules.createChinesePTBFromResources
public static <NodeT extends ConstituentNode<NodeT, ?>> HeadFinder<NodeT> createChinesePTBFromResources() throws IOException { final boolean headInitial = true; final CharSource resource = Resources .asCharSource(EnglishAndChineseHeadRules.class.getResource("ch_heads.sun.txt"), Charset...
java
public static <NodeT extends ConstituentNode<NodeT, ?>> HeadFinder<NodeT> createChinesePTBFromResources() throws IOException { final boolean headInitial = true; final CharSource resource = Resources .asCharSource(EnglishAndChineseHeadRules.class.getResource("ch_heads.sun.txt"), Charset...
[ "public", "static", "<", "NodeT", "extends", "ConstituentNode", "<", "NodeT", ",", "?", ">", ">", "HeadFinder", "<", "NodeT", ">", "createChinesePTBFromResources", "(", ")", "throws", "IOException", "{", "final", "boolean", "headInitial", "=", "true", ";", "fi...
Head finder using English NP rules and the Chinese head table as defined in Honglin Sun and Daniel Jurafsky. 2004. Shallow Semantic Parsing of Chinese. In North American Chapter of the ACL: Human Language Technologies (NAACL-HLT), pages 249–256, Boston, MA.
[ "Head", "finder", "using", "English", "NP", "rules", "and", "the", "Chinese", "head", "table", "as", "defined", "in" ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/nlp-core-open/src/main/java/com/bbn/nlp/parsing/EnglishAndChineseHeadRules.java#L80-L89
train
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/io/DotDotWriter.java
DotDotWriter.write
public void write(Tree<?, ?> tree) throws IOException { this.writer.append("digraph G"); //$NON-NLS-1$ this.writer.append(Integer.toString(this.graphIndex++)); this.writer.append(" {\n"); //$NON-NLS-1$ if (tree != null) { // Write the node attributes Iterator<? e...
java
public void write(Tree<?, ?> tree) throws IOException { this.writer.append("digraph G"); //$NON-NLS-1$ this.writer.append(Integer.toString(this.graphIndex++)); this.writer.append(" {\n"); //$NON-NLS-1$ if (tree != null) { // Write the node attributes Iterator<? e...
[ "public", "void", "write", "(", "Tree", "<", "?", ",", "?", ">", "tree", ")", "throws", "IOException", "{", "this", ".", "writer", ".", "append", "(", "\"digraph G\"", ")", ";", "//$NON-NLS-1$", "this", ".", "writer", ".", "append", "(", "Integer", "."...
Write the given tree inside the .dot output stream. @param tree is the tree to write @throws IOException in case of error
[ "Write", "the", "given", "tree", "inside", "the", ".", "dot", "output", "stream", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/io/DotDotWriter.java#L76-L136
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractCapsule3F.java
AbstractCapsule3F.containsCapsulePoint
@Pure public static boolean containsCapsulePoint( double capsule1Ax, double capsule1Ay, double capsule1Az, double capsule1Bx, double capsule1By, double capsule1Bz, double capsule1Radius, double px, double py, double pz) { double distPointToCapsuleSegment = AbstractSegment3F.distanceSquaredSegmentPoint( cap...
java
@Pure public static boolean containsCapsulePoint( double capsule1Ax, double capsule1Ay, double capsule1Az, double capsule1Bx, double capsule1By, double capsule1Bz, double capsule1Radius, double px, double py, double pz) { double distPointToCapsuleSegment = AbstractSegment3F.distanceSquaredSegmentPoint( cap...
[ "@", "Pure", "public", "static", "boolean", "containsCapsulePoint", "(", "double", "capsule1Ax", ",", "double", "capsule1Ay", ",", "double", "capsule1Az", ",", "double", "capsule1Bx", ",", "double", "capsule1By", ",", "double", "capsule1Bz", ",", "double", "capsul...
Compute intersection between a point and a capsule. @param capsule1Ax - capsule medial line segment start point @param capsule1Ay - capsule medial line segment start point @param capsule1Az - capsule medial line segment start point @param capsule1Bx - capsule medial line segment end point @param capsule1By - capsule m...
[ "Compute", "intersection", "between", "a", "point", "and", "a", "capsule", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractCapsule3F.java#L66-L74
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractCapsule3F.java
AbstractCapsule3F.intersectsCapsuleAlignedBox
@Pure public static boolean intersectsCapsuleAlignedBox( double mx1, double my1, double mz1, double mx2, double my2, double mz2, double radius, double minx, double miny, double minz, double maxx, double maxy, double maxz) { Point3f closest1 = AlignedBox3f.computeClosestPoint( minx, miny, minz, ma...
java
@Pure public static boolean intersectsCapsuleAlignedBox( double mx1, double my1, double mz1, double mx2, double my2, double mz2, double radius, double minx, double miny, double minz, double maxx, double maxy, double maxz) { Point3f closest1 = AlignedBox3f.computeClosestPoint( minx, miny, minz, ma...
[ "@", "Pure", "public", "static", "boolean", "intersectsCapsuleAlignedBox", "(", "double", "mx1", ",", "double", "my1", ",", "double", "mz1", ",", "double", "mx2", ",", "double", "my2", ",", "double", "mz2", ",", "double", "radius", ",", "double", "minx", "...
Replies if the capsule intersects the aligned box. @param mx1 x coordinate of the first point of the capsule's segment. @param my1 y coordinate of the first point of the capsule's segment. @param mz1 z coordinate of the first point of the capsule's segment. @param mx2 x coordinate of the second point of the capsule's ...
[ "Replies", "if", "the", "capsule", "intersects", "the", "aligned", "box", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractCapsule3F.java#L93-L112
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractCapsule3F.java
AbstractCapsule3F.intersectsCapsuleCapsule
@Pure public static boolean intersectsCapsuleCapsule( double capsule1Ax, double capsule1Ay, double capsule1Az, double capsule1Bx, double capsule1By, double capsule1Bz, double capsule1Radius, double capsule2Ax, double capsule2Ay, double capsule2Az, double capsule2Bx, double capsule2By, double capsule2Bz, double c...
java
@Pure public static boolean intersectsCapsuleCapsule( double capsule1Ax, double capsule1Ay, double capsule1Az, double capsule1Bx, double capsule1By, double capsule1Bz, double capsule1Radius, double capsule2Ax, double capsule2Ay, double capsule2Az, double capsule2Bx, double capsule2By, double capsule2Bz, double c...
[ "@", "Pure", "public", "static", "boolean", "intersectsCapsuleCapsule", "(", "double", "capsule1Ax", ",", "double", "capsule1Ay", ",", "double", "capsule1Az", ",", "double", "capsule1Bx", ",", "double", "capsule1By", ",", "double", "capsule1Bz", ",", "double", "ca...
Replies if the specified capsules intersect. @param capsule1Ax - Medial line segment start point of the first capsule @param capsule1Ay - Medial line segment start point of the first capsule @param capsule1Az - Medial line segment start point of the first capsule @param capsule1Bx - Medial line segment end point of th...
[ "Replies", "if", "the", "specified", "capsules", "intersect", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractCapsule3F.java#L133-L145
train
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractCapsule3F.java
AbstractCapsule3F.ensureAIsLowerPoint
protected void ensureAIsLowerPoint() { CoordinateSystem3D cs = CoordinateSystem3D.getDefaultCoordinateSystem(); boolean swap = false; if (cs.isZOnUp()) { swap = (this.getMedial1().getZ() > this.getMedial2().getZ()); } else if (cs.isYOnUp()){ swap = (this.getMedial1().getY() > this.getMedial2().getY()); ...
java
protected void ensureAIsLowerPoint() { CoordinateSystem3D cs = CoordinateSystem3D.getDefaultCoordinateSystem(); boolean swap = false; if (cs.isZOnUp()) { swap = (this.getMedial1().getZ() > this.getMedial2().getZ()); } else if (cs.isYOnUp()){ swap = (this.getMedial1().getY() > this.getMedial2().getY()); ...
[ "protected", "void", "ensureAIsLowerPoint", "(", ")", "{", "CoordinateSystem3D", "cs", "=", "CoordinateSystem3D", ".", "getDefaultCoordinateSystem", "(", ")", ";", "boolean", "swap", "=", "false", ";", "if", "(", "cs", ".", "isZOnUp", "(", ")", ")", "{", "sw...
Ensure that a has the lower coordinates than b.
[ "Ensure", "that", "a", "has", "the", "lower", "coordinates", "than", "b", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractCapsule3F.java#L178-L193
train
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/ifx/Vector3ifx.java
Vector3ifx.convert
public static Vector3ifx convert(Tuple3D<?> tuple) { if (tuple instanceof Vector3ifx) { return (Vector3ifx) tuple; } return new Vector3ifx(tuple.getX(), tuple.getY(), tuple.getZ()); }
java
public static Vector3ifx convert(Tuple3D<?> tuple) { if (tuple instanceof Vector3ifx) { return (Vector3ifx) tuple; } return new Vector3ifx(tuple.getX(), tuple.getY(), tuple.getZ()); }
[ "public", "static", "Vector3ifx", "convert", "(", "Tuple3D", "<", "?", ">", "tuple", ")", "{", "if", "(", "tuple", "instanceof", "Vector3ifx", ")", "{", "return", "(", "Vector3ifx", ")", "tuple", ";", "}", "return", "new", "Vector3ifx", "(", "tuple", "."...
Convert the given tuple to a real Vector3ifx. <p>If the given tuple is already a Vector3ifx, it is replied. @param tuple the tuple. @return the Vector3ifx. @since 14.0
[ "Convert", "the", "given", "tuple", "to", "a", "real", "Vector3ifx", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/ifx/Vector3ifx.java#L137-L142
train
agmip/translator-dssat
src/main/java/org/agmip/translators/dssat/DssatSoilInput.java
DssatSoilInput.readFile
@Override protected HashMap readFile(HashMap brMap) throws IOException { HashMap ret = new HashMap(); ArrayList<HashMap> sites = readSoilSites(brMap, new HashMap()); // compressData(sites); ret.put("soils", sites); return ret; }
java
@Override protected HashMap readFile(HashMap brMap) throws IOException { HashMap ret = new HashMap(); ArrayList<HashMap> sites = readSoilSites(brMap, new HashMap()); // compressData(sites); ret.put("soils", sites); return ret; }
[ "@", "Override", "protected", "HashMap", "readFile", "(", "HashMap", "brMap", ")", "throws", "IOException", "{", "HashMap", "ret", "=", "new", "HashMap", "(", ")", ";", "ArrayList", "<", "HashMap", ">", "sites", "=", "readSoilSites", "(", "brMap", ",", "ne...
DSSAT Soil Data input method for only inputing soil file @param brMap The holder for BufferReader objects for all files @return result data holder object @throws java.io.IOException
[ "DSSAT", "Soil", "Data", "input", "method", "for", "only", "inputing", "soil", "file" ]
4be61d998f106eb7234ea8701b63c3746ae688f4
https://github.com/agmip/translator-dssat/blob/4be61d998f106eb7234ea8701b63c3746ae688f4/src/main/java/org/agmip/translators/dssat/DssatSoilInput.java#L37-L45
train
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/d/Point3d.java
Point3d.convert
public static Point3d convert(Tuple3D<?> tuple) { if (tuple instanceof Point3d) { return (Point3d) tuple; } return new Point3d(tuple.getX(), tuple.getY(), tuple.getZ()); }
java
public static Point3d convert(Tuple3D<?> tuple) { if (tuple instanceof Point3d) { return (Point3d) tuple; } return new Point3d(tuple.getX(), tuple.getY(), tuple.getZ()); }
[ "public", "static", "Point3d", "convert", "(", "Tuple3D", "<", "?", ">", "tuple", ")", "{", "if", "(", "tuple", "instanceof", "Point3d", ")", "{", "return", "(", "Point3d", ")", "tuple", ";", "}", "return", "new", "Point3d", "(", "tuple", ".", "getX", ...
Convert the given tuple to a real Point3d. <p>If the given tuple is already a Point3d, it is replied. @param tuple the tuple. @return the Point3d. @since 14.0
[ "Convert", "the", "given", "tuple", "to", "a", "real", "Point3d", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/d/Point3d.java#L118-L123
train
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/OctTreeNode.java
OctTreeNode.getChildAt
@Pure public final N getChildAt(OctTreeZone zone) { if (zone != null) { return getChildAt(zone.ordinal()); } return null; }
java
@Pure public final N getChildAt(OctTreeZone zone) { if (zone != null) { return getChildAt(zone.ordinal()); } return null; }
[ "@", "Pure", "public", "final", "N", "getChildAt", "(", "OctTreeZone", "zone", ")", "{", "if", "(", "zone", "!=", "null", ")", "{", "return", "getChildAt", "(", "zone", ".", "ordinal", "(", ")", ")", ";", "}", "return", "null", ";", "}" ]
Replies count of children in this node. @param zone is the position of the node to reply @return the node at the given index
[ "Replies", "count", "of", "children", "in", "this", "node", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/OctTreeNode.java#L342-L348
train
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/OctTreeNode.java
OctTreeNode.setChild6
@SuppressWarnings("checkstyle:magicnumber") private boolean setChild6(N newChild) { if (this.child6 == newChild) { return false; } if (this.child6 != null) { this.child6.setParentNodeReference(null, true); --this.notNullChildCount; firePropertyChildRemoved(5, this.child5); } if (newChild != nul...
java
@SuppressWarnings("checkstyle:magicnumber") private boolean setChild6(N newChild) { if (this.child6 == newChild) { return false; } if (this.child6 != null) { this.child6.setParentNodeReference(null, true); --this.notNullChildCount; firePropertyChildRemoved(5, this.child5); } if (newChild != nul...
[ "@", "SuppressWarnings", "(", "\"checkstyle:magicnumber\"", ")", "private", "boolean", "setChild6", "(", "N", "newChild", ")", "{", "if", "(", "this", ".", "child6", "==", "newChild", ")", "{", "return", "false", ";", "}", "if", "(", "this", ".", "child6",...
Set the child 6. @param newChild is the new child @return <code>true</code> on success, otherwise <code>false</code>
[ "Set", "the", "child", "6", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/OctTreeNode.java#L693-L722
train
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/OctTreeNode.java
OctTreeNode.setChild7
@SuppressWarnings("checkstyle:magicnumber") private boolean setChild7(N newChild) { if (this.child7 == newChild) { return false; } if (this.child7 != null) { this.child7.setParentNodeReference(null, true); --this.notNullChildCount; firePropertyChildRemoved(6, this.child7); } if (newChild != nul...
java
@SuppressWarnings("checkstyle:magicnumber") private boolean setChild7(N newChild) { if (this.child7 == newChild) { return false; } if (this.child7 != null) { this.child7.setParentNodeReference(null, true); --this.notNullChildCount; firePropertyChildRemoved(6, this.child7); } if (newChild != nul...
[ "@", "SuppressWarnings", "(", "\"checkstyle:magicnumber\"", ")", "private", "boolean", "setChild7", "(", "N", "newChild", ")", "{", "if", "(", "this", ".", "child7", "==", "newChild", ")", "{", "return", "false", ";", "}", "if", "(", "this", ".", "child7",...
Set the child 7. @param newChild is the new child @return <code>true</code> on success, otherwise <code>false</code>
[ "Set", "the", "child", "7", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/OctTreeNode.java#L729-L758
train
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/OctTreeNode.java
OctTreeNode.setChild8
@SuppressWarnings("checkstyle:magicnumber") private boolean setChild8(N newChild) { if (this.child8 == newChild) { return false; } if (this.child8 != null) { this.child8.setParentNodeReference(null, true); --this.notNullChildCount; firePropertyChildRemoved(7, this.child8); } if (newChild != nul...
java
@SuppressWarnings("checkstyle:magicnumber") private boolean setChild8(N newChild) { if (this.child8 == newChild) { return false; } if (this.child8 != null) { this.child8.setParentNodeReference(null, true); --this.notNullChildCount; firePropertyChildRemoved(7, this.child8); } if (newChild != nul...
[ "@", "SuppressWarnings", "(", "\"checkstyle:magicnumber\"", ")", "private", "boolean", "setChild8", "(", "N", "newChild", ")", "{", "if", "(", "this", ".", "child8", "==", "newChild", ")", "{", "return", "false", ";", "}", "if", "(", "this", ".", "child8",...
Set the child 8. @param newChild is the new child @return <code>true</code> on success, otherwise <code>false</code>
[ "Set", "the", "child", "8", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/OctTreeNode.java#L765-L794
train
gallandarakhneorg/afc
maven/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/GenerateSourceMojo.java
GenerateSourceMojo.executeMojo
protected synchronized void executeMojo(File targetDir) throws MojoExecutionException { if (this.generateTargets.contains(targetDir) && targetDir.isDirectory()) { getLog().debug("Skiping " + targetDir + " because is was already generated"); //$NON-NLS-1$ //$NON-NLS-2$ return; } this.generateTargets.add...
java
protected synchronized void executeMojo(File targetDir) throws MojoExecutionException { if (this.generateTargets.contains(targetDir) && targetDir.isDirectory()) { getLog().debug("Skiping " + targetDir + " because is was already generated"); //$NON-NLS-1$ //$NON-NLS-2$ return; } this.generateTargets.add...
[ "protected", "synchronized", "void", "executeMojo", "(", "File", "targetDir", ")", "throws", "MojoExecutionException", "{", "if", "(", "this", ".", "generateTargets", ".", "contains", "(", "targetDir", ")", "&&", "targetDir", ".", "isDirectory", "(", ")", ")", ...
Execute the replacement mojo inside the given target directory. @param targetDir the target dir. @throws MojoExecutionException on error.
[ "Execute", "the", "replacement", "mojo", "inside", "the", "given", "target", "directory", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/tag-replacer/src/main/java/org/arakhne/maven/plugins/tagreplacer/GenerateSourceMojo.java#L90-L134
train
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/Caller.java
Caller.getCaller
@Pure public static org.arakhne.afc.vmutil.caller.Caller getCaller() { synchronized (Caller.class) { if (caller == null) { caller = new StackTraceCaller(); } return caller; } }
java
@Pure public static org.arakhne.afc.vmutil.caller.Caller getCaller() { synchronized (Caller.class) { if (caller == null) { caller = new StackTraceCaller(); } return caller; } }
[ "@", "Pure", "public", "static", "org", ".", "arakhne", ".", "afc", ".", "vmutil", ".", "caller", ".", "Caller", "getCaller", "(", ")", "{", "synchronized", "(", "Caller", ".", "class", ")", "{", "if", "(", "caller", "==", "null", ")", "{", "caller",...
Replies the stack trace mamager used by this utility class. @return the stack trace mamager.
[ "Replies", "the", "stack", "trace", "mamager", "used", "by", "this", "utility", "class", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/Caller.java#L53-L61
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/grid/GridCell.java
GridCell.getElementAt
@Pure public P getElementAt(int index) { if (index >= 0 && index < this.referenceElementCount) { int idx = 0; for (final GridCellElement<P> element : this.elements) { if (element.isReferenceCell(this)) { if (idx == index) { return element.get(); } ++idx; } } } throw new Inde...
java
@Pure public P getElementAt(int index) { if (index >= 0 && index < this.referenceElementCount) { int idx = 0; for (final GridCellElement<P> element : this.elements) { if (element.isReferenceCell(this)) { if (idx == index) { return element.get(); } ++idx; } } } throw new Inde...
[ "@", "Pure", "public", "P", "getElementAt", "(", "int", "index", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "referenceElementCount", ")", "{", "int", "idx", "=", "0", ";", "for", "(", "final", "GridCellElement", "<", "P...
Replies the reference element at the specified index in this cell. @param index the index. @return the element.
[ "Replies", "the", "reference", "element", "at", "the", "specified", "index", "in", "this", "cell", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/grid/GridCell.java#L99-L113
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/grid/GridCell.java
GridCell.iterator
@Pure public Iterator<P> iterator(Rectangle2afp<?, ?, ?, ?, ?, ?> bounds) { return new BoundsIterator<>(this.elements.iterator(), bounds); }
java
@Pure public Iterator<P> iterator(Rectangle2afp<?, ?, ?, ?, ?, ?> bounds) { return new BoundsIterator<>(this.elements.iterator(), bounds); }
[ "@", "Pure", "public", "Iterator", "<", "P", ">", "iterator", "(", "Rectangle2afp", "<", "?", ",", "?", ",", "?", ",", "?", ",", "?", ",", "?", ">", "bounds", ")", "{", "return", "new", "BoundsIterator", "<>", "(", "this", ".", "elements", ".", "...
Replies the iterator on the elements of the cell that are intersecting the specified bounds. @param bounds the bounds @return the iterator.
[ "Replies", "the", "iterator", "on", "the", "elements", "of", "the", "cell", "that", "are", "intersecting", "the", "specified", "bounds", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/grid/GridCell.java#L175-L178
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/grid/GridCell.java
GridCell.addElement
public boolean addElement(GridCellElement<P> element) { if (element != null && this.elements.add(element)) { if (element.addCellLink(this)) { ++this.referenceElementCount; } return true; } return false; }
java
public boolean addElement(GridCellElement<P> element) { if (element != null && this.elements.add(element)) { if (element.addCellLink(this)) { ++this.referenceElementCount; } return true; } return false; }
[ "public", "boolean", "addElement", "(", "GridCellElement", "<", "P", ">", "element", ")", "{", "if", "(", "element", "!=", "null", "&&", "this", ".", "elements", ".", "add", "(", "element", ")", ")", "{", "if", "(", "element", ".", "addCellLink", "(", ...
Add an element in the cell. @param element the element. @return <code>true</code> if the element is added; otherwise <code>false</code>.
[ "Add", "an", "element", "in", "the", "cell", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/grid/GridCell.java#L195-L203
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/grid/GridCell.java
GridCell.removeElement
public GridCellElement<P> removeElement(P element) { final GridCellElement<P> elt = remove(element); if (elt != null) { if (elt.removeCellLink(this)) { --this.referenceElementCount; } } return elt; }
java
public GridCellElement<P> removeElement(P element) { final GridCellElement<P> elt = remove(element); if (elt != null) { if (elt.removeCellLink(this)) { --this.referenceElementCount; } } return elt; }
[ "public", "GridCellElement", "<", "P", ">", "removeElement", "(", "P", "element", ")", "{", "final", "GridCellElement", "<", "P", ">", "elt", "=", "remove", "(", "element", ")", ";", "if", "(", "elt", "!=", "null", ")", "{", "if", "(", "elt", ".", ...
Remove the specified element from the cell. @param element the element. @return the removed grid-cell element.
[ "Remove", "the", "specified", "element", "from", "the", "cell", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/grid/GridCell.java#L225-L233
train
gallandarakhneorg/afc
advanced/gis/gisroadfx/src/main/java/org/arakhne/afc/gis/road/ui/SimpleViewer.java
SimpleViewer.getElementUnderMouse
@SuppressWarnings({ "rawtypes" }) public MapElement getElementUnderMouse(GisPane<?> pane, double x, double y) { final GISContainer model = pane.getDocumentModel(); final Point2d mousePosition = pane.toDocumentPosition(x, y); final Rectangle2d selectionArea = pane.toDocumentRect(x - 2, y - 2, 5, 5); return getE...
java
@SuppressWarnings({ "rawtypes" }) public MapElement getElementUnderMouse(GisPane<?> pane, double x, double y) { final GISContainer model = pane.getDocumentModel(); final Point2d mousePosition = pane.toDocumentPosition(x, y); final Rectangle2d selectionArea = pane.toDocumentRect(x - 2, y - 2, 5, 5); return getE...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", "}", ")", "public", "MapElement", "getElementUnderMouse", "(", "GisPane", "<", "?", ">", "pane", ",", "double", "x", ",", "double", "y", ")", "{", "final", "GISContainer", "model", "=", "pane", ".", "getDo...
Replies the element at the given mouse position. @param pane the element pane. @param x the x position of the mouse. @param y the y position of the mouse. @return the element. @since 15.0
[ "Replies", "the", "element", "at", "the", "given", "mouse", "position", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroadfx/src/main/java/org/arakhne/afc/gis/road/ui/SimpleViewer.java#L261-L267
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/radio/model/EnumRadioButtonGroupBean.java
EnumRadioButtonGroupBean.getSelectedEnumFromRadioButtons
protected E getSelectedEnumFromRadioButtons() { for (final E enumValue : this.radioButtonMap.keySet()) { final JRadioButton btn = this.radioButtonMap.get(enumValue); if (btn.isSelected()) { return enumValue; } } return null; }
java
protected E getSelectedEnumFromRadioButtons() { for (final E enumValue : this.radioButtonMap.keySet()) { final JRadioButton btn = this.radioButtonMap.get(enumValue); if (btn.isSelected()) { return enumValue; } } return null; }
[ "protected", "E", "getSelectedEnumFromRadioButtons", "(", ")", "{", "for", "(", "final", "E", "enumValue", ":", "this", ".", "radioButtonMap", ".", "keySet", "(", ")", ")", "{", "final", "JRadioButton", "btn", "=", "this", ".", "radioButtonMap", ".", "get", ...
Resolves the selected enum from the radio buttons. @return the selected enum or null if none is selected.
[ "Resolves", "the", "selected", "enum", "from", "the", "radio", "buttons", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/radio/model/EnumRadioButtonGroupBean.java#L141-L152
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/radio/model/EnumRadioButtonGroupBean.java
EnumRadioButtonGroupBean.setSelectedRadioButton
private void setSelectedRadioButton(final E enumValue) { if (enumValue != null) { final JRadioButton radioButton = this.radioButtonMap.get(enumValue); radioButton.setSelected(true); } else { for (final JRadioButton radioButton : this.radioButtonMap.values()) { radioButton.setSelected(false); ...
java
private void setSelectedRadioButton(final E enumValue) { if (enumValue != null) { final JRadioButton radioButton = this.radioButtonMap.get(enumValue); radioButton.setSelected(true); } else { for (final JRadioButton radioButton : this.radioButtonMap.values()) { radioButton.setSelected(false); ...
[ "private", "void", "setSelectedRadioButton", "(", "final", "E", "enumValue", ")", "{", "if", "(", "enumValue", "!=", "null", ")", "{", "final", "JRadioButton", "radioButton", "=", "this", ".", "radioButtonMap", ".", "get", "(", "enumValue", ")", ";", "radioB...
Sets the selected radio button. @param enumValue the new enum value to set
[ "Sets", "the", "selected", "radio", "button", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/radio/model/EnumRadioButtonGroupBean.java#L171-L185
train
gallandarakhneorg/afc
advanced/bootique/bootique-variables/src/main/java/org/arakhne/afc/bootique/variables/VariableNames.java
VariableNames.toEnvironmentVariableName
public static String toEnvironmentVariableName(String bootiqueVariable) { if (Strings.isNullOrEmpty(bootiqueVariable)) { return null; } final StringBuilder name = new StringBuilder(); final Pattern pattern = Pattern.compile("((?:[a-z0_9_]+)|(?:[A-Z]+[^A-Z]*))"); //$NON-NLS-1$ for (final String component : ...
java
public static String toEnvironmentVariableName(String bootiqueVariable) { if (Strings.isNullOrEmpty(bootiqueVariable)) { return null; } final StringBuilder name = new StringBuilder(); final Pattern pattern = Pattern.compile("((?:[a-z0_9_]+)|(?:[A-Z]+[^A-Z]*))"); //$NON-NLS-1$ for (final String component : ...
[ "public", "static", "String", "toEnvironmentVariableName", "(", "String", "bootiqueVariable", ")", "{", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "bootiqueVariable", ")", ")", "{", "return", "null", ";", "}", "final", "StringBuilder", "name", "=", "new", ...
Replies the name of an environment variable that corresponds to the name of a bootique variable. @param bootiqueVariable the name of the bootique variable. @return the name of the environment variable.
[ "Replies", "the", "name", "of", "an", "environment", "variable", "that", "corresponds", "to", "the", "name", "of", "a", "bootique", "variable", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/bootique/bootique-variables/src/main/java/org/arakhne/afc/bootique/variables/VariableNames.java#L64-L81
train
digitalfondue/stampo
src/main/java/ch/digitalfondue/stampo/WatchDir.java
WatchDir.processEvent
void processEvent(DelayQueue<Delayed> delayQueue) { // wait for key to be signaled WatchKey key; try { key = watcher.poll(250, TimeUnit.MILLISECONDS); } catch (InterruptedException | ClosedWatchServiceException x) { return; } if(key == null) { return; } Path dir...
java
void processEvent(DelayQueue<Delayed> delayQueue) { // wait for key to be signaled WatchKey key; try { key = watcher.poll(250, TimeUnit.MILLISECONDS); } catch (InterruptedException | ClosedWatchServiceException x) { return; } if(key == null) { return; } Path dir...
[ "void", "processEvent", "(", "DelayQueue", "<", "Delayed", ">", "delayQueue", ")", "{", "// wait for key to be signaled", "WatchKey", "key", ";", "try", "{", "key", "=", "watcher", ".", "poll", "(", "250", ",", "TimeUnit", ".", "MILLISECONDS", ")", ";", "}",...
Process a single key queued to the watcher @param delayQueue
[ "Process", "a", "single", "key", "queued", "to", "the", "watcher" ]
5a41f20acd9211cf3951c30d0e0825994ae95573
https://github.com/digitalfondue/stampo/blob/5a41f20acd9211cf3951c30d0e0825994ae95573/src/main/java/ch/digitalfondue/stampo/WatchDir.java#L124-L192
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/img/ImageExtensions.java
ImageExtensions.concatenateImages
public static BufferedImage concatenateImages(final List<BufferedImage> imgCollection, final int width, final int height, final int imageType, final Direction concatenationDirection) { final BufferedImage img = new BufferedImage(width, height, imageType); int x = 0; int y = 0; for (final BufferedImage bi :...
java
public static BufferedImage concatenateImages(final List<BufferedImage> imgCollection, final int width, final int height, final int imageType, final Direction concatenationDirection) { final BufferedImage img = new BufferedImage(width, height, imageType); int x = 0; int y = 0; for (final BufferedImage bi :...
[ "public", "static", "BufferedImage", "concatenateImages", "(", "final", "List", "<", "BufferedImage", ">", "imgCollection", ",", "final", "int", "width", ",", "final", "int", "height", ",", "final", "int", "imageType", ",", "final", "Direction", "concatenationDire...
Concatenate the given list of BufferedImage objects to one image and returns the concatenated BufferedImage object. @param imgCollection the BufferedImage collection @param width the width of the image that will be returned. @param height the height of the image that will be returned. @param imageType type of the crea...
[ "Concatenate", "the", "given", "list", "of", "BufferedImage", "objects", "to", "one", "image", "and", "returns", "the", "concatenated", "BufferedImage", "object", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/img/ImageExtensions.java#L90-L114
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/img/ImageExtensions.java
ImageExtensions.createPdf
public static void createPdf(final OutputStream result, final List<BufferedImage> images) throws DocumentException, IOException { final Document document = new Document(); PdfWriter.getInstance(document, result); for (final BufferedImage image : images) { final ByteArrayOutputStream baos = new ByteArrayOu...
java
public static void createPdf(final OutputStream result, final List<BufferedImage> images) throws DocumentException, IOException { final Document document = new Document(); PdfWriter.getInstance(document, result); for (final BufferedImage image : images) { final ByteArrayOutputStream baos = new ByteArrayOu...
[ "public", "static", "void", "createPdf", "(", "final", "OutputStream", "result", ",", "final", "List", "<", "BufferedImage", ">", "images", ")", "throws", "DocumentException", ",", "IOException", "{", "final", "Document", "document", "=", "new", "Document", "(",...
Creates from the given Collection of images an pdf file. @param result the output stream from the pdf file where the images shell be written. @param images the BufferedImage collection to be written in the pdf file. @throws DocumentException is thrown if an error occurs when trying to get an instance of {@link PdfWrit...
[ "Creates", "from", "the", "given", "Collection", "of", "images", "an", "pdf", "file", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/img/ImageExtensions.java#L128-L144
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/img/ImageExtensions.java
ImageExtensions.resize
public static byte[] resize(final BufferedImage originalImage, final Method scalingMethod, final Mode resizeMode, final String formatName, final int targetWidth, final int targetHeight) { try { final BufferedImage resizedImage = Scalr.resize(originalImage, scalingMethod, resizeMode, targetWidth, targetH...
java
public static byte[] resize(final BufferedImage originalImage, final Method scalingMethod, final Mode resizeMode, final String formatName, final int targetWidth, final int targetHeight) { try { final BufferedImage resizedImage = Scalr.resize(originalImage, scalingMethod, resizeMode, targetWidth, targetH...
[ "public", "static", "byte", "[", "]", "resize", "(", "final", "BufferedImage", "originalImage", ",", "final", "Method", "scalingMethod", ",", "final", "Mode", "resizeMode", ",", "final", "String", "formatName", ",", "final", "int", "targetWidth", ",", "final", ...
Resize the given image. @param originalImage the original image @param scalingMethod the scaling method @param resizeMode the resize mode @param formatName the format name @param targetWidth the target width @param targetHeight the target height @return the byte[]
[ "Resize", "the", "given", "image", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/img/ImageExtensions.java#L329-L343
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/img/ImageExtensions.java
ImageExtensions.resize
public static byte[] resize(final BufferedImage originalImage, final String formatName, final int targetWidth, final int targetHeight) { return resize(originalImage, Scalr.Method.QUALITY, Scalr.Mode.FIT_EXACT, formatName, targetWidth, targetHeight); }
java
public static byte[] resize(final BufferedImage originalImage, final String formatName, final int targetWidth, final int targetHeight) { return resize(originalImage, Scalr.Method.QUALITY, Scalr.Mode.FIT_EXACT, formatName, targetWidth, targetHeight); }
[ "public", "static", "byte", "[", "]", "resize", "(", "final", "BufferedImage", "originalImage", ",", "final", "String", "formatName", ",", "final", "int", "targetWidth", ",", "final", "int", "targetHeight", ")", "{", "return", "resize", "(", "originalImage", "...
Resize the given BufferedImage. @param originalImage the original image @param formatName the format name @param targetWidth the target width @param targetHeight the target height @return the byte[]
[ "Resize", "the", "given", "BufferedImage", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/img/ImageExtensions.java#L358-L363
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/img/ImageExtensions.java
ImageExtensions.toByteArray
public static byte[] toByteArray(final BufferedImage bi, final String formatName) throws IOException { try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { ImageIO.write(bi, formatName, baos); baos.flush(); final byte[] byteArray = baos.toByteArray(); return byteArray; } }
java
public static byte[] toByteArray(final BufferedImage bi, final String formatName) throws IOException { try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { ImageIO.write(bi, formatName, baos); baos.flush(); final byte[] byteArray = baos.toByteArray(); return byteArray; } }
[ "public", "static", "byte", "[", "]", "toByteArray", "(", "final", "BufferedImage", "bi", ",", "final", "String", "formatName", ")", "throws", "IOException", "{", "try", "(", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", ")", ")", ...
Converts the given BufferedImage to a byte array. @param bi the bi @param formatName the format name @return the byte[] @throws IOException Signals that an I/O exception has occurred.
[ "Converts", "the", "given", "BufferedImage", "to", "a", "byte", "array", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/img/ImageExtensions.java#L376-L386
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/AbstractGISTreeSetNode.java
AbstractGISTreeSetNode.calcBounds
@Pure protected Rectangle2d calcBounds() { final Rectangle2d bb = new Rectangle2d(); boolean first = true; Rectangle2afp<?, ?, ?, ?, ?, ?> b; // Child bounds N child; for (int i = 0; i < getChildCount(); ++i) { child = getChildAt(i); if (child != null) { b = child.getBounds(); if (b != null)...
java
@Pure protected Rectangle2d calcBounds() { final Rectangle2d bb = new Rectangle2d(); boolean first = true; Rectangle2afp<?, ?, ?, ?, ?, ?> b; // Child bounds N child; for (int i = 0; i < getChildCount(); ++i) { child = getChildAt(i); if (child != null) { b = child.getBounds(); if (b != null)...
[ "@", "Pure", "protected", "Rectangle2d", "calcBounds", "(", ")", "{", "final", "Rectangle2d", "bb", "=", "new", "Rectangle2d", "(", ")", ";", "boolean", "first", "=", "true", ";", "Rectangle2afp", "<", "?", ",", "?", ",", "?", ",", "?", ",", "?", ","...
Compute and replies the bounds for this node. @return bounds
[ "Compute", "and", "replies", "the", "bounds", "for", "this", "node", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/AbstractGISTreeSetNode.java#L251-L304
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/primitive/AbstractGISElement.java
AbstractGISElement.setContainer
public boolean setContainer(C container) { this.mapContainer = container == null ? null : new WeakReference<>(container); return true; }
java
public boolean setContainer(C container) { this.mapContainer = container == null ? null : new WeakReference<>(container); return true; }
[ "public", "boolean", "setContainer", "(", "C", "container", ")", "{", "this", ".", "mapContainer", "=", "container", "==", "null", "?", "null", ":", "new", "WeakReference", "<>", "(", "container", ")", ";", "return", "true", ";", "}" ]
Sets the container of this MapElement. @param container the new container. @return the success state of the operation.
[ "Sets", "the", "container", "of", "this", "MapElement", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/primitive/AbstractGISElement.java#L139-L142
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/primitive/AbstractGISElement.java
AbstractGISElement.getTopContainer
@Pure public Object getTopContainer() { if (this.mapContainer == null) { return null; } final C container = this.mapContainer.get(); if (container == null) { return null; } if (container instanceof GISContentElement<?>) { return ((GISContentElement<?>) container).getTopContainer(); } return co...
java
@Pure public Object getTopContainer() { if (this.mapContainer == null) { return null; } final C container = this.mapContainer.get(); if (container == null) { return null; } if (container instanceof GISContentElement<?>) { return ((GISContentElement<?>) container).getTopContainer(); } return co...
[ "@", "Pure", "public", "Object", "getTopContainer", "(", ")", "{", "if", "(", "this", ".", "mapContainer", "==", "null", ")", "{", "return", "null", ";", "}", "final", "C", "container", "=", "this", ".", "mapContainer", ".", "get", "(", ")", ";", "if...
Replies the top-most object which contains this MapElement. @return the top container or <code>null</code>
[ "Replies", "the", "top", "-", "most", "object", "which", "contains", "this", "MapElement", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/primitive/AbstractGISElement.java#L157-L170
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/primitive/AbstractGISElement.java
AbstractGISElement.getUUID
@Override @Pure public UUID getUUID() { if (this.uid == null) { this.uid = UUID.randomUUID(); } return this.uid; }
java
@Override @Pure public UUID getUUID() { if (this.uid == null) { this.uid = UUID.randomUUID(); } return this.uid; }
[ "@", "Override", "@", "Pure", "public", "UUID", "getUUID", "(", ")", "{", "if", "(", "this", ".", "uid", "==", "null", ")", "{", "this", ".", "uid", "=", "UUID", ".", "randomUUID", "(", ")", ";", "}", "return", "this", ".", "uid", ";", "}" ]
Replies an unique identifier for element. <p>A Unique IDentifier (UID) must be unique for all the object instances. <p>The following code is always true (where the arguments of the constructors are the list of points of the polyline). It illustrates that for two elements with the same geo-localized points, they have ...
[ "Replies", "an", "unique", "identifier", "for", "element", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/primitive/AbstractGISElement.java#L223-L230
train
gallandarakhneorg/afc
advanced/gis/gisbusinputoutput/src/main/java/org/arakhne/afc/gis/bus/io/xml/XMLBusNetworkUtil.java
XMLBusNetworkUtil.writeBusNetwork
@SuppressWarnings("checkstyle:npathcomplexity") public static Node writeBusNetwork(BusNetwork busNetwork, XMLBuilder builder, XMLResources resources) throws IOException { final Element element = builder.createElement(NODE_BUSNETWORK); writeGISElementAttributes(element, busNetwork, builder, resources); final Int...
java
@SuppressWarnings("checkstyle:npathcomplexity") public static Node writeBusNetwork(BusNetwork busNetwork, XMLBuilder builder, XMLResources resources) throws IOException { final Element element = builder.createElement(NODE_BUSNETWORK); writeGISElementAttributes(element, busNetwork, builder, resources); final Int...
[ "@", "SuppressWarnings", "(", "\"checkstyle:npathcomplexity\"", ")", "public", "static", "Node", "writeBusNetwork", "(", "BusNetwork", "busNetwork", ",", "XMLBuilder", "builder", ",", "XMLResources", "resources", ")", "throws", "IOException", "{", "final", "Element", ...
Create and reply an XML representation of the given bus network. @param busNetwork is the bus network to translate into XML. @param builder is the tool that permits to create XML elements. @param resources is the tool that permits to gather the resources. @return the XML representation of the given bus network. @throw...
[ "Create", "and", "reply", "an", "XML", "representation", "of", "the", "given", "bus", "network", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbusinputoutput/src/main/java/org/arakhne/afc/gis/bus/io/xml/XMLBusNetworkUtil.java#L137-L181
train
gallandarakhneorg/afc
advanced/gis/gisbusinputoutput/src/main/java/org/arakhne/afc/gis/bus/io/xml/XMLBusNetworkUtil.java
XMLBusNetworkUtil.readBusNetwork
public static BusNetwork readBusNetwork(Element xmlNode, RoadNetwork roadNetwork, PathBuilder pathBuilder, XMLResources resources) throws IOException { final UUID id = getAttributeUUID(xmlNode, NODE_BUSNETWORK, ATTR_ID); final BusNetwork busNetwork = new BusNetwork(id, roadNetwork); final Node stopsNode = ge...
java
public static BusNetwork readBusNetwork(Element xmlNode, RoadNetwork roadNetwork, PathBuilder pathBuilder, XMLResources resources) throws IOException { final UUID id = getAttributeUUID(xmlNode, NODE_BUSNETWORK, ATTR_ID); final BusNetwork busNetwork = new BusNetwork(id, roadNetwork); final Node stopsNode = ge...
[ "public", "static", "BusNetwork", "readBusNetwork", "(", "Element", "xmlNode", ",", "RoadNetwork", "roadNetwork", ",", "PathBuilder", "pathBuilder", ",", "XMLResources", "resources", ")", "throws", "IOException", "{", "final", "UUID", "id", "=", "getAttributeUUID", ...
Create and reply the bus network which is described by the given XML representation. @param xmlNode is the node to explore. @param roadNetwork is the road network on which the bus network is mapped. @param pathBuilder is the tool that permits to make absolute paths. @param resources is the tool that permits to gather ...
[ "Create", "and", "reply", "the", "bus", "network", "which", "is", "described", "by", "the", "given", "XML", "representation", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbusinputoutput/src/main/java/org/arakhne/afc/gis/bus/io/xml/XMLBusNetworkUtil.java#L312-L357
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/stream/LittleEndianDataInputStream.java
LittleEndianDataInputStream.readBELong
public long readBELong() throws IOException { return EndianNumbers.toBELong(read(), read(), read(), read(), read(), read(), read(), read()); }
java
public long readBELong() throws IOException { return EndianNumbers.toBELong(read(), read(), read(), read(), read(), read(), read(), read()); }
[ "public", "long", "readBELong", "(", ")", "throws", "IOException", "{", "return", "EndianNumbers", ".", "toBELong", "(", "read", "(", ")", ",", "read", "(", ")", ",", "read", "(", ")", ",", "read", "(", ")", ",", "read", "(", ")", ",", "read", "(",...
Read a Big Endian long on 8 bytes. <p>According to the contract of {@link DataInput#readLong()} this function is equivalent to. @return the value red from the input stream @throws IOException on error.
[ "Read", "a", "Big", "Endian", "long", "on", "8", "bytes", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/stream/LittleEndianDataInputStream.java#L98-L100
train
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/stream/LittleEndianDataInputStream.java
LittleEndianDataInputStream.readLELong
public long readLELong() throws IOException { return EndianNumbers.toLELong(read(), read(), read(), read(), read(), read(), read(), read()); }
java
public long readLELong() throws IOException { return EndianNumbers.toLELong(read(), read(), read(), read(), read(), read(), read(), read()); }
[ "public", "long", "readLELong", "(", ")", "throws", "IOException", "{", "return", "EndianNumbers", ".", "toLELong", "(", "read", "(", ")", ",", "read", "(", ")", ",", "read", "(", ")", ",", "read", "(", ")", ",", "read", "(", ")", ",", "read", "(",...
Read a Little Endian long on 8 bytes. @return the value red from the input stream @throws IOException on error.
[ "Read", "a", "Little", "Endian", "long", "on", "8", "bytes", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/stream/LittleEndianDataInputStream.java#L150-L152
train
gallandarakhneorg/afc
advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/Drawers.java
Drawers.getAllDrawers
@SuppressWarnings("unchecked") @Pure public static Iterator<Drawer<?>> getAllDrawers() { if (services == null) { services = ServiceLoader.load(Drawer.class); } return services.iterator(); }
java
@SuppressWarnings("unchecked") @Pure public static Iterator<Drawer<?>> getAllDrawers() { if (services == null) { services = ServiceLoader.load(Drawer.class); } return services.iterator(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Pure", "public", "static", "Iterator", "<", "Drawer", "<", "?", ">", ">", "getAllDrawers", "(", ")", "{", "if", "(", "services", "==", "null", ")", "{", "services", "=", "ServiceLoader", ".", "loa...
Replies all the registered document drawers. @return the drawers.
[ "Replies", "all", "the", "registered", "document", "drawers", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/Drawers.java#L62-L69
train
gallandarakhneorg/afc
advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/Drawers.java
Drawers.getDrawerFor
@SuppressWarnings("unchecked") @Pure public static <T> Drawer<T> getDrawerFor(Class<? extends T> type) { assert type != null : AssertMessages.notNullParameter(); final Drawer<?> bufferedType = buffer.get(type); Drawer<T> defaultChoice = null; if (bufferedType != null) { defaultChoice = (Drawer<T>) buffered...
java
@SuppressWarnings("unchecked") @Pure public static <T> Drawer<T> getDrawerFor(Class<? extends T> type) { assert type != null : AssertMessages.notNullParameter(); final Drawer<?> bufferedType = buffer.get(type); Drawer<T> defaultChoice = null; if (bufferedType != null) { defaultChoice = (Drawer<T>) buffered...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Pure", "public", "static", "<", "T", ">", "Drawer", "<", "T", ">", "getDrawerFor", "(", "Class", "<", "?", "extends", "T", ">", "type", ")", "{", "assert", "type", "!=", "null", ":", "AssertMess...
Replies the first registered document drawer that is supporting the given type. <p>If multiple drawers handles the given type, the ones handling the top most type within the type hierarchy are selected. If there is more than one drawer selected, the first encountered is chosen. In this case, there is no warranty about...
[ "Replies", "the", "first", "registered", "document", "drawer", "that", "is", "supporting", "the", "given", "type", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/Drawers.java#L85-L112
train
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/RoundRectangle2dfx.java
RoundRectangle2dfx.arcWidthProperty
public DoubleProperty arcWidthProperty() { if (this.arcWidth == null) { this.arcWidth = new DependentSimpleDoubleProperty<ReadOnlyDoubleProperty>( this, MathFXAttributeNames.ARC_WIDTH, widthProperty()) { @Override protected void invalidated(ReadOnlyDoubleProperty dependency) { final double value ...
java
public DoubleProperty arcWidthProperty() { if (this.arcWidth == null) { this.arcWidth = new DependentSimpleDoubleProperty<ReadOnlyDoubleProperty>( this, MathFXAttributeNames.ARC_WIDTH, widthProperty()) { @Override protected void invalidated(ReadOnlyDoubleProperty dependency) { final double value ...
[ "public", "DoubleProperty", "arcWidthProperty", "(", ")", "{", "if", "(", "this", ".", "arcWidth", "==", "null", ")", "{", "this", ".", "arcWidth", "=", "new", "DependentSimpleDoubleProperty", "<", "ReadOnlyDoubleProperty", ">", "(", "this", ",", "MathFXAttribut...
Replies the property for the arc width. @return the arcWidth property.
[ "Replies", "the", "property", "for", "the", "arc", "width", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/RoundRectangle2dfx.java#L126-L145
train
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/RoundRectangle2dfx.java
RoundRectangle2dfx.arcHeightProperty
public DoubleProperty arcHeightProperty() { if (this.arcHeight == null) { this.arcHeight = new DependentSimpleDoubleProperty<ReadOnlyDoubleProperty>( this, MathFXAttributeNames.ARC_HEIGHT, heightProperty()) { @Override protected void invalidated(ReadOnlyDoubleProperty dependency) { final double v...
java
public DoubleProperty arcHeightProperty() { if (this.arcHeight == null) { this.arcHeight = new DependentSimpleDoubleProperty<ReadOnlyDoubleProperty>( this, MathFXAttributeNames.ARC_HEIGHT, heightProperty()) { @Override protected void invalidated(ReadOnlyDoubleProperty dependency) { final double v...
[ "public", "DoubleProperty", "arcHeightProperty", "(", ")", "{", "if", "(", "this", ".", "arcHeight", "==", "null", ")", "{", "this", ".", "arcHeight", "=", "new", "DependentSimpleDoubleProperty", "<", "ReadOnlyDoubleProperty", ">", "(", "this", ",", "MathFXAttri...
Replies the property for the arc height. @return the arcHeight property.
[ "Replies", "the", "property", "for", "the", "arc", "height", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/RoundRectangle2dfx.java#L157-L176
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/location/GeoId.java
GeoId.toBounds2D
@Pure public Rectangle2d toBounds2D() { int startIndex = this.id.indexOf('#'); if (startIndex <= 0) { return null; } try { int endIndex = this.id.indexOf(';', startIndex); if (endIndex <= startIndex) { return null; } final long minx = Long.parseLong(this.id.substring(startIndex + 1, endInde...
java
@Pure public Rectangle2d toBounds2D() { int startIndex = this.id.indexOf('#'); if (startIndex <= 0) { return null; } try { int endIndex = this.id.indexOf(';', startIndex); if (endIndex <= startIndex) { return null; } final long minx = Long.parseLong(this.id.substring(startIndex + 1, endInde...
[ "@", "Pure", "public", "Rectangle2d", "toBounds2D", "(", ")", "{", "int", "startIndex", "=", "this", ".", "id", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "startIndex", "<=", "0", ")", "{", "return", "null", ";", "}", "try", "{", "int", ...
Extract the primitive bounds from this geoId. <p>A geoId is an identifier from which the localization could be extracted. The location is here restricted to the bounds of the primitives. @return a rectangle or <code>null</code> if invalid geoid.
[ "Extract", "the", "primitive", "bounds", "from", "this", "geoId", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/location/GeoId.java#L165-L204
train
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/location/GeoId.java
GeoId.getInternalId
@Pure public String getInternalId() { final int endIndex = this.id.indexOf('#'); if (endIndex <= 0) { return null; } return this.id.substring(0, endIndex); }
java
@Pure public String getInternalId() { final int endIndex = this.id.indexOf('#'); if (endIndex <= 0) { return null; } return this.id.substring(0, endIndex); }
[ "@", "Pure", "public", "String", "getInternalId", "(", ")", "{", "final", "int", "endIndex", "=", "this", ".", "id", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "endIndex", "<=", "0", ")", "{", "return", "null", ";", "}", "return", "this", ...
Extract the unique identifier stored in this geoId. @return the internal identifier or <code>null</code> if this geoid has invalid format.
[ "Extract", "the", "unique", "identifier", "stored", "in", "this", "geoId", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/location/GeoId.java#L211-L218
train
killme2008/hs4j
src/main/java/com/google/code/hs4j/network/nio/impl/Reactor.java
Reactor.checkSessionTimeout
private final long checkSessionTimeout() { long nextTimeout = 0; if (configuration.getCheckSessionTimeoutInterval() > 0) { gate.lock(); try { if (selectTries * 1000 >= configuration .getCheckSessionTimeoutInterval()) { nextTimeout = configuration .getCheckSessionTimeoutInterval()...
java
private final long checkSessionTimeout() { long nextTimeout = 0; if (configuration.getCheckSessionTimeoutInterval() > 0) { gate.lock(); try { if (selectTries * 1000 >= configuration .getCheckSessionTimeoutInterval()) { nextTimeout = configuration .getCheckSessionTimeoutInterval()...
[ "private", "final", "long", "checkSessionTimeout", "(", ")", "{", "long", "nextTimeout", "=", "0", ";", "if", "(", "configuration", ".", "getCheckSessionTimeoutInterval", "(", ")", ">", "0", ")", "{", "gate", ".", "lock", "(", ")", ";", "try", "{", "if",...
Check session timeout or idle @return
[ "Check", "session", "timeout", "or", "idle" ]
805fe14bfe270d95009514c224d93c5fe3575f11
https://github.com/killme2008/hs4j/blob/805fe14bfe270d95009514c224d93c5fe3575f11/src/main/java/com/google/code/hs4j/network/nio/impl/Reactor.java#L352-L376
train
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/d/Vector1d.java
Vector1d.convert
public static Vector1d convert(Tuple1d<?> tuple) { if (tuple instanceof Vector1d) { return (Vector1d) tuple; } return new Vector1d(tuple.getSegment(), tuple.getX(), tuple.getY()); }
java
public static Vector1d convert(Tuple1d<?> tuple) { if (tuple instanceof Vector1d) { return (Vector1d) tuple; } return new Vector1d(tuple.getSegment(), tuple.getX(), tuple.getY()); }
[ "public", "static", "Vector1d", "convert", "(", "Tuple1d", "<", "?", ">", "tuple", ")", "{", "if", "(", "tuple", "instanceof", "Vector1d", ")", "{", "return", "(", "Vector1d", ")", "tuple", ";", "}", "return", "new", "Vector1d", "(", "tuple", ".", "get...
Convert the given tuple to a real Vector1d. <p>If the given tuple is already a Vector1d, it is replied. @param tuple the tuple. @return the Vector1d. @since 14.0
[ "Convert", "the", "given", "tuple", "to", "a", "real", "Vector1d", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/d/Vector1d.java#L145-L150
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.getContributorURL
protected static URL getContributorURL(Contributor contributor, Log log) { URL url = null; if (contributor != null) { String rawUrl = contributor.getUrl(); if (rawUrl != null && !EMPTY_STRING.equals(rawUrl)) { try { url = new URL(rawUrl); } catch (Throwable exception) { url = null; } ...
java
protected static URL getContributorURL(Contributor contributor, Log log) { URL url = null; if (contributor != null) { String rawUrl = contributor.getUrl(); if (rawUrl != null && !EMPTY_STRING.equals(rawUrl)) { try { url = new URL(rawUrl); } catch (Throwable exception) { url = null; } ...
[ "protected", "static", "URL", "getContributorURL", "(", "Contributor", "contributor", ",", "Log", "log", ")", "{", "URL", "url", "=", "null", ";", "if", "(", "contributor", "!=", "null", ")", "{", "String", "rawUrl", "=", "contributor", ".", "getUrl", "(",...
Replies the preferred URL for the given contributor. @param contributor the contributor. @param log the log. @return the URL or <code>null</code> if no URL could be built.
[ "Replies", "the", "preferred", "URL", "for", "the", "given", "contributor", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L206-L229
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.dirCopy
public final void dirCopy(File in, File out, boolean skipHiddenFiles) throws IOException { assert in != null; assert out != null; getLog().debug(in.toString() + "->" + out.toString()); //$NON-NLS-1$ getLog().debug("Ignore hidden files: " + skipHiddenFiles); //$NON-NLS-1$ out.mkdirs(); final LinkedList<File>...
java
public final void dirCopy(File in, File out, boolean skipHiddenFiles) throws IOException { assert in != null; assert out != null; getLog().debug(in.toString() + "->" + out.toString()); //$NON-NLS-1$ getLog().debug("Ignore hidden files: " + skipHiddenFiles); //$NON-NLS-1$ out.mkdirs(); final LinkedList<File>...
[ "public", "final", "void", "dirCopy", "(", "File", "in", ",", "File", "out", ",", "boolean", "skipHiddenFiles", ")", "throws", "IOException", "{", "assert", "in", "!=", "null", ";", "assert", "out", "!=", "null", ";", "getLog", "(", ")", ".", "debug", ...
Copy a directory. @param in input directory. @param out output directory. @param skipHiddenFiles indicates if the hidden files should be ignored. @throws IOException on error. @since 3.3
[ "Copy", "a", "directory", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L240-L270
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.dirRemove
public final void dirRemove(File dir) throws IOException { if (dir != null) { getLog().debug("Deleting tree: " + dir.toString()); //$NON-NLS-1$ final LinkedList<File> candidates = new LinkedList<>(); candidates.add(dir); File[] children; final BuildContext buildContext = getBuildContext(); while (!c...
java
public final void dirRemove(File dir) throws IOException { if (dir != null) { getLog().debug("Deleting tree: " + dir.toString()); //$NON-NLS-1$ final LinkedList<File> candidates = new LinkedList<>(); candidates.add(dir); File[] children; final BuildContext buildContext = getBuildContext(); while (!c...
[ "public", "final", "void", "dirRemove", "(", "File", "dir", ")", "throws", "IOException", "{", "if", "(", "dir", "!=", "null", ")", "{", "getLog", "(", ")", ".", "debug", "(", "\"Deleting tree: \"", "+", "dir", ".", "toString", "(", ")", ")", ";", "/...
Delete a directory and its content. @param dir the directory to remove. @throws IOException on error. @since 3.3
[ "Delete", "a", "directory", "and", "its", "content", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L286-L323
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.getLString
public static final String getLString(Class<?> source, String label, Object... params) { final ResourceBundle rb = ResourceBundle.getBundle(source.getCanonicalName()); String text = rb.getString(label); text = text.replaceAll("[\\n\\r]", "\n"); //$NON-NLS-1$ //$NON-NLS-2$ text = text.replaceAll("\\t", "\t"); //...
java
public static final String getLString(Class<?> source, String label, Object... params) { final ResourceBundle rb = ResourceBundle.getBundle(source.getCanonicalName()); String text = rb.getString(label); text = text.replaceAll("[\\n\\r]", "\n"); //$NON-NLS-1$ //$NON-NLS-2$ text = text.replaceAll("\\t", "\t"); //...
[ "public", "static", "final", "String", "getLString", "(", "Class", "<", "?", ">", "source", ",", "String", "label", ",", "Object", "...", "params", ")", "{", "final", "ResourceBundle", "rb", "=", "ResourceBundle", ".", "getBundle", "(", "source", ".", "get...
Read a resource property and replace the parametrized macros by the given parameters. @param source is the source of the properties. @param label is the name of the property. @param params are the parameters to replace. @return the read text.
[ "Read", "a", "resource", "property", "and", "replace", "the", "parametrized", "macros", "by", "the", "given", "parameters", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L382-L389
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.removePathPrefix
public static final String removePathPrefix(File prefix, File file) { final String r = file.getAbsolutePath().replaceFirst( "^" //$NON-NLS-1$ + Pattern.quote(prefix.getAbsolutePath()), EMPTY_STRING); if (r.startsWith(File.separator)) { return r.substring(File.separator.length()); } return r; }
java
public static final String removePathPrefix(File prefix, File file) { final String r = file.getAbsolutePath().replaceFirst( "^" //$NON-NLS-1$ + Pattern.quote(prefix.getAbsolutePath()), EMPTY_STRING); if (r.startsWith(File.separator)) { return r.substring(File.separator.length()); } return r; }
[ "public", "static", "final", "String", "removePathPrefix", "(", "File", "prefix", ",", "File", "file", ")", "{", "final", "String", "r", "=", "file", ".", "getAbsolutePath", "(", ")", ".", "replaceFirst", "(", "\"^\"", "//$NON-NLS-1$", "+", "Pattern", ".", ...
Remove the path prefix from a file. @param prefix path prefix to remove. @param file input filename. @return the {@code file} without the prefix.
[ "Remove", "the", "path", "prefix", "from", "a", "file", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L398-L407
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.searchArtifact
public final synchronized ExtendedArtifact searchArtifact(File file) { final String filename = removePathPrefix(getBaseDirectory(), file); getLog().debug("Retreiving module for " + filename); //$NON-NLS-1$ File theFile = file; File pomDirectory = null; while (theFile != null && pomDirectory == null) { if...
java
public final synchronized ExtendedArtifact searchArtifact(File file) { final String filename = removePathPrefix(getBaseDirectory(), file); getLog().debug("Retreiving module for " + filename); //$NON-NLS-1$ File theFile = file; File pomDirectory = null; while (theFile != null && pomDirectory == null) { if...
[ "public", "final", "synchronized", "ExtendedArtifact", "searchArtifact", "(", "File", "file", ")", "{", "final", "String", "filename", "=", "removePathPrefix", "(", "getBaseDirectory", "(", ")", ",", "file", ")", ";", "getLog", "(", ")", ".", "debug", "(", "...
Search and reply the maven artifact which is corresponding to the given file. @param file is the file for which the maven artifact should be retreived. @return the maven artifact or <code>null</code> if none.
[ "Search", "and", "reply", "the", "maven", "artifact", "which", "is", "corresponding", "to", "the", "given", "file", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L535-L569
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.resolveArtifact
public final Artifact resolveArtifact(Artifact mavenArtifact) throws MojoExecutionException { final org.eclipse.aether.artifact.Artifact aetherArtifact = createArtifact(mavenArtifact); final ArtifactRequest request = new ArtifactRequest(); request.setArtifact(aetherArtifact); request.setRepositories(getRemoteRe...
java
public final Artifact resolveArtifact(Artifact mavenArtifact) throws MojoExecutionException { final org.eclipse.aether.artifact.Artifact aetherArtifact = createArtifact(mavenArtifact); final ArtifactRequest request = new ArtifactRequest(); request.setArtifact(aetherArtifact); request.setRepositories(getRemoteRe...
[ "public", "final", "Artifact", "resolveArtifact", "(", "Artifact", "mavenArtifact", ")", "throws", "MojoExecutionException", "{", "final", "org", ".", "eclipse", ".", "aether", ".", "artifact", ".", "Artifact", "aetherArtifact", "=", "createArtifact", "(", "mavenArt...
Retreive the extended artifact definition of the given artifact. @param mavenArtifact - the artifact to resolve @return the artifact definition. @throws MojoExecutionException on error.
[ "Retreive", "the", "extended", "artifact", "definition", "of", "the", "given", "artifact", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L617-L629
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.resolveArtifact
public final Artifact resolveArtifact(String groupId, String artifactId, String version) throws MojoExecutionException { return resolveArtifact(createArtifact(groupId, artifactId, version)); }
java
public final Artifact resolveArtifact(String groupId, String artifactId, String version) throws MojoExecutionException { return resolveArtifact(createArtifact(groupId, artifactId, version)); }
[ "public", "final", "Artifact", "resolveArtifact", "(", "String", "groupId", ",", "String", "artifactId", ",", "String", "version", ")", "throws", "MojoExecutionException", "{", "return", "resolveArtifact", "(", "createArtifact", "(", "groupId", ",", "artifactId", ",...
Retreive the extended artifact definition of the given artifact id. @param groupId is the identifier of the group. @param artifactId is the identifier of the artifact. @param version is the version of the artifact to retreive. @return the artifact definition. @throws MojoExecutionException on error.
[ "Retreive", "the", "extended", "artifact", "definition", "of", "the", "given", "artifact", "id", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L643-L645
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.createArtifact
public final Artifact createArtifact(String groupId, String artifactId, String version) { return createArtifact(groupId, artifactId, version, "runtime", "jar"); //$NON-NLS-1$ //$NON-NLS-2$ }
java
public final Artifact createArtifact(String groupId, String artifactId, String version) { return createArtifact(groupId, artifactId, version, "runtime", "jar"); //$NON-NLS-1$ //$NON-NLS-2$ }
[ "public", "final", "Artifact", "createArtifact", "(", "String", "groupId", ",", "String", "artifactId", ",", "String", "version", ")", "{", "return", "createArtifact", "(", "groupId", ",", "artifactId", ",", "version", ",", "\"runtime\"", ",", "\"jar\"", ")", ...
Create an Jar runtime artifact from the given values. @param groupId group id. @param artifactId artifact id. @param version version number. @return the artifact
[ "Create", "an", "Jar", "runtime", "artifact", "from", "the", "given", "values", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L950-L952
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.createArtifact
protected static final org.eclipse.aether.artifact.Artifact createArtifact(Artifact artifact) { return new DefaultArtifact( artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), artifact.getType(), artifact.getVersion()); }
java
protected static final org.eclipse.aether.artifact.Artifact createArtifact(Artifact artifact) { return new DefaultArtifact( artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), artifact.getType(), artifact.getVersion()); }
[ "protected", "static", "final", "org", ".", "eclipse", ".", "aether", ".", "artifact", ".", "Artifact", "createArtifact", "(", "Artifact", "artifact", ")", "{", "return", "new", "DefaultArtifact", "(", "artifact", ".", "getGroupId", "(", ")", ",", "artifact", ...
Convert the maven artifact to Aether artifact. @param artifact - the maven artifact. @return the Aether artifact.
[ "Convert", "the", "maven", "artifact", "to", "Aether", "artifact", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L959-L966
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.createArtifact
protected final Artifact createArtifact(org.eclipse.aether.artifact.Artifact artifact) { return createArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion()); }
java
protected final Artifact createArtifact(org.eclipse.aether.artifact.Artifact artifact) { return createArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion()); }
[ "protected", "final", "Artifact", "createArtifact", "(", "org", ".", "eclipse", ".", "aether", ".", "artifact", ".", "Artifact", "artifact", ")", "{", "return", "createArtifact", "(", "artifact", ".", "getGroupId", "(", ")", ",", "artifact", ".", "getArtifactI...
Convert the Aether artifact to maven artifact. @param artifact - the Aether artifact. @return the maven artifact.
[ "Convert", "the", "Aether", "artifact", "to", "maven", "artifact", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L973-L975
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.createArtifact
public final Artifact createArtifact(String groupId, String artifactId, String version, String scope, String type) { VersionRange versionRange = null; if (version != null) { versionRange = VersionRange.createFromVersion(version); } String desiredScope = scope; if (Artifact.SCOPE_TEST.equals(desiredScope))...
java
public final Artifact createArtifact(String groupId, String artifactId, String version, String scope, String type) { VersionRange versionRange = null; if (version != null) { versionRange = VersionRange.createFromVersion(version); } String desiredScope = scope; if (Artifact.SCOPE_TEST.equals(desiredScope))...
[ "public", "final", "Artifact", "createArtifact", "(", "String", "groupId", ",", "String", "artifactId", ",", "String", "version", ",", "String", "scope", ",", "String", "type", ")", "{", "VersionRange", "versionRange", "=", "null", ";", "if", "(", "version", ...
Create an artifact from the given values. @param groupId group id. @param artifactId artifact id. @param version version number. @param scope artifact scope. @param type artifact type. @return the artifact
[ "Create", "an", "artifact", "from", "the", "given", "values", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L987-L1013
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.assertNotNull
protected final void assertNotNull(String message, Object obj) { if (getLog().isDebugEnabled()) { getLog().debug( "\t(" //$NON-NLS-1$ + getLogType(obj) + ") " //$NON-NLS-1$ + message + " = " //$NON-NLS-1$ + obj); } if (obj == null) { throw new AssertionError("assertNotNull: " +...
java
protected final void assertNotNull(String message, Object obj) { if (getLog().isDebugEnabled()) { getLog().debug( "\t(" //$NON-NLS-1$ + getLogType(obj) + ") " //$NON-NLS-1$ + message + " = " //$NON-NLS-1$ + obj); } if (obj == null) { throw new AssertionError("assertNotNull: " +...
[ "protected", "final", "void", "assertNotNull", "(", "String", "message", ",", "Object", "obj", ")", "{", "if", "(", "getLog", "(", ")", ".", "isDebugEnabled", "(", ")", ")", "{", "getLog", "(", ")", ".", "debug", "(", "\"\\t(\"", "//$NON-NLS-1$", "+", ...
Throw an exception when the given object is null. @param message is the message to put in the exception. @param obj the object to test.
[ "Throw", "an", "exception", "when", "the", "given", "object", "is", "null", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L1081-L1094
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.join
public static String join(String joint, String... values) { final StringBuilder b = new StringBuilder(); for (final String value : values) { if (value != null && !EMPTY_STRING.equals(value)) { if (b.length() > 0) { b.append(joint); } b.append(value); } } return b.toString(); }
java
public static String join(String joint, String... values) { final StringBuilder b = new StringBuilder(); for (final String value : values) { if (value != null && !EMPTY_STRING.equals(value)) { if (b.length() > 0) { b.append(joint); } b.append(value); } } return b.toString(); }
[ "public", "static", "String", "join", "(", "String", "joint", ",", "String", "...", "values", ")", "{", "final", "StringBuilder", "b", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "final", "String", "value", ":", "values", ")", "{", "if", "(...
Join the values with the given joint. @param joint the joint. @param values the values. @return the jointed values
[ "Join", "the", "values", "with", "the", "given", "joint", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L1127-L1138
train
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.getMavenProject
public MavenProject getMavenProject(Artifact artifact) { try { final MavenSession session = getMavenSession(); final MavenProject current = session.getCurrentProject(); final MavenProject prj = getMavenProjectBuilder().buildFromRepository( artifact, current.getRemoteArtifactRepositories(), ses...
java
public MavenProject getMavenProject(Artifact artifact) { try { final MavenSession session = getMavenSession(); final MavenProject current = session.getCurrentProject(); final MavenProject prj = getMavenProjectBuilder().buildFromRepository( artifact, current.getRemoteArtifactRepositories(), ses...
[ "public", "MavenProject", "getMavenProject", "(", "Artifact", "artifact", ")", "{", "try", "{", "final", "MavenSession", "session", "=", "getMavenSession", "(", ")", ";", "final", "MavenProject", "current", "=", "session", ".", "getCurrentProject", "(", ")", ";"...
Load the Maven project for the given artifact. @param artifact the artifact. @return the maven project.
[ "Load", "the", "Maven", "project", "for", "the", "given", "artifact", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L1268-L1281
train
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphIterator.java
GraphIterator.getNextSegments
@SuppressWarnings("checkstyle:nestedifdepth") protected final List<GraphIterationElement<ST, PT>> getNextSegments(boolean avoid_visited_segments, GraphIterationElement<ST, PT> element) { assert this.allowManyReplies || this.visited != null; if (element != null) { final ST segment = element.getSegment(); f...
java
@SuppressWarnings("checkstyle:nestedifdepth") protected final List<GraphIterationElement<ST, PT>> getNextSegments(boolean avoid_visited_segments, GraphIterationElement<ST, PT> element) { assert this.allowManyReplies || this.visited != null; if (element != null) { final ST segment = element.getSegment(); f...
[ "@", "SuppressWarnings", "(", "\"checkstyle:nestedifdepth\"", ")", "protected", "final", "List", "<", "GraphIterationElement", "<", "ST", ",", "PT", ">", ">", "getNextSegments", "(", "boolean", "avoid_visited_segments", ",", "GraphIterationElement", "<", "ST", ",", ...
Replies the next segments. @param avoid_visited_segments is <code>true</code> to avoid to reply already visited segments, otherwise <code>false</code> @param element is the element from which the next segments must be replied. @return the list of the following segments @see #next()
[ "Replies", "the", "next", "segments", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphIterator.java#L200-L234
train
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphIterator.java
GraphIterator.nextElement
public final GraphIterationElement<ST, PT> nextElement() { if (!this.courseModel.isEmpty()) { final GraphIterationElement<ST, PT> theElement = this.courseModel.removeNextIterationElement(); if (theElement != null) { final List<GraphIterationElement<ST, PT>> list = getNextSegments(true, theElement); fina...
java
public final GraphIterationElement<ST, PT> nextElement() { if (!this.courseModel.isEmpty()) { final GraphIterationElement<ST, PT> theElement = this.courseModel.removeNextIterationElement(); if (theElement != null) { final List<GraphIterationElement<ST, PT>> list = getNextSegments(true, theElement); fina...
[ "public", "final", "GraphIterationElement", "<", "ST", ",", "PT", ">", "nextElement", "(", ")", "{", "if", "(", "!", "this", ".", "courseModel", ".", "isEmpty", "(", ")", ")", "{", "final", "GraphIterationElement", "<", "ST", ",", "PT", ">", "theElement"...
Replies the next segment. @return the next segment
[ "Replies", "the", "next", "segment", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphIterator.java#L269-L303
train
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphIterator.java
GraphIterator.newIterationElement
protected GraphIterationElement<ST, PT> newIterationElement( ST previous_segment, ST segment, PT point, double distanceToReach, double distanceToConsume) { return new GraphIterationElement<>( previous_segment, segment, point, distanceToReach, distanceToConsume); }
java
protected GraphIterationElement<ST, PT> newIterationElement( ST previous_segment, ST segment, PT point, double distanceToReach, double distanceToConsume) { return new GraphIterationElement<>( previous_segment, segment, point, distanceToReach, distanceToConsume); }
[ "protected", "GraphIterationElement", "<", "ST", ",", "PT", ">", "newIterationElement", "(", "ST", "previous_segment", ",", "ST", "segment", ",", "PT", "point", ",", "double", "distanceToReach", ",", "double", "distanceToConsume", ")", "{", "return", "new", "Gra...
Create an instance of GraphIterationElement. @param previous_segment is the previous element that permits to reach this object during an iteration @param segment is the current segment @param point is the point on which the iteration arrived on the current segment. @param distanceToReach is the distance that is alread...
[ "Create", "an", "instance", "of", "GraphIterationElement", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphIterator.java#L314-L324
train
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphIterator.java
GraphIterator.ignoreElementsAfter
public void ignoreElementsAfter(GraphIterationElement<ST, PT> element) { final List<GraphIterationElement<ST, PT>> nexts = getNextSegments(false, element); this.courseModel.removeIterationElements(nexts); }
java
public void ignoreElementsAfter(GraphIterationElement<ST, PT> element) { final List<GraphIterationElement<ST, PT>> nexts = getNextSegments(false, element); this.courseModel.removeIterationElements(nexts); }
[ "public", "void", "ignoreElementsAfter", "(", "GraphIterationElement", "<", "ST", ",", "PT", ">", "element", ")", "{", "final", "List", "<", "GraphIterationElement", "<", "ST", ",", "PT", ">", ">", "nexts", "=", "getNextSegments", "(", "false", ",", "element...
Ignore the elements after the specified element. @param element the reference element.
[ "Ignore", "the", "elements", "after", "the", "specified", "element", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphIterator.java#L340-L343
train
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/tree/model/AbstractGenericTreeNode.java
AbstractGenericTreeNode.removeChild
@Override public void removeChild(final ITreeNode<T> child) { if (children != null) { children.remove(child); } else { children = new ArrayList<>(); } }
java
@Override public void removeChild(final ITreeNode<T> child) { if (children != null) { children.remove(child); } else { children = new ArrayList<>(); } }
[ "@", "Override", "public", "void", "removeChild", "(", "final", "ITreeNode", "<", "T", ">", "child", ")", "{", "if", "(", "children", "!=", "null", ")", "{", "children", ".", "remove", "(", "child", ")", ";", "}", "else", "{", "children", "=", "new",...
Removes the child. @param child the child
[ "Removes", "the", "child", "." ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/tree/model/AbstractGenericTreeNode.java#L223-L235
train
gallandarakhneorg/afc
advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/xml/XMLGISElementUtil.java
XMLGISElementUtil.getDefaultMapElementNodeName
public static String getDefaultMapElementNodeName(Class<? extends MapElement> type) { if (MapPolyline.class.isAssignableFrom(type)) { return NODE_POLYLINE; } if (MapPoint.class.isAssignableFrom(type)) { return NODE_POINT; } if (MapPolygon.class.isAssignableFrom(type)) { return NODE_POLYGON; } if ...
java
public static String getDefaultMapElementNodeName(Class<? extends MapElement> type) { if (MapPolyline.class.isAssignableFrom(type)) { return NODE_POLYLINE; } if (MapPoint.class.isAssignableFrom(type)) { return NODE_POINT; } if (MapPolygon.class.isAssignableFrom(type)) { return NODE_POLYGON; } if ...
[ "public", "static", "String", "getDefaultMapElementNodeName", "(", "Class", "<", "?", "extends", "MapElement", ">", "type", ")", "{", "if", "(", "MapPolyline", ".", "class", ".", "isAssignableFrom", "(", "type", ")", ")", "{", "return", "NODE_POLYLINE", ";", ...
Replies the default name of the XML node for the given type of map element. @param type the type of the map element. @return the default XML node name; or {@code null} if the type if unknown.
[ "Replies", "the", "default", "name", "of", "the", "XML", "node", "for", "the", "given", "type", "of", "map", "element", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/xml/XMLGISElementUtil.java#L444-L461
train
gallandarakhneorg/afc
advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/xml/XMLGISElementUtil.java
XMLGISElementUtil.writeGISElementAttributes
public static void writeGISElementAttributes(Element element, GISElement primitive, XMLBuilder builder, XMLResources resources) throws IOException { XMLAttributeUtil.writeAttributeContainer(element, primitive, builder, resources, false); element.setAttribute(XMLUtil.ATTR_NAME, primitive.getName()); element.set...
java
public static void writeGISElementAttributes(Element element, GISElement primitive, XMLBuilder builder, XMLResources resources) throws IOException { XMLAttributeUtil.writeAttributeContainer(element, primitive, builder, resources, false); element.setAttribute(XMLUtil.ATTR_NAME, primitive.getName()); element.set...
[ "public", "static", "void", "writeGISElementAttributes", "(", "Element", "element", ",", "GISElement", "primitive", ",", "XMLBuilder", "builder", ",", "XMLResources", "resources", ")", "throws", "IOException", "{", "XMLAttributeUtil", ".", "writeAttributeContainer", "("...
Write the attributes of the given GISElement in the the XML description. Only the name, geoId, id, and additional attributes are written. Icon and color are not written. @param element is the XML node to fill with the attributes @param primitive is the map element to output. It may be {@code null} to use the default n...
[ "Write", "the", "attributes", "of", "the", "given", "GISElement", "in", "the", "the", "XML", "description", ".", "Only", "the", "name", "geoId", "id", "and", "additional", "attributes", "are", "written", ".", "Icon", "and", "color", "are", "not", "written", ...
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/xml/XMLGISElementUtil.java#L757-L763
train
gallandarakhneorg/afc
advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/xml/XMLGISElementUtil.java
XMLGISElementUtil.readGISElementAttributes
public static void readGISElementAttributes(Element element, GISElement primitive, PathBuilder pathBuilder, XMLResources resources) throws IOException { XMLAttributeUtil.readAttributeContainer(element, primitive, pathBuilder, resources, false); primitive.setName(XMLUtil.getAttributeValueWithDefault(element, null...
java
public static void readGISElementAttributes(Element element, GISElement primitive, PathBuilder pathBuilder, XMLResources resources) throws IOException { XMLAttributeUtil.readAttributeContainer(element, primitive, pathBuilder, resources, false); primitive.setName(XMLUtil.getAttributeValueWithDefault(element, null...
[ "public", "static", "void", "readGISElementAttributes", "(", "Element", "element", ",", "GISElement", "primitive", ",", "PathBuilder", "pathBuilder", ",", "XMLResources", "resources", ")", "throws", "IOException", "{", "XMLAttributeUtil", ".", "readAttributeContainer", ...
Read the attributes of a GISElement from the XML description. Only the name and additional attributes are read. Id, geoId, icon and color are not read. @param element is the XML node to read. @param primitive is the GISElement to set up. @param pathBuilder is the tool to make paths absolute. @param resources is the to...
[ "Read", "the", "attributes", "of", "a", "GISElement", "from", "the", "XML", "description", ".", "Only", "the", "name", "and", "additional", "attributes", "are", "read", ".", "Id", "geoId", "icon", "and", "color", "are", "not", "read", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/xml/XMLGISElementUtil.java#L774-L778
train
BBN-E/bue-common-open
scoring-open/src/main/java/com/bbn/bue/common/evaluation/MultimapAlignment.java
MultimapAlignment.alignedToRightItem
@SuppressWarnings("unchecked") @Override public Set<LeftT> alignedToRightItem(final Object rightItem) { if (rightToLeft.containsKey(rightItem)) { return rightToLeft.get((RightT)rightItem); } else { return ImmutableSet.of(); } }
java
@SuppressWarnings("unchecked") @Override public Set<LeftT> alignedToRightItem(final Object rightItem) { if (rightToLeft.containsKey(rightItem)) { return rightToLeft.get((RightT)rightItem); } else { return ImmutableSet.of(); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Override", "public", "Set", "<", "LeftT", ">", "alignedToRightItem", "(", "final", "Object", "rightItem", ")", "{", "if", "(", "rightToLeft", ".", "containsKey", "(", "rightItem", ")", ")", "{", "retu...
if it's in the map, it must be RightT
[ "if", "it", "s", "in", "the", "map", "it", "must", "be", "RightT" ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/scoring-open/src/main/java/com/bbn/bue/common/evaluation/MultimapAlignment.java#L73-L81
train
BBN-E/bue-common-open
scoring-open/src/main/java/com/bbn/bue/common/evaluation/MultimapAlignment.java
MultimapAlignment.alignedToLeftItem
@SuppressWarnings("unchecked") @Override public Set<RightT> alignedToLeftItem(final Object leftItem) { if (leftToRight.containsKey(leftItem)) { return leftToRight.get((LeftT)leftItem); } else { return ImmutableSet.of(); } }
java
@SuppressWarnings("unchecked") @Override public Set<RightT> alignedToLeftItem(final Object leftItem) { if (leftToRight.containsKey(leftItem)) { return leftToRight.get((LeftT)leftItem); } else { return ImmutableSet.of(); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Override", "public", "Set", "<", "RightT", ">", "alignedToLeftItem", "(", "final", "Object", "leftItem", ")", "{", "if", "(", "leftToRight", ".", "containsKey", "(", "leftItem", ")", ")", "{", "return...
if it's in the map, it must be LeftT
[ "if", "it", "s", "in", "the", "map", "it", "must", "be", "LeftT" ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/scoring-open/src/main/java/com/bbn/bue/common/evaluation/MultimapAlignment.java#L84-L92
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.ensureParentDirectoryExists
public static void ensureParentDirectoryExists(File f) throws IOException { final File parent = f.getParentFile(); if (parent != null) { java.nio.file.Files.createDirectories(parent.toPath()); } }
java
public static void ensureParentDirectoryExists(File f) throws IOException { final File parent = f.getParentFile(); if (parent != null) { java.nio.file.Files.createDirectories(parent.toPath()); } }
[ "public", "static", "void", "ensureParentDirectoryExists", "(", "File", "f", ")", "throws", "IOException", "{", "final", "File", "parent", "=", "f", ".", "getParentFile", "(", ")", ";", "if", "(", "parent", "!=", "null", ")", "{", "java", ".", "nio", "."...
Create the parent directories of the given file, if needed.
[ "Create", "the", "parent", "directories", "of", "the", "given", "file", "if", "needed", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L90-L95
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.loadFileList
public static ImmutableList<File> loadFileList(final Iterable<String> fileNames) throws IOException { final ImmutableList.Builder<File> ret = ImmutableList.builder(); for (String filename : fileNames) { if (!filename.isEmpty()) { ret.add(new File(filename.trim())); } } return...
java
public static ImmutableList<File> loadFileList(final Iterable<String> fileNames) throws IOException { final ImmutableList.Builder<File> ret = ImmutableList.builder(); for (String filename : fileNames) { if (!filename.isEmpty()) { ret.add(new File(filename.trim())); } } return...
[ "public", "static", "ImmutableList", "<", "File", ">", "loadFileList", "(", "final", "Iterable", "<", "String", ">", "fileNames", ")", "throws", "IOException", "{", "final", "ImmutableList", ".", "Builder", "<", "File", ">", "ret", "=", "ImmutableList", ".", ...
Takes a List of filenames and returns a list of files, ignoring any empty strings and any trailing whitespace.
[ "Takes", "a", "List", "of", "filenames", "and", "returns", "a", "list", "of", "files", "ignoring", "any", "empty", "strings", "and", "any", "trailing", "whitespace", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L126-L137
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.writeFileList
public static void writeFileList(Iterable<File> files, CharSink sink) throws IOException { writeUnixLines(FluentIterable.from(files) .transform(toAbsolutePathFunction()), sink); }
java
public static void writeFileList(Iterable<File> files, CharSink sink) throws IOException { writeUnixLines(FluentIterable.from(files) .transform(toAbsolutePathFunction()), sink); }
[ "public", "static", "void", "writeFileList", "(", "Iterable", "<", "File", ">", "files", ",", "CharSink", "sink", ")", "throws", "IOException", "{", "writeUnixLines", "(", "FluentIterable", ".", "from", "(", "files", ")", ".", "transform", "(", "toAbsolutePath...
Writes the absolutes paths of the given files in iteration order, one-per-line. Each line will end with a Unix newline.
[ "Writes", "the", "absolutes", "paths", "of", "the", "given", "files", "in", "iteration", "order", "one", "-", "per", "-", "line", ".", "Each", "line", "will", "end", "with", "a", "Unix", "newline", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L143-L146
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.writeSymbolToFileMap
public static void writeSymbolToFileMap(Map<Symbol, File> symbolToFileMap, CharSink sink) throws IOException { writeSymbolToFileEntries(symbolToFileMap.entrySet(), sink); }
java
public static void writeSymbolToFileMap(Map<Symbol, File> symbolToFileMap, CharSink sink) throws IOException { writeSymbolToFileEntries(symbolToFileMap.entrySet(), sink); }
[ "public", "static", "void", "writeSymbolToFileMap", "(", "Map", "<", "Symbol", ",", "File", ">", "symbolToFileMap", ",", "CharSink", "sink", ")", "throws", "IOException", "{", "writeSymbolToFileEntries", "(", "symbolToFileMap", ".", "entrySet", "(", ")", ",", "s...
Writes a map from symbols to file absolute paths to a file. Each line has a mapping with the key and value separated by a single tab. The file will have a trailing newline.
[ "Writes", "a", "map", "from", "symbols", "to", "file", "absolute", "paths", "to", "a", "file", ".", "Each", "line", "has", "a", "mapping", "with", "the", "key", "and", "value", "separated", "by", "a", "single", "tab", ".", "The", "file", "will", "have"...
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L243-L245
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.writeSymbolToFileEntries
public static void writeSymbolToFileEntries(final Iterable<Map.Entry<Symbol, File>> entries, final CharSink sink) throws IOException { writeUnixLines( transform( MapUtils.transformValues(entries, toAbsolutePathFunction()), TO_TAB_SEPARATED_ENTRY), sink); }
java
public static void writeSymbolToFileEntries(final Iterable<Map.Entry<Symbol, File>> entries, final CharSink sink) throws IOException { writeUnixLines( transform( MapUtils.transformValues(entries, toAbsolutePathFunction()), TO_TAB_SEPARATED_ENTRY), sink); }
[ "public", "static", "void", "writeSymbolToFileEntries", "(", "final", "Iterable", "<", "Map", ".", "Entry", "<", "Symbol", ",", "File", ">", ">", "entries", ",", "final", "CharSink", "sink", ")", "throws", "IOException", "{", "writeUnixLines", "(", "transform"...
Writes map entries from symbols to file absolute paths to a file. Each line has a mapping with the key and value separated by a single tab. The file will have a trailing newline. Note that the same "key" may appear in the file with multiple mappings.
[ "Writes", "map", "entries", "from", "symbols", "to", "file", "absolute", "paths", "to", "a", "file", ".", "Each", "line", "has", "a", "mapping", "with", "the", "key", "and", "value", "separated", "by", "a", "single", "tab", ".", "The", "file", "will", ...
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L255-L263
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.writeIntegerToStart
public static void writeIntegerToStart(final File f, final int num) throws IOException { final RandomAccessFile fixupFile = new RandomAccessFile(f, "rw"); fixupFile.writeInt(num); fixupFile.close(); }
java
public static void writeIntegerToStart(final File f, final int num) throws IOException { final RandomAccessFile fixupFile = new RandomAccessFile(f, "rw"); fixupFile.writeInt(num); fixupFile.close(); }
[ "public", "static", "void", "writeIntegerToStart", "(", "final", "File", "f", ",", "final", "int", "num", ")", "throws", "IOException", "{", "final", "RandomAccessFile", "fixupFile", "=", "new", "RandomAccessFile", "(", "f", ",", "\"rw\"", ")", ";", "fixupFile...
Writes a single integer to the beginning of a file, overwriting what was there originally but leaving the rest of the file intact. This is useful when you are writing a long binary file with a size header, but don't know how many elements are there until the end.
[ "Writes", "a", "single", "integer", "to", "the", "beginning", "of", "a", "file", "overwriting", "what", "was", "there", "originally", "but", "leaving", "the", "rest", "of", "the", "file", "intact", ".", "This", "is", "useful", "when", "you", "are", "writin...
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L389-L393
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.siblingDirectory
public static File siblingDirectory(final File f, final String siblingDirName) { checkNotNull(f); checkNotNull(siblingDirName); checkArgument(!siblingDirName.isEmpty()); final File parent = f.getParentFile(); if (parent != null) { return new File(parent, siblingDirName); } else { th...
java
public static File siblingDirectory(final File f, final String siblingDirName) { checkNotNull(f); checkNotNull(siblingDirName); checkArgument(!siblingDirName.isEmpty()); final File parent = f.getParentFile(); if (parent != null) { return new File(parent, siblingDirName); } else { th...
[ "public", "static", "File", "siblingDirectory", "(", "final", "File", "f", ",", "final", "String", "siblingDirName", ")", "{", "checkNotNull", "(", "f", ")", ";", "checkNotNull", "(", "siblingDirName", ")", ";", "checkArgument", "(", "!", "siblingDirName", "."...
Given a file, returns a File representing a sibling directory with the specified name. @param f If f is the filesystem root, a runtime exeption will be thrown. @param siblingDirName The non-empty name of the sibling directory.
[ "Given", "a", "file", "returns", "a", "File", "representing", "a", "sibling", "directory", "with", "the", "specified", "name", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L530-L543
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.endsWithPredicate
public static Predicate<File> endsWithPredicate(final String suffix) { checkArgument(!suffix.isEmpty()); return new EndsWithPredicate(suffix); }
java
public static Predicate<File> endsWithPredicate(final String suffix) { checkArgument(!suffix.isEmpty()); return new EndsWithPredicate(suffix); }
[ "public", "static", "Predicate", "<", "File", ">", "endsWithPredicate", "(", "final", "String", "suffix", ")", "{", "checkArgument", "(", "!", "suffix", ".", "isEmpty", "(", ")", ")", ";", "return", "new", "EndsWithPredicate", "(", "suffix", ")", ";", "}" ...
Make a predicate to test files for their name ending with the specified suffix. @param suffix May not be null or empty.
[ "Make", "a", "predicate", "to", "test", "files", "for", "their", "name", "ending", "with", "the", "specified", "suffix", "." ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L611-L615
train
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.isDirectoryPredicate
public static Predicate<File> isDirectoryPredicate() { return new Predicate<File>() { @Override public boolean apply(final File input) { return input.isDirectory(); } }; }
java
public static Predicate<File> isDirectoryPredicate() { return new Predicate<File>() { @Override public boolean apply(final File input) { return input.isDirectory(); } }; }
[ "public", "static", "Predicate", "<", "File", ">", "isDirectoryPredicate", "(", ")", "{", "return", "new", "Predicate", "<", "File", ">", "(", ")", "{", "@", "Override", "public", "boolean", "apply", "(", "final", "File", "input", ")", "{", "return", "in...
Guava predicates and functions
[ "Guava", "predicates", "and", "functions" ]
d618652674d647867306e2e4b987a21b7c29c015
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L829-L836
train