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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
BBN-E/bue-common-open | nlp-core-open/src/main/java/com/bbn/nlp/corpora/lightERE/EREEventMention.java | EREEventMention.typeFunction | public static Function<EREEventMention, TYPE> typeFunction() {
return new Function<EREEventMention, TYPE>() {
@Override
public TYPE apply(final EREEventMention input) {
return input.getType();
}
};
} | java | public static Function<EREEventMention, TYPE> typeFunction() {
return new Function<EREEventMention, TYPE>() {
@Override
public TYPE apply(final EREEventMention input) {
return input.getType();
}
};
} | [
"public",
"static",
"Function",
"<",
"EREEventMention",
",",
"TYPE",
">",
"typeFunction",
"(",
")",
"{",
"return",
"new",
"Function",
"<",
"EREEventMention",
",",
"TYPE",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"TYPE",
"apply",
"(",
"final",
"EREEve... | guava style functions | [
"guava",
"style",
"functions"
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/nlp-core-open/src/main/java/com/bbn/nlp/corpora/lightERE/EREEventMention.java#L201-L208 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/browser/BrowserControlExtensions.java | BrowserControlExtensions.displayURLonStandardBrowser | public static Object displayURLonStandardBrowser(final Component parentComponent,
final String url)
{
Object obj = null;
try
{
if (System.getProperty(SYSTEM_PROPERTY_OS_NAME).startsWith(OS.MAC.getOs()))
{
obj = openURLinMacOS(url);
}
else if (System.getProperty(SYSTEM_PROPERTY_OS_NAME).startsWi... | java | public static Object displayURLonStandardBrowser(final Component parentComponent,
final String url)
{
Object obj = null;
try
{
if (System.getProperty(SYSTEM_PROPERTY_OS_NAME).startsWith(OS.MAC.getOs()))
{
obj = openURLinMacOS(url);
}
else if (System.getProperty(SYSTEM_PROPERTY_OS_NAME).startsWi... | [
"public",
"static",
"Object",
"displayURLonStandardBrowser",
"(",
"final",
"Component",
"parentComponent",
",",
"final",
"String",
"url",
")",
"{",
"Object",
"obj",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"System",
".",
"getProperty",
"(",
"SYSTEM_PROPERTY_OS_N... | This method opens the specified url in the standard web-browser.
@param parentComponent
The parent component. Can be null.
@param url
An url like "http://www.yahoo.com/"
@return the object | [
"This",
"method",
"opens",
"the",
"specified",
"url",
"in",
"the",
"standard",
"web",
"-",
"browser",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/browser/BrowserControlExtensions.java#L65-L90 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/browser/BrowserControlExtensions.java | BrowserControlExtensions.openURLinMacOS | private static Object openURLinMacOS(final String url) throws ClassNotFoundException,
NoSuchMethodException, IllegalAccessException, InvocationTargetException
{
final Class<?> fileManagerClass = Class.forName(MAC_FILE_MANAGER);
final Method openURL = fileManagerClass.getDeclaredMethod("openURL",
new Class[] {... | java | private static Object openURLinMacOS(final String url) throws ClassNotFoundException,
NoSuchMethodException, IllegalAccessException, InvocationTargetException
{
final Class<?> fileManagerClass = Class.forName(MAC_FILE_MANAGER);
final Method openURL = fileManagerClass.getDeclaredMethod("openURL",
new Class[] {... | [
"private",
"static",
"Object",
"openURLinMacOS",
"(",
"final",
"String",
"url",
")",
"throws",
"ClassNotFoundException",
",",
"NoSuchMethodException",
",",
"IllegalAccessException",
",",
"InvocationTargetException",
"{",
"final",
"Class",
"<",
"?",
">",
"fileManagerClas... | Opens the given URL in mac os.
@param url
the url
@return the object
@throws ClassNotFoundException
occurs if a given class cannot be located by the specified class loader
@throws NoSuchMethodException
is thrown if a matching method is not found
@throws IllegalAccessException
is thrown if this {@code Method} object ... | [
"Opens",
"the",
"given",
"URL",
"in",
"mac",
"os",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/browser/BrowserControlExtensions.java#L110-L117 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/browser/BrowserControlExtensions.java | BrowserControlExtensions.openURLinUnixOS | private static Boolean openURLinUnixOS(final String url)
throws InterruptedException, IOException, Exception
{
Boolean executed = false;
for (final Browsers browser : Browsers.values())
{
if (!executed)
{
executed = Runtime.getRuntime()
.exec(new String[] { UNIX_COMMAND_WHICH, browser.getBrowser... | java | private static Boolean openURLinUnixOS(final String url)
throws InterruptedException, IOException, Exception
{
Boolean executed = false;
for (final Browsers browser : Browsers.values())
{
if (!executed)
{
executed = Runtime.getRuntime()
.exec(new String[] { UNIX_COMMAND_WHICH, browser.getBrowser... | [
"private",
"static",
"Boolean",
"openURLinUnixOS",
"(",
"final",
"String",
"url",
")",
"throws",
"InterruptedException",
",",
"IOException",
",",
"Exception",
"{",
"Boolean",
"executed",
"=",
"false",
";",
"for",
"(",
"final",
"Browsers",
"browser",
":",
"Browse... | Opens the given URL in unix os.
@param url
the url
@return the boolean
@throws InterruptedException
the interrupted exception
@throws IOException
Signals that an I/O exception has occurred.
@throws Exception
the exception | [
"Opens",
"the",
"given",
"URL",
"in",
"unix",
"os",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/browser/BrowserControlExtensions.java#L134-L156 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/browser/BrowserControlExtensions.java | BrowserControlExtensions.openURLinWindowsOS | private static Process openURLinWindowsOS(final String url) throws IOException
{
String cmd = null;
cmd = WINDOWS_PATH + " " + WINDOWS_FLAG + " ";
return Runtime.getRuntime().exec(cmd + url);
} | java | private static Process openURLinWindowsOS(final String url) throws IOException
{
String cmd = null;
cmd = WINDOWS_PATH + " " + WINDOWS_FLAG + " ";
return Runtime.getRuntime().exec(cmd + url);
} | [
"private",
"static",
"Process",
"openURLinWindowsOS",
"(",
"final",
"String",
"url",
")",
"throws",
"IOException",
"{",
"String",
"cmd",
"=",
"null",
";",
"cmd",
"=",
"WINDOWS_PATH",
"+",
"\" \"",
"+",
"WINDOWS_FLAG",
"+",
"\" \"",
";",
"return",
"Runtime",
... | Opens the given URL in windows os.
@param url
the url
@return the process
@throws IOException
Signals that an I/O exception has occurred. | [
"Opens",
"the",
"given",
"URL",
"in",
"windows",
"os",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/browser/BrowserControlExtensions.java#L169-L174 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/panels/tree/TreeElementPanel.java | TreeElementPanel.onInitializeGroupLayout | protected void onInitializeGroupLayout()
{
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup().addContainerGap()
.addCompon... | java | protected void onInitializeGroupLayout()
{
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup().addContainerGap()
.addCompon... | [
"protected",
"void",
"onInitializeGroupLayout",
"(",
")",
"{",
"javax",
".",
"swing",
".",
"GroupLayout",
"layout",
"=",
"new",
"javax",
".",
"swing",
".",
"GroupLayout",
"(",
"this",
")",
";",
"this",
".",
"setLayout",
"(",
"layout",
")",
";",
"layout",
... | On initialize group layout. | [
"On",
"initialize",
"group",
"layout",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/panels/tree/TreeElementPanel.java#L81-L96 | train |
italiangrid/voms-clients | src/main/java/org/italiangrid/voms/clients/util/VersionProvider.java | VersionProvider.displayVersionInfo | public static void displayVersionInfo(String command) {
String version = ProxyInitStrategy.class.getPackage()
.getImplementationVersion();
if (version == null) {
version = "N/A";
}
System.out.format("%s v. %s (%s)\n", command, version,
getAPIVersionString());
} | java | public static void displayVersionInfo(String command) {
String version = ProxyInitStrategy.class.getPackage()
.getImplementationVersion();
if (version == null) {
version = "N/A";
}
System.out.format("%s v. %s (%s)\n", command, version,
getAPIVersionString());
} | [
"public",
"static",
"void",
"displayVersionInfo",
"(",
"String",
"command",
")",
"{",
"String",
"version",
"=",
"ProxyInitStrategy",
".",
"class",
".",
"getPackage",
"(",
")",
".",
"getImplementationVersion",
"(",
")",
";",
"if",
"(",
"version",
"==",
"null",
... | Display version information.
@param command
a command string | [
"Display",
"version",
"information",
"."
] | 069cbe324c85286fa454bd78c3f76c23e97e5768 | https://github.com/italiangrid/voms-clients/blob/069cbe324c85286fa454bd78c3f76c23e97e5768/src/main/java/org/italiangrid/voms/clients/util/VersionProvider.java#L42-L53 | train |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractOrientedBox3F.java | AbstractOrientedBox3F.intersectsOrientedBoxCapsule | @Pure
public static boolean intersectsOrientedBoxCapsule(
double centerx,double centery,double centerz,
double axis1x, double axis1y, double axis1z,
double axis2x, double axis2y, double axis2z,
double axis3x, double axis3y, double axis3z,
double extentAxis1, double extentAxis2, double extentAxis3,
... | java | @Pure
public static boolean intersectsOrientedBoxCapsule(
double centerx,double centery,double centerz,
double axis1x, double axis1y, double axis1z,
double axis2x, double axis2y, double axis2z,
double axis3x, double axis3y, double axis3z,
double extentAxis1, double extentAxis2, double extentAxis3,
... | [
"@",
"Pure",
"public",
"static",
"boolean",
"intersectsOrientedBoxCapsule",
"(",
"double",
"centerx",
",",
"double",
"centery",
",",
"double",
"centerz",
",",
"double",
"axis1x",
",",
"double",
"axis1y",
",",
"double",
"axis1z",
",",
"double",
"axis2x",
",",
"... | Compute intersection between an OBB and a capsule.
@param centerx is the center point of the oriented box.
@param centery is the center point of the oriented box.
@param centerz is the center point of the oriented box.
@param axis1x are the unit vectors of the oriented box axis.
@param axis1y are the unit vectors of t... | [
"Compute",
"intersection",
"between",
"an",
"OBB",
"and",
"a",
"capsule",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractOrientedBox3F.java#L81-L117 | train |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractOrientedBox3F.java | AbstractOrientedBox3F.setFromPointCloud | public void setFromPointCloud(Iterable<? extends Point3D> pointCloud) {
Vector3f r = new Vector3f();
Vector3f s = new Vector3f();
Vector3f t = new Vector3f();
Point3f c = new Point3f();
double[] extents = new double[3];
computeOBBCenterAxisExtents(
pointCloud,
r, s, t,
c,
extents);
set(c.g... | java | public void setFromPointCloud(Iterable<? extends Point3D> pointCloud) {
Vector3f r = new Vector3f();
Vector3f s = new Vector3f();
Vector3f t = new Vector3f();
Point3f c = new Point3f();
double[] extents = new double[3];
computeOBBCenterAxisExtents(
pointCloud,
r, s, t,
c,
extents);
set(c.g... | [
"public",
"void",
"setFromPointCloud",
"(",
"Iterable",
"<",
"?",
"extends",
"Point3D",
">",
"pointCloud",
")",
"{",
"Vector3f",
"r",
"=",
"new",
"Vector3f",
"(",
")",
";",
"Vector3f",
"s",
"=",
"new",
"Vector3f",
"(",
")",
";",
"Vector3f",
"t",
"=",
"... | Set the oriented box from a could of points.
@param pointCloud - the cloud of points. | [
"Set",
"the",
"oriented",
"box",
"from",
"a",
"could",
"of",
"points",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractOrientedBox3F.java#L1048-L1063 | train |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractOrientedBox3F.java | AbstractOrientedBox3F.rotate | public void rotate(Quaternion rotation) {
Transform3D m = new Transform3D();
m.transform(this.getFirstAxis());
m.transform(this.getSecondAxis());
m.transform(this.getThirdAxis());
this.setFirstAxisExtent(this.getFirstAxis().length());
this.setSecondAxisExtent(this.getSecondAxis().length());
this.setThirdA... | java | public void rotate(Quaternion rotation) {
Transform3D m = new Transform3D();
m.transform(this.getFirstAxis());
m.transform(this.getSecondAxis());
m.transform(this.getThirdAxis());
this.setFirstAxisExtent(this.getFirstAxis().length());
this.setSecondAxisExtent(this.getSecondAxis().length());
this.setThirdA... | [
"public",
"void",
"rotate",
"(",
"Quaternion",
"rotation",
")",
"{",
"Transform3D",
"m",
"=",
"new",
"Transform3D",
"(",
")",
";",
"m",
".",
"transform",
"(",
"this",
".",
"getFirstAxis",
"(",
")",
")",
";",
"m",
".",
"transform",
"(",
"this",
".",
"... | Rotate the box around its pivot point.
The pivot point is the center of the box.
@param rotation the rotation. | [
"Rotate",
"the",
"box",
"around",
"its",
"pivot",
"point",
".",
"The",
"pivot",
"point",
"is",
"the",
"center",
"of",
"the",
"box",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractOrientedBox3F.java#L1367-L1378 | train |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractOrientedBox3F.java | AbstractOrientedBox3F.rotate | public void rotate(Quaternion rotation, Point3D pivot) {
if (pivot!=null) {
// Change the center
Transform3D m1 = new Transform3D();
m1.setTranslation(-pivot.getX(), -pivot.getY(), -pivot.getZ());
Transform3D m2 = new Transform3D();
m2.setRotation(rotation);
Transform3D m3 = new Transform3D();
m3... | java | public void rotate(Quaternion rotation, Point3D pivot) {
if (pivot!=null) {
// Change the center
Transform3D m1 = new Transform3D();
m1.setTranslation(-pivot.getX(), -pivot.getY(), -pivot.getZ());
Transform3D m2 = new Transform3D();
m2.setRotation(rotation);
Transform3D m3 = new Transform3D();
m3... | [
"public",
"void",
"rotate",
"(",
"Quaternion",
"rotation",
",",
"Point3D",
"pivot",
")",
"{",
"if",
"(",
"pivot",
"!=",
"null",
")",
"{",
"// Change the center",
"Transform3D",
"m1",
"=",
"new",
"Transform3D",
"(",
")",
";",
"m1",
".",
"setTranslation",
"(... | Rotate the box around a given pivot point.
The default pivot point of the center of the box.
@param rotation the rotation.
@param pivot the pivot point. If <code>null</code> the default pivot point is used. | [
"Rotate",
"the",
"box",
"around",
"a",
"given",
"pivot",
"point",
".",
"The",
"default",
"pivot",
"point",
"of",
"the",
"center",
"of",
"the",
"box",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractOrientedBox3F.java#L1386-L1402 | train |
gallandarakhneorg/afc | advanced/gis/giscorefx/src/main/java/org/arakhne/afc/gis/ui/drawers/AbstractMapPolylineDrawer.java | AbstractMapPolylineDrawer.definePath | protected void definePath(ZoomableGraphicsContext gc, T element) {
gc.beginPath();
final PathIterator2afp<PathElement2d> pathIterator = element.toPath2D().getPathIterator();
switch (pathIterator.getWindingRule()) {
case EVEN_ODD:
gc.setFillRule(FillRule.EVEN_ODD);
break;
case NON_ZERO:
gc.setFillRule... | java | protected void definePath(ZoomableGraphicsContext gc, T element) {
gc.beginPath();
final PathIterator2afp<PathElement2d> pathIterator = element.toPath2D().getPathIterator();
switch (pathIterator.getWindingRule()) {
case EVEN_ODD:
gc.setFillRule(FillRule.EVEN_ODD);
break;
case NON_ZERO:
gc.setFillRule... | [
"protected",
"void",
"definePath",
"(",
"ZoomableGraphicsContext",
"gc",
",",
"T",
"element",
")",
"{",
"gc",
".",
"beginPath",
"(",
")",
";",
"final",
"PathIterator2afp",
"<",
"PathElement2d",
">",
"pathIterator",
"=",
"element",
".",
"toPath2D",
"(",
")",
... | Draw the polyline path.
@param gc the graphics context that must be used for drawing.
@param element the map element. | [
"Draw",
"the",
"polyline",
"path",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscorefx/src/main/java/org/arakhne/afc/gis/ui/drawers/AbstractMapPolylineDrawer.java#L46-L90 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java | BusStop.getFirstFreeBusStopName | @Pure
public static String getFirstFreeBusStopName(BusNetwork busNetwork) {
if (busNetwork == null) {
return null;
}
int nb = busNetwork.getBusStopCount();
String name;
do {
++nb;
name = Locale.getString("NAME_TEMPLATE", Integer.toString(nb)); //$NON-NLS-1$
}
while (busNetwork.getBusStop(name) !... | java | @Pure
public static String getFirstFreeBusStopName(BusNetwork busNetwork) {
if (busNetwork == null) {
return null;
}
int nb = busNetwork.getBusStopCount();
String name;
do {
++nb;
name = Locale.getString("NAME_TEMPLATE", Integer.toString(nb)); //$NON-NLS-1$
}
while (busNetwork.getBusStop(name) !... | [
"@",
"Pure",
"public",
"static",
"String",
"getFirstFreeBusStopName",
"(",
"BusNetwork",
"busNetwork",
")",
"{",
"if",
"(",
"busNetwork",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"int",
"nb",
"=",
"busNetwork",
".",
"getBusStopCount",
"(",
")",
... | Replies a bus stop name that was not exist in the specified
bus network.
@param busNetwork is the bus network for which a free bus stop name may be computed.
@return a name suitable for bus stop. | [
"Replies",
"a",
"bus",
"stop",
"name",
"that",
"was",
"not",
"exist",
"in",
"the",
"specified",
"bus",
"network",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java#L182-L195 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java | BusStop.notifyDependencies | private void notifyDependencies() {
if (getContainer() != null) {
for (final BusHub hub : busHubs()) {
hub.checkPrimitiveValidity();
}
for (final BusItineraryHalt halt : getBindedBusHalts()) {
halt.checkPrimitiveValidity();
}
}
} | java | private void notifyDependencies() {
if (getContainer() != null) {
for (final BusHub hub : busHubs()) {
hub.checkPrimitiveValidity();
}
for (final BusItineraryHalt halt : getBindedBusHalts()) {
halt.checkPrimitiveValidity();
}
}
} | [
"private",
"void",
"notifyDependencies",
"(",
")",
"{",
"if",
"(",
"getContainer",
"(",
")",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
"BusHub",
"hub",
":",
"busHubs",
"(",
")",
")",
"{",
"hub",
".",
"checkPrimitiveValidity",
"(",
")",
";",
"}",
"... | Notifies any dependent object about a validation change from
this bus stop. | [
"Notifies",
"any",
"dependent",
"object",
"about",
"a",
"validation",
"change",
"from",
"this",
"bus",
"stop",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java#L237-L246 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java | BusStop.setPosition | public void setPosition(GeoLocationPoint position) {
if ((this.position == null && position != null)
|| (this.position != null && !this.position.equals(position))) {
this.position = position;
fireShapeChanged();
checkPrimitiveValidity();
}
} | java | public void setPosition(GeoLocationPoint position) {
if ((this.position == null && position != null)
|| (this.position != null && !this.position.equals(position))) {
this.position = position;
fireShapeChanged();
checkPrimitiveValidity();
}
} | [
"public",
"void",
"setPosition",
"(",
"GeoLocationPoint",
"position",
")",
"{",
"if",
"(",
"(",
"this",
".",
"position",
"==",
"null",
"&&",
"position",
"!=",
"null",
")",
"||",
"(",
"this",
".",
"position",
"!=",
"null",
"&&",
"!",
"this",
".",
"posit... | Set the position of the element.
@param position the position. | [
"Set",
"the",
"position",
"of",
"the",
"element",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java#L291-L298 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java | BusStop.distance | @Pure
public double distance(double x, double y) {
if (isValidPrimitive()) {
final GeoLocationPoint p = getGeoPosition();
return Point2D.getDistancePointPoint(p.getX(), p.getY(), x, y);
}
return Double.NaN;
} | java | @Pure
public double distance(double x, double y) {
if (isValidPrimitive()) {
final GeoLocationPoint p = getGeoPosition();
return Point2D.getDistancePointPoint(p.getX(), p.getY(), x, y);
}
return Double.NaN;
} | [
"@",
"Pure",
"public",
"double",
"distance",
"(",
"double",
"x",
",",
"double",
"y",
")",
"{",
"if",
"(",
"isValidPrimitive",
"(",
")",
")",
"{",
"final",
"GeoLocationPoint",
"p",
"=",
"getGeoPosition",
"(",
")",
";",
"return",
"Point2D",
".",
"getDistan... | Replies the distance between the given point and this bus stop.
@param x x coordinate.
@param y y coordinate.
@return the distance to this bus stop | [
"Replies",
"the",
"distance",
"between",
"the",
"given",
"point",
"and",
"this",
"bus",
"stop",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java#L370-L377 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java | BusStop.distance | @Pure
public double distance(BusStop stop) {
if (isValidPrimitive() && stop.isValidPrimitive()) {
final GeoLocationPoint p = getGeoPosition();
final GeoLocationPoint p2 = stop.getGeoPosition();
return Point2D.getDistancePointPoint(p.getX(), p.getY(), p2.getX(), p2.getY());
}
return Double.NaN;
} | java | @Pure
public double distance(BusStop stop) {
if (isValidPrimitive() && stop.isValidPrimitive()) {
final GeoLocationPoint p = getGeoPosition();
final GeoLocationPoint p2 = stop.getGeoPosition();
return Point2D.getDistancePointPoint(p.getX(), p.getY(), p2.getX(), p2.getY());
}
return Double.NaN;
} | [
"@",
"Pure",
"public",
"double",
"distance",
"(",
"BusStop",
"stop",
")",
"{",
"if",
"(",
"isValidPrimitive",
"(",
")",
"&&",
"stop",
".",
"isValidPrimitive",
"(",
")",
")",
"{",
"final",
"GeoLocationPoint",
"p",
"=",
"getGeoPosition",
"(",
")",
";",
"fi... | Replies the distance between the given bus stop and this bus stop.
@param stop the stop.
@return the distance to this bus stop | [
"Replies",
"the",
"distance",
"between",
"the",
"given",
"bus",
"stop",
"and",
"this",
"bus",
"stop",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java#L384-L392 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java | BusStop.addBusHub | void addBusHub(BusHub hub) {
if (this.hubs == null) {
this.hubs = new WeakArrayList<>();
}
this.hubs.add(hub);
} | java | void addBusHub(BusHub hub) {
if (this.hubs == null) {
this.hubs = new WeakArrayList<>();
}
this.hubs.add(hub);
} | [
"void",
"addBusHub",
"(",
"BusHub",
"hub",
")",
"{",
"if",
"(",
"this",
".",
"hubs",
"==",
"null",
")",
"{",
"this",
".",
"hubs",
"=",
"new",
"WeakArrayList",
"<>",
"(",
")",
";",
"}",
"this",
".",
"hubs",
".",
"add",
"(",
"hub",
")",
";",
"}"
... | Add a hub reference.
@param hub the hub. | [
"Add",
"a",
"hub",
"reference",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java#L445-L450 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java | BusStop.removeBusHub | void removeBusHub(BusHub hub) {
if (this.hubs != null) {
this.hubs.remove(hub);
if (this.hubs.isEmpty()) {
this.hubs = null;
}
}
} | java | void removeBusHub(BusHub hub) {
if (this.hubs != null) {
this.hubs.remove(hub);
if (this.hubs.isEmpty()) {
this.hubs = null;
}
}
} | [
"void",
"removeBusHub",
"(",
"BusHub",
"hub",
")",
"{",
"if",
"(",
"this",
".",
"hubs",
"!=",
"null",
")",
"{",
"this",
".",
"hubs",
".",
"remove",
"(",
"hub",
")",
";",
"if",
"(",
"this",
".",
"hubs",
".",
"isEmpty",
"(",
")",
")",
"{",
"this"... | Remove a hub reference.
@param hub the hub. | [
"Remove",
"a",
"hub",
"reference",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java#L456-L463 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java | BusStop.addBusHalt | void addBusHalt(BusItineraryHalt halt) {
if (this.halts == null) {
this.halts = new WeakArrayList<>();
}
this.halts.add(halt);
} | java | void addBusHalt(BusItineraryHalt halt) {
if (this.halts == null) {
this.halts = new WeakArrayList<>();
}
this.halts.add(halt);
} | [
"void",
"addBusHalt",
"(",
"BusItineraryHalt",
"halt",
")",
"{",
"if",
"(",
"this",
".",
"halts",
"==",
"null",
")",
"{",
"this",
".",
"halts",
"=",
"new",
"WeakArrayList",
"<>",
"(",
")",
";",
"}",
"this",
".",
"halts",
".",
"add",
"(",
"halt",
")... | Add a bus halt reference.
@param halt the halt. | [
"Add",
"a",
"bus",
"halt",
"reference",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java#L507-L512 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java | BusStop.removeBusHalt | void removeBusHalt(BusItineraryHalt halt) {
if (this.halts != null) {
this.halts.remove(halt);
if (this.halts.isEmpty()) {
this.halts = null;
}
}
} | java | void removeBusHalt(BusItineraryHalt halt) {
if (this.halts != null) {
this.halts.remove(halt);
if (this.halts.isEmpty()) {
this.halts = null;
}
}
} | [
"void",
"removeBusHalt",
"(",
"BusItineraryHalt",
"halt",
")",
"{",
"if",
"(",
"this",
".",
"halts",
"!=",
"null",
")",
"{",
"this",
".",
"halts",
".",
"remove",
"(",
"halt",
")",
";",
"if",
"(",
"this",
".",
"halts",
".",
"isEmpty",
"(",
")",
")",... | Remove a bus halt reference.
@param halt the halt. | [
"Remove",
"a",
"bus",
"halt",
"reference",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java#L518-L525 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java | BusStop.getBindedBusHalts | @Pure
public Iterable<BusItineraryHalt> getBindedBusHalts() {
if (this.halts == null) {
return Collections.emptyList();
}
return Collections.unmodifiableCollection(this.halts);
} | java | @Pure
public Iterable<BusItineraryHalt> getBindedBusHalts() {
if (this.halts == null) {
return Collections.emptyList();
}
return Collections.unmodifiableCollection(this.halts);
} | [
"@",
"Pure",
"public",
"Iterable",
"<",
"BusItineraryHalt",
">",
"getBindedBusHalts",
"(",
")",
"{",
"if",
"(",
"this",
".",
"halts",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"return",
"Collections",
".",
"un... | Replies the bus itinerary halts associated to this bus stop.
@return the bus itinerary halts. | [
"Replies",
"the",
"bus",
"itinerary",
"halts",
"associated",
"to",
"this",
"bus",
"stop",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusStop.java#L547-L553 | train |
gallandarakhneorg/afc | advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/Vector2ifx.java | Vector2ifx.convert | public static Vector2ifx convert(Tuple2D<?> tuple) {
if (tuple instanceof Vector2ifx) {
return (Vector2ifx) tuple;
}
return new Vector2ifx(tuple.getX(), tuple.getY());
} | java | public static Vector2ifx convert(Tuple2D<?> tuple) {
if (tuple instanceof Vector2ifx) {
return (Vector2ifx) tuple;
}
return new Vector2ifx(tuple.getX(), tuple.getY());
} | [
"public",
"static",
"Vector2ifx",
"convert",
"(",
"Tuple2D",
"<",
"?",
">",
"tuple",
")",
"{",
"if",
"(",
"tuple",
"instanceof",
"Vector2ifx",
")",
"{",
"return",
"(",
"Vector2ifx",
")",
"tuple",
";",
"}",
"return",
"new",
"Vector2ifx",
"(",
"tuple",
"."... | Convert the given tuple to a real Vector2ifx.
<p>If the given tuple is already a Vector2ifx, it is replied.
@param tuple the tuple.
@return the Vector2ifx.
@since 14.0 | [
"Convert",
"the",
"given",
"tuple",
"to",
"a",
"real",
"Vector2ifx",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/Vector2ifx.java#L132-L137 | train |
gallandarakhneorg/afc | advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeImpl.java | AttributeImpl.compareAttrs | @Pure
public static int compareAttrs(Attribute arg0, Attribute arg1) {
if (arg0 == arg1) {
return 0;
}
if (arg0 == null) {
return 1;
}
if (arg1 == null) {
return -1;
}
final String n0 = arg0.getName();
final String n1 = arg1.getName();
final int cmp = compareAttrNames(n0, n1);
if (cmp ==... | java | @Pure
public static int compareAttrs(Attribute arg0, Attribute arg1) {
if (arg0 == arg1) {
return 0;
}
if (arg0 == null) {
return 1;
}
if (arg1 == null) {
return -1;
}
final String n0 = arg0.getName();
final String n1 = arg1.getName();
final int cmp = compareAttrNames(n0, n1);
if (cmp ==... | [
"@",
"Pure",
"public",
"static",
"int",
"compareAttrs",
"(",
"Attribute",
"arg0",
",",
"Attribute",
"arg1",
")",
"{",
"if",
"(",
"arg0",
"==",
"arg1",
")",
"{",
"return",
"0",
";",
"}",
"if",
"(",
"arg0",
"==",
"null",
")",
"{",
"return",
"1",
";",... | Compare the two specified attributes.
@param arg0 first attribute
@param arg1 second attribute.
@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 AttributeComparator | [
"Compare",
"the",
"two",
"specified",
"attributes",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeImpl.java#L344-L365 | train |
gallandarakhneorg/afc | advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeImpl.java | AttributeImpl.compareAttrNames | @Pure
public static int compareAttrNames(String arg0, String arg1) {
if (arg0 == arg1) {
return 0;
}
if (arg0 == null) {
return Integer.MAX_VALUE;
}
if (arg1 == null) {
return Integer.MIN_VALUE;
}
return arg0.compareToIgnoreCase(arg1);
} | java | @Pure
public static int compareAttrNames(String arg0, String arg1) {
if (arg0 == arg1) {
return 0;
}
if (arg0 == null) {
return Integer.MAX_VALUE;
}
if (arg1 == null) {
return Integer.MIN_VALUE;
}
return arg0.compareToIgnoreCase(arg1);
} | [
"@",
"Pure",
"public",
"static",
"int",
"compareAttrNames",
"(",
"String",
"arg0",
",",
"String",
"arg1",
")",
"{",
"if",
"(",
"arg0",
"==",
"arg1",
")",
"{",
"return",
"0",
";",
"}",
"if",
"(",
"arg0",
"==",
"null",
")",
"{",
"return",
"Integer",
... | Compare the two specified attribute names.
@param arg0 first attribute.
@param arg1 second attribute.
@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 AttributeNameComparator | [
"Compare",
"the",
"two",
"specified",
"attribute",
"names",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeImpl.java#L376-L388 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MapLayerAttributeChangeEvent.java | MapLayerAttributeChangeEvent.isTemporaryChange | @Pure
public boolean isTemporaryChange() {
final Object src = getSource();
if (src instanceof MapLayer) {
return ((MapLayer) src).isTemporaryLayer();
}
return false;
} | java | @Pure
public boolean isTemporaryChange() {
final Object src = getSource();
if (src instanceof MapLayer) {
return ((MapLayer) src).isTemporaryLayer();
}
return false;
} | [
"@",
"Pure",
"public",
"boolean",
"isTemporaryChange",
"(",
")",
"{",
"final",
"Object",
"src",
"=",
"getSource",
"(",
")",
";",
"if",
"(",
"src",
"instanceof",
"MapLayer",
")",
"{",
"return",
"(",
"(",
"MapLayer",
")",
"src",
")",
".",
"isTemporaryLayer... | Replies if the change in the layer was marked as temporary.
The usage of this information depends on the listener's behaviour.
@return <code>true</code> if the change is temporary,
otherwise <code>false</code> | [
"Replies",
"if",
"the",
"change",
"in",
"the",
"layer",
"was",
"marked",
"as",
"temporary",
".",
"The",
"usage",
"of",
"this",
"information",
"depends",
"on",
"the",
"listener",
"s",
"behaviour",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MapLayerAttributeChangeEvent.java#L132-L139 | train |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/SubGraph.java | SubGraph.getParentGraph | @Pure
protected final Graph<ST, PT> getParentGraph() {
return this.parentGraph == null ? null : this.parentGraph.get();
} | java | @Pure
protected final Graph<ST, PT> getParentGraph() {
return this.parentGraph == null ? null : this.parentGraph.get();
} | [
"@",
"Pure",
"protected",
"final",
"Graph",
"<",
"ST",
",",
"PT",
">",
"getParentGraph",
"(",
")",
"{",
"return",
"this",
".",
"parentGraph",
"==",
"null",
"?",
"null",
":",
"this",
".",
"parentGraph",
".",
"get",
"(",
")",
";",
"}"
] | Replies the parent graph is this subgraph was built.
@return the parent graph or <code>null</code> | [
"Replies",
"the",
"parent",
"graph",
"is",
"this",
"subgraph",
"was",
"built",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/SubGraph.java#L112-L115 | train |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/SubGraph.java | SubGraph.build | public final void build(GraphIterator<ST, PT> iterator, SubGraphBuildListener<ST, PT> listener) {
assert iterator != null;
final Set<ComparableWeakReference<PT>> reachedPoints = new TreeSet<>();
GraphIterationElement<ST, PT> element;
ST segment;
PT point;
PT firstPoint = null;
this.parentGraph = new Weak... | java | public final void build(GraphIterator<ST, PT> iterator, SubGraphBuildListener<ST, PT> listener) {
assert iterator != null;
final Set<ComparableWeakReference<PT>> reachedPoints = new TreeSet<>();
GraphIterationElement<ST, PT> element;
ST segment;
PT point;
PT firstPoint = null;
this.parentGraph = new Weak... | [
"public",
"final",
"void",
"build",
"(",
"GraphIterator",
"<",
"ST",
",",
"PT",
">",
"iterator",
",",
"SubGraphBuildListener",
"<",
"ST",
",",
"PT",
">",
"listener",
")",
"{",
"assert",
"iterator",
"!=",
"null",
";",
"final",
"Set",
"<",
"ComparableWeakRef... | Build a subgraph from the specified graph.
@param iterator is the iterator on the graph.
@param listener is the listener invoked each time a segment was added to the subgraph. | [
"Build",
"a",
"subgraph",
"from",
"the",
"specified",
"graph",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/SubGraph.java#L145-L202 | train |
gallandarakhneorg/afc | core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/TreeDataEvent.java | TreeDataEvent.getAddedValues | @Pure
public List<Object> getAddedValues() {
if (this.newValues == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(this.newValues);
} | java | @Pure
public List<Object> getAddedValues() {
if (this.newValues == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(this.newValues);
} | [
"@",
"Pure",
"public",
"List",
"<",
"Object",
">",
"getAddedValues",
"(",
")",
"{",
"if",
"(",
"this",
".",
"newValues",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"return",
"Collections",
".",
"unmodifiableLis... | Replies the list of added data.
@return the list of added data. | [
"Replies",
"the",
"list",
"of",
"added",
"data",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/TreeDataEvent.java#L200-L206 | train |
gallandarakhneorg/afc | core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/TreeDataEvent.java | TreeDataEvent.getRemovedValues | @Pure
public List<Object> getRemovedValues() {
if (this.oldValues == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(this.oldValues);
} | java | @Pure
public List<Object> getRemovedValues() {
if (this.oldValues == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(this.oldValues);
} | [
"@",
"Pure",
"public",
"List",
"<",
"Object",
">",
"getRemovedValues",
"(",
")",
"{",
"if",
"(",
"this",
".",
"oldValues",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"return",
"Collections",
".",
"unmodifiableL... | Replies the list of removed data.
@return the list of removed data. | [
"Replies",
"the",
"list",
"of",
"removed",
"data",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/TreeDataEvent.java#L212-L218 | train |
gallandarakhneorg/afc | core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/TreeDataEvent.java | TreeDataEvent.getCurrentValues | @Pure
public List<Object> getCurrentValues() {
if (this.allValues == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(this.allValues);
} | java | @Pure
public List<Object> getCurrentValues() {
if (this.allValues == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(this.allValues);
} | [
"@",
"Pure",
"public",
"List",
"<",
"Object",
">",
"getCurrentValues",
"(",
")",
"{",
"if",
"(",
"this",
".",
"allValues",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"return",
"Collections",
".",
"unmodifiableL... | Replies the list of current data.
@return the list of current data. | [
"Replies",
"the",
"list",
"of",
"current",
"data",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/TreeDataEvent.java#L224-L230 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/collections/CollectionUtils.java | CollectionUtils.transformedCopy | public static <A, B> ImmutableMultiset<B> transformedCopy(Multiset<A> ms,
Function<A, B> func) {
final ImmutableMultiset.Builder<B> ret = ImmutableMultiset.builder();
for (final Multiset.Entry<A> entry : ms.entrySet()) {
final B transformedElement = func.apply(entry.getElement());
ret.addCopi... | java | public static <A, B> ImmutableMultiset<B> transformedCopy(Multiset<A> ms,
Function<A, B> func) {
final ImmutableMultiset.Builder<B> ret = ImmutableMultiset.builder();
for (final Multiset.Entry<A> entry : ms.entrySet()) {
final B transformedElement = func.apply(entry.getElement());
ret.addCopi... | [
"public",
"static",
"<",
"A",
",",
"B",
">",
"ImmutableMultiset",
"<",
"B",
">",
"transformedCopy",
"(",
"Multiset",
"<",
"A",
">",
"ms",
",",
"Function",
"<",
"A",
",",
"B",
">",
"func",
")",
"{",
"final",
"ImmutableMultiset",
".",
"Builder",
"<",
"... | Returns a new Multiset resulting from transforming each element of the input Multiset by a
function. If two or more elements are mapped to the same value by the function, their counts
will be summed in the new Multiset. | [
"Returns",
"a",
"new",
"Multiset",
"resulting",
"from",
"transforming",
"each",
"element",
"of",
"the",
"input",
"Multiset",
"by",
"a",
"function",
".",
"If",
"two",
"or",
"more",
"elements",
"are",
"mapped",
"to",
"the",
"same",
"value",
"by",
"the",
"fun... | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/CollectionUtils.java#L91-L101 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/collections/CollectionUtils.java | CollectionUtils.mutableTransformedCopy | public static <A, B> Multiset<B> mutableTransformedCopy(Multiset<A> ms,
Function<A, B> func) {
final Multiset<B> ret = HashMultiset.create();
for (final Multiset.Entry<A> entry : ms.entrySet()) {
final B transformedElement = func.apply(entry.getElement());
ret.add(transformedElement, entry.ge... | java | public static <A, B> Multiset<B> mutableTransformedCopy(Multiset<A> ms,
Function<A, B> func) {
final Multiset<B> ret = HashMultiset.create();
for (final Multiset.Entry<A> entry : ms.entrySet()) {
final B transformedElement = func.apply(entry.getElement());
ret.add(transformedElement, entry.ge... | [
"public",
"static",
"<",
"A",
",",
"B",
">",
"Multiset",
"<",
"B",
">",
"mutableTransformedCopy",
"(",
"Multiset",
"<",
"A",
">",
"ms",
",",
"Function",
"<",
"A",
",",
"B",
">",
"func",
")",
"{",
"final",
"Multiset",
"<",
"B",
">",
"ret",
"=",
"H... | Same as transformedCopy, except the returned Multiset is mutable. | [
"Same",
"as",
"transformedCopy",
"except",
"the",
"returned",
"Multiset",
"is",
"mutable",
"."
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/CollectionUtils.java#L106-L116 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/collections/CollectionUtils.java | CollectionUtils.allSameSize | public static boolean allSameSize(List<Collection<?>> collections) {
if (collections.isEmpty()) {
return true;
}
final int referenceSize = collections.get(0).size();
for (final Collection<?> col : collections) {
if (col.size() != referenceSize) {
return false;
}
}
retur... | java | public static boolean allSameSize(List<Collection<?>> collections) {
if (collections.isEmpty()) {
return true;
}
final int referenceSize = collections.get(0).size();
for (final Collection<?> col : collections) {
if (col.size() != referenceSize) {
return false;
}
}
retur... | [
"public",
"static",
"boolean",
"allSameSize",
"(",
"List",
"<",
"Collection",
"<",
"?",
">",
">",
"collections",
")",
"{",
"if",
"(",
"collections",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"final",
"int",
"referenceSize",
"=",
"... | Returns true if and only if all the collections in the provided list have the same size.
Returns true if the provided list is empty. | [
"Returns",
"true",
"if",
"and",
"only",
"if",
"all",
"the",
"collections",
"in",
"the",
"provided",
"list",
"have",
"the",
"same",
"size",
".",
"Returns",
"true",
"if",
"the",
"provided",
"list",
"is",
"empty",
"."
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/CollectionUtils.java#L136-L147 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/collections/CollectionUtils.java | CollectionUtils.coerceNullToEmpty | public static <T> List<T> coerceNullToEmpty(List<T> list) {
return MoreObjects.firstNonNull(list, ImmutableList.<T>of());
} | java | public static <T> List<T> coerceNullToEmpty(List<T> list) {
return MoreObjects.firstNonNull(list, ImmutableList.<T>of());
} | [
"public",
"static",
"<",
"T",
">",
"List",
"<",
"T",
">",
"coerceNullToEmpty",
"(",
"List",
"<",
"T",
">",
"list",
")",
"{",
"return",
"MoreObjects",
".",
"firstNonNull",
"(",
"list",
",",
"ImmutableList",
".",
"<",
"T",
">",
"of",
"(",
")",
")",
"... | Turns null into an empty list and leaves other inputs untouched. | [
"Turns",
"null",
"into",
"an",
"empty",
"list",
"and",
"leaves",
"other",
"inputs",
"untouched",
"."
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/CollectionUtils.java#L230-L232 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/bind/StringBindingListener.java | StringBindingListener.update | protected void update(DocumentEvent event)
{
String text;
try
{
text = event.getDocument().getText(event.getDocument().getStartPosition().getOffset(),
event.getDocument().getEndPosition().getOffset() - 1);
model.setObject(text);
}
catch (BadLocationException e1)
{
log.log(Level.SEVERE,
"so... | java | protected void update(DocumentEvent event)
{
String text;
try
{
text = event.getDocument().getText(event.getDocument().getStartPosition().getOffset(),
event.getDocument().getEndPosition().getOffset() - 1);
model.setObject(text);
}
catch (BadLocationException e1)
{
log.log(Level.SEVERE,
"so... | [
"protected",
"void",
"update",
"(",
"DocumentEvent",
"event",
")",
"{",
"String",
"text",
";",
"try",
"{",
"text",
"=",
"event",
".",
"getDocument",
"(",
")",
".",
"getText",
"(",
"event",
".",
"getDocument",
"(",
")",
".",
"getStartPosition",
"(",
")",
... | Update the underlying model object.
@param event
the event | [
"Update",
"the",
"underlying",
"model",
"object",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/bind/StringBindingListener.java#L95-L111 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/Android.java | Android.makeAndroidApplicationName | @Pure
public static String makeAndroidApplicationName(String applicationName) {
final String fullName;
if (applicationName.indexOf('.') >= 0) {
fullName = applicationName;
} else {
fullName = "org.arakhne.partnership." + applicationName; //$NON-NLS-1$
}
return fullName;
} | java | @Pure
public static String makeAndroidApplicationName(String applicationName) {
final String fullName;
if (applicationName.indexOf('.') >= 0) {
fullName = applicationName;
} else {
fullName = "org.arakhne.partnership." + applicationName; //$NON-NLS-1$
}
return fullName;
} | [
"@",
"Pure",
"public",
"static",
"String",
"makeAndroidApplicationName",
"(",
"String",
"applicationName",
")",
"{",
"final",
"String",
"fullName",
";",
"if",
"(",
"applicationName",
".",
"indexOf",
"(",
"'",
"'",
")",
">=",
"0",
")",
"{",
"fullName",
"=",
... | Make a valid android application name from the given application name.
A valid android application name is a package name followed by the name
of the application.
@param applicationName is the simple application name.
@return the android application name. | [
"Make",
"a",
"valid",
"android",
"application",
"name",
"from",
"the",
"given",
"application",
"name",
".",
"A",
"valid",
"android",
"application",
"name",
"is",
"a",
"package",
"name",
"followed",
"by",
"the",
"name",
"of",
"the",
"application",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/Android.java#L74-L83 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/Android.java | Android.getContextClassLoader | @Pure
public static ClassLoader getContextClassLoader() throws AndroidException {
synchronized (Android.class) {
final ClassLoader cl = (contextClassLoader == null) ? null : contextClassLoader.get();
if (cl != null) {
return cl;
}
}
final Object context = getContext();
try {
final Method method... | java | @Pure
public static ClassLoader getContextClassLoader() throws AndroidException {
synchronized (Android.class) {
final ClassLoader cl = (contextClassLoader == null) ? null : contextClassLoader.get();
if (cl != null) {
return cl;
}
}
final Object context = getContext();
try {
final Method method... | [
"@",
"Pure",
"public",
"static",
"ClassLoader",
"getContextClassLoader",
"(",
")",
"throws",
"AndroidException",
"{",
"synchronized",
"(",
"Android",
".",
"class",
")",
"{",
"final",
"ClassLoader",
"cl",
"=",
"(",
"contextClassLoader",
"==",
"null",
")",
"?",
... | Replies the class loader of the current Android context.
@return class loader used by the current Android context.
@throws AndroidException when the context is <code>null</code>.
@see #initialize(Object) | [
"Replies",
"the",
"class",
"loader",
"of",
"the",
"current",
"Android",
"context",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/Android.java#L214-L234 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/dialog/DialogExtensions.java | DialogExtensions.showExceptionDialog | public static void showExceptionDialog(Exception exception, Component parentComponent,
String... additionalMessages)
{
String title = exception.getLocalizedMessage();
StringBuilder sb = new StringBuilder();
sb.append("<html><body width='650'>");
sb.append("<h2>");
sb.append(exception.getLocalizedMessage())... | java | public static void showExceptionDialog(Exception exception, Component parentComponent,
String... additionalMessages)
{
String title = exception.getLocalizedMessage();
StringBuilder sb = new StringBuilder();
sb.append("<html><body width='650'>");
sb.append("<h2>");
sb.append(exception.getLocalizedMessage())... | [
"public",
"static",
"void",
"showExceptionDialog",
"(",
"Exception",
"exception",
",",
"Component",
"parentComponent",
",",
"String",
"...",
"additionalMessages",
")",
"{",
"String",
"title",
"=",
"exception",
".",
"getLocalizedMessage",
"(",
")",
";",
"StringBuilde... | Show exception dialog.
@param exception
the exception
@param parentComponent
determines the <code>Frame</code> in which the dialog is displayed; if
<code>null</code>, or if the <code>parentComponent</code> has no
<code>Frame</code>, a default <code>Frame</code> is used
@param additionalMessages
the additional messages | [
"Show",
"exception",
"dialog",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/dialog/DialogExtensions.java#L53-L68 | train |
BBN-E/bue-common-open | scoring-open/src/main/java/com/bbn/bue/common/evaluation/BootstrapInspector.java | BootstrapInspector.forSummarizer | @SuppressWarnings("unchecked")
public static <ObsT, SummaryT> Builder<ObsT, SummaryT> forSummarizer(
final ObservationSummarizer<? super ObsT, ? extends SummaryT> observationSummarizer,
int numSamples,
final Random rng) {
return new Builder<ObsT, SummaryT>(
(ObservationSummarizer<ObsT, S... | java | @SuppressWarnings("unchecked")
public static <ObsT, SummaryT> Builder<ObsT, SummaryT> forSummarizer(
final ObservationSummarizer<? super ObsT, ? extends SummaryT> observationSummarizer,
int numSamples,
final Random rng) {
return new Builder<ObsT, SummaryT>(
(ObservationSummarizer<ObsT, S... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"ObsT",
",",
"SummaryT",
">",
"Builder",
"<",
"ObsT",
",",
"SummaryT",
">",
"forSummarizer",
"(",
"final",
"ObservationSummarizer",
"<",
"?",
"super",
"ObsT",
",",
"?",
"extends",
"... | cast is safe - see covariance and contravariance notes on ObservationSummarizer | [
"cast",
"is",
"safe",
"-",
"see",
"covariance",
"and",
"contravariance",
"notes",
"on",
"ObservationSummarizer"
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/scoring-open/src/main/java/com/bbn/bue/common/evaluation/BootstrapInspector.java#L115-L122 | train |
gallandarakhneorg/afc | advanced/bootique/bootique-printconfig/src/main/java/org/arakhne/afc/bootique/printconfig/modules/PrintConfigCommandModule.java | PrintConfigCommandModule.providePrintConfigCommand | @SuppressWarnings("static-method")
@Provides
@Singleton
public PrintConfigCommand providePrintConfigCommand(
Provider<BootLogger> bootLogger,
Provider<ModulesMetadata> modulesMetadata,
Injector injector) {
return new PrintConfigCommand(bootLogger, modulesMetadata, injector);
} | java | @SuppressWarnings("static-method")
@Provides
@Singleton
public PrintConfigCommand providePrintConfigCommand(
Provider<BootLogger> bootLogger,
Provider<ModulesMetadata> modulesMetadata,
Injector injector) {
return new PrintConfigCommand(bootLogger, modulesMetadata, injector);
} | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"@",
"Provides",
"@",
"Singleton",
"public",
"PrintConfigCommand",
"providePrintConfigCommand",
"(",
"Provider",
"<",
"BootLogger",
">",
"bootLogger",
",",
"Provider",
"<",
"ModulesMetadata",
">",
"modulesMetadata"... | Provide the command for running the command for printing out the configuration values.
@param bootLogger the boot logger.
@param modulesMetadata the modules' metadata.
@param injector the current injector.
@return the command. | [
"Provide",
"the",
"command",
"for",
"running",
"the",
"command",
"for",
"printing",
"out",
"the",
"configuration",
"values",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/bootique/bootique-printconfig/src/main/java/org/arakhne/afc/bootique/printconfig/modules/PrintConfigCommandModule.java#L57-L65 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java | MapElement.fireShapeChanged | protected final void fireShapeChanged() {
resetBoundingBox();
if (isEventFirable()) {
final GISElementContainer<?> container = getContainer();
if (container != null) {
container.onMapElementGraphicalAttributeChanged();
}
}
} | java | protected final void fireShapeChanged() {
resetBoundingBox();
if (isEventFirable()) {
final GISElementContainer<?> container = getContainer();
if (container != null) {
container.onMapElementGraphicalAttributeChanged();
}
}
} | [
"protected",
"final",
"void",
"fireShapeChanged",
"(",
")",
"{",
"resetBoundingBox",
"(",
")",
";",
"if",
"(",
"isEventFirable",
"(",
")",
")",
"{",
"final",
"GISElementContainer",
"<",
"?",
">",
"container",
"=",
"getContainer",
"(",
")",
";",
"if",
"(",
... | Invoked when the shape of this element changed.
<p>This method also reset the bounding box to allow
its re-computation (with a call to {@link #resetBoundingBox()}.
<p>In the implementation of a MapElement, prefers to call
{@link #fireGraphicalAttributeChanged()} or
{@code fireShapeChanged()} instead of {@link #reset... | [
"Invoked",
"when",
"the",
"shape",
"of",
"this",
"element",
"changed",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java#L323-L331 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java | MapElement.boundsIntersects | @Pure
protected final boolean boundsIntersects(Shape2D<?, ?, ?, ?, ?, ? extends Rectangle2afp<?, ?, ?, ?, ?, ?>> rectangle) {
final Rectangle2d bounds = getBoundingBox();
assert bounds != null;
return bounds.intersects(rectangle);
} | java | @Pure
protected final boolean boundsIntersects(Shape2D<?, ?, ?, ?, ?, ? extends Rectangle2afp<?, ?, ?, ?, ?, ?>> rectangle) {
final Rectangle2d bounds = getBoundingBox();
assert bounds != null;
return bounds.intersects(rectangle);
} | [
"@",
"Pure",
"protected",
"final",
"boolean",
"boundsIntersects",
"(",
"Shape2D",
"<",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
"extends",
"Rectangle2afp",
"<",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
">",
">",
"rec... | Replies if the bounds of this element has an intersection
with the specified rectangle.
@param rectangle the rectangle.
@return <code>true</code> if this bounds is intersecting the specified area,
otherwise <code>false</code> | [
"Replies",
"if",
"the",
"bounds",
"of",
"this",
"element",
"has",
"an",
"intersection",
"with",
"the",
"specified",
"rectangle",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java#L455-L460 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java | MapElement.isContainerColorUsed | @Pure
public boolean isContainerColorUsed() {
final AttributeValue val = getAttributeCollection().getAttribute(ATTR_USE_CONTAINER_COLOR);
if (val != null) {
try {
return val.getBoolean();
} catch (AttributeException e) {
//
}
}
return false;
} | java | @Pure
public boolean isContainerColorUsed() {
final AttributeValue val = getAttributeCollection().getAttribute(ATTR_USE_CONTAINER_COLOR);
if (val != null) {
try {
return val.getBoolean();
} catch (AttributeException e) {
//
}
}
return false;
} | [
"@",
"Pure",
"public",
"boolean",
"isContainerColorUsed",
"(",
")",
"{",
"final",
"AttributeValue",
"val",
"=",
"getAttributeCollection",
"(",
")",
".",
"getAttribute",
"(",
"ATTR_USE_CONTAINER_COLOR",
")",
";",
"if",
"(",
"val",
"!=",
"null",
")",
"{",
"try",... | Replies the flag that indicates if this element use its color or
the container's color.
@return <code>true</code> if this element must
use the container's color, and <code>false</code> to use the
element's color. | [
"Replies",
"the",
"flag",
"that",
"indicates",
"if",
"this",
"element",
"use",
"its",
"color",
"or",
"the",
"container",
"s",
"color",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java#L482-L493 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java | MapElement.getVisualizationType | @Pure
public VisualizationType getVisualizationType() {
if (this.vizualizationType == null) {
final AttributeValue val = getAttributeCollection().getAttribute(ATTR_VISUALIZATION_TYPE);
if (val != null) {
try {
this.vizualizationType = val.getJavaObject();
} catch (Exception e) {
//
}
}... | java | @Pure
public VisualizationType getVisualizationType() {
if (this.vizualizationType == null) {
final AttributeValue val = getAttributeCollection().getAttribute(ATTR_VISUALIZATION_TYPE);
if (val != null) {
try {
this.vizualizationType = val.getJavaObject();
} catch (Exception e) {
//
}
}... | [
"@",
"Pure",
"public",
"VisualizationType",
"getVisualizationType",
"(",
")",
"{",
"if",
"(",
"this",
".",
"vizualizationType",
"==",
"null",
")",
"{",
"final",
"AttributeValue",
"val",
"=",
"getAttributeCollection",
"(",
")",
".",
"getAttribute",
"(",
"ATTR_VIS... | Replies the type of visualization that must be used by
this element.
@return the type of visualization | [
"Replies",
"the",
"type",
"of",
"visualization",
"that",
"must",
"be",
"used",
"by",
"this",
"element",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java#L546-L562 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java | MapElement.setVisualizationType | public void setVisualizationType(VisualizationType type) {
try {
if (getVisualizationType() != type) {
this.vizualizationType = type;
getAttributeCollection().setAttribute(ATTR_VISUALIZATION_TYPE, new AttributeValueImpl(type));
}
} catch (AttributeException e) {
//
}
} | java | public void setVisualizationType(VisualizationType type) {
try {
if (getVisualizationType() != type) {
this.vizualizationType = type;
getAttributeCollection().setAttribute(ATTR_VISUALIZATION_TYPE, new AttributeValueImpl(type));
}
} catch (AttributeException e) {
//
}
} | [
"public",
"void",
"setVisualizationType",
"(",
"VisualizationType",
"type",
")",
"{",
"try",
"{",
"if",
"(",
"getVisualizationType",
"(",
")",
"!=",
"type",
")",
"{",
"this",
".",
"vizualizationType",
"=",
"type",
";",
"getAttributeCollection",
"(",
")",
".",
... | Set the type of visualization that must be used by
this element.
@param type the visualization type. | [
"Set",
"the",
"type",
"of",
"visualization",
"that",
"must",
"be",
"used",
"by",
"this",
"element",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java#L570-L579 | train |
gallandarakhneorg/afc | advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/GeomFactory1dfx.java | GeomFactory1dfx.newVector | @SuppressWarnings("static-method")
public Vector1dfx newVector(ObjectProperty<WeakReference<Segment1D<?, ?>>> segment, DoubleProperty x, DoubleProperty y) {
return new Vector1dfx(segment, x, y);
} | java | @SuppressWarnings("static-method")
public Vector1dfx newVector(ObjectProperty<WeakReference<Segment1D<?, ?>>> segment, DoubleProperty x, DoubleProperty y) {
return new Vector1dfx(segment, x, y);
} | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"public",
"Vector1dfx",
"newVector",
"(",
"ObjectProperty",
"<",
"WeakReference",
"<",
"Segment1D",
"<",
"?",
",",
"?",
">",
">",
">",
"segment",
",",
"DoubleProperty",
"x",
",",
"DoubleProperty",
"y",
")... | Create a vector with properties.
@param segment the segment property.
@param x the x property.
@param y the y property.
@return the vector. | [
"Create",
"a",
"vector",
"with",
"properties",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/GeomFactory1dfx.java#L131-L134 | train |
killme2008/hs4j | src/main/java/com/google/code/hs4j/utils/HSUtils.java | HSUtils.isBlank | public static final boolean isBlank(String s) {
if (s == null || s.trim().length() == 0) {
return true;
}
return false;
} | java | public static final boolean isBlank(String s) {
if (s == null || s.trim().length() == 0) {
return true;
}
return false;
} | [
"public",
"static",
"final",
"boolean",
"isBlank",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"s",
"==",
"null",
"||",
"s",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"... | Whether string is a space or null
@param s
@return | [
"Whether",
"string",
"is",
"a",
"space",
"or",
"null"
] | 805fe14bfe270d95009514c224d93c5fe3575f11 | https://github.com/killme2008/hs4j/blob/805fe14bfe270d95009514c224d93c5fe3575f11/src/main/java/com/google/code/hs4j/utils/HSUtils.java#L16-L21 | train |
gallandarakhneorg/afc | core/util/src/main/java/org/arakhne/afc/util/OutputParameter.java | OutputParameter.set | public T set(T newValue) {
final T obj = this.object;
this.object = newValue;
return obj;
} | java | public T set(T newValue) {
final T obj = this.object;
this.object = newValue;
return obj;
} | [
"public",
"T",
"set",
"(",
"T",
"newValue",
")",
"{",
"final",
"T",
"obj",
"=",
"this",
".",
"object",
";",
"this",
".",
"object",
"=",
"newValue",
";",
"return",
"obj",
";",
"}"
] | Set the parameter.
@param newValue is the value of the parameter.
@return the old value of the parameter. | [
"Set",
"the",
"parameter",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/OutputParameter.java#L105-L109 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredAttributeNameForRoadWidth | @Pure
public static String getPreferredAttributeNameForRoadWidth() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("ROAD_WIDTH_ATTR_NAME", DEFAULT_ATTR_ROAD_WIDTH); //$NON-NLS-1$
}
return DEFAULT_ATTR_ROAD_WIDTH;
} | java | @Pure
public static String getPreferredAttributeNameForRoadWidth() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("ROAD_WIDTH_ATTR_NAME", DEFAULT_ATTR_ROAD_WIDTH); //$NON-NLS-1$
}
return DEFAULT_ATTR_ROAD_WIDTH;
} | [
"@",
"Pure",
"public",
"static",
"String",
"getPreferredAttributeNameForRoadWidth",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null"... | Replies the preferred name for the width of the roads.
@return the preferred name for the width of the roads.
@see #DEFAULT_ATTR_ROAD_WIDTH | [
"Replies",
"the",
"preferred",
"name",
"for",
"the",
"width",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L198-L205 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredAttributeNameForRoadWidth | public static void setPreferredAttributeNameForRoadWidth(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_ROAD_WIDTH.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove("ROAD_WIDTH_AT... | java | public static void setPreferredAttributeNameForRoadWidth(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_ROAD_WIDTH.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove("ROAD_WIDTH_AT... | [
"public",
"static",
"void",
"setPreferredAttributeNameForRoadWidth",
"(",
"String",
"name",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"nu... | Set the preferred name for the width of the roads.
@param name is the preferred name for the width of the roads.
@see #DEFAULT_ATTR_ROAD_WIDTH | [
"Set",
"the",
"preferred",
"name",
"for",
"the",
"width",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L212-L221 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredAttributeNameForLaneCount | @Pure
public static String getPreferredAttributeNameForLaneCount() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("LANE_COUNT_ATTR_NAME", DEFAULT_ATTR_LANE_COUNT); //$NON-NLS-1$
}
return DEFAULT_ATTR_LANE_COUNT;
} | java | @Pure
public static String getPreferredAttributeNameForLaneCount() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("LANE_COUNT_ATTR_NAME", DEFAULT_ATTR_LANE_COUNT); //$NON-NLS-1$
}
return DEFAULT_ATTR_LANE_COUNT;
} | [
"@",
"Pure",
"public",
"static",
"String",
"getPreferredAttributeNameForLaneCount",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null"... | Replies the preferred name for the number of lanes of the roads.
@return the preferred name for the number of lanes of the roads.
@see #DEFAULT_ATTR_LANE_COUNT | [
"Replies",
"the",
"preferred",
"name",
"for",
"the",
"number",
"of",
"lanes",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L228-L235 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredAttributeNameForLaneCount | public static void setPreferredAttributeNameForLaneCount(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_LANE_COUNT.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove("LANE_COUNT_AT... | java | public static void setPreferredAttributeNameForLaneCount(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_LANE_COUNT.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove("LANE_COUNT_AT... | [
"public",
"static",
"void",
"setPreferredAttributeNameForLaneCount",
"(",
"String",
"name",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"nu... | Set the preferred name for the number of lanes of the roads.
@param name is the preferred name for the number of lanes of the roads.
@see #DEFAULT_ATTR_LANE_COUNT | [
"Set",
"the",
"preferred",
"name",
"for",
"the",
"number",
"of",
"lanes",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L242-L251 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredLaneCount | @Pure
public static int getPreferredLaneCount() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.getInt("LANE_COUNT", DEFAULT_LANE_COUNT); //$NON-NLS-1$
}
return DEFAULT_LANE_COUNT;
} | java | @Pure
public static int getPreferredLaneCount() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.getInt("LANE_COUNT", DEFAULT_LANE_COUNT); //$NON-NLS-1$
}
return DEFAULT_LANE_COUNT;
} | [
"@",
"Pure",
"public",
"static",
"int",
"getPreferredLaneCount",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null",
")",
"{",
"... | Replies the preferred number of lanes for a road segment.
@return the preferred number of lanes for a road segment.
@see #DEFAULT_LANE_COUNT | [
"Replies",
"the",
"preferred",
"number",
"of",
"lanes",
"for",
"a",
"road",
"segment",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L258-L265 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredLaneCount | public static void setPreferredLaneCount(int count) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (count < 0) {
prefs.remove("LANE_COUNT"); //$NON-NLS-1$
} else {
prefs.putInt("LANE_COUNT", count); //$NON-NLS-1$
}
}
} | java | public static void setPreferredLaneCount(int count) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (count < 0) {
prefs.remove("LANE_COUNT"); //$NON-NLS-1$
} else {
prefs.putInt("LANE_COUNT", count); //$NON-NLS-1$
}
}
} | [
"public",
"static",
"void",
"setPreferredLaneCount",
"(",
"int",
"count",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null",
")",
"{",... | Set the preferred number of lanes for a road segment.
@param count is the preferred number of lanes for a road segment.
@see #DEFAULT_LANE_COUNT | [
"Set",
"the",
"preferred",
"number",
"of",
"lanes",
"for",
"a",
"road",
"segment",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L272-L281 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredLaneWidth | @Pure
public static double getPreferredLaneWidth() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.getDouble("LANE_WIDTH", DEFAULT_LANE_WIDTH); //$NON-NLS-1$
}
return DEFAULT_LANE_WIDTH;
} | java | @Pure
public static double getPreferredLaneWidth() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.getDouble("LANE_WIDTH", DEFAULT_LANE_WIDTH); //$NON-NLS-1$
}
return DEFAULT_LANE_WIDTH;
} | [
"@",
"Pure",
"public",
"static",
"double",
"getPreferredLaneWidth",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null",
")",
"{",
... | Replies the preferred width of a lane for a road segment.
@return the preferred width of a lane for a road segment, in meters.
@see #DEFAULT_LANE_WIDTH | [
"Replies",
"the",
"preferred",
"width",
"of",
"a",
"lane",
"for",
"a",
"road",
"segment",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L288-L295 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredLaneWidth | public static void setPreferredLaneWidth(double width) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (width <= 0) {
prefs.remove("LANE_WIDTH"); //$NON-NLS-1$
} else {
prefs.putDouble("LANE_WIDTH", width); //$NON-NLS-1$
}
}
} | java | public static void setPreferredLaneWidth(double width) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (width <= 0) {
prefs.remove("LANE_WIDTH"); //$NON-NLS-1$
} else {
prefs.putDouble("LANE_WIDTH", width); //$NON-NLS-1$
}
}
} | [
"public",
"static",
"void",
"setPreferredLaneWidth",
"(",
"double",
"width",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null",
")",
"... | Set the preferred width of a lane for a road segment.
@param width is the preferred width of a lane for a road segment, in meters.
@see #DEFAULT_LANE_WIDTH | [
"Set",
"the",
"preferred",
"width",
"of",
"a",
"lane",
"for",
"a",
"road",
"segment",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L302-L311 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredLegalTrafficSide | @Pure
public static LegalTrafficSide getPreferredLegalTrafficSide() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
String name = null;
if (prefs != null) {
name = prefs.get("LEGAL_TRAFFIC_SIDE", null); //$NON-NLS-1$
}
if (name != null) {
LegalTrafficSide side;
... | java | @Pure
public static LegalTrafficSide getPreferredLegalTrafficSide() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
String name = null;
if (prefs != null) {
name = prefs.get("LEGAL_TRAFFIC_SIDE", null); //$NON-NLS-1$
}
if (name != null) {
LegalTrafficSide side;
... | [
"@",
"Pure",
"public",
"static",
"LegalTrafficSide",
"getPreferredLegalTrafficSide",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"String",
"name",
"=",
"null",
... | Replies the preferred side of traffic for vehicles on road segments.
@return the preferred side of traffic for vehicles on road segments. | [
"Replies",
"the",
"preferred",
"side",
"of",
"traffic",
"for",
"vehicles",
"on",
"road",
"segments",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L317-L336 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredLegalTrafficSide | public static void setPreferredLegalTrafficSide(LegalTrafficSide side) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (side == null) {
prefs.remove("LEGAL_TRAFFIC_SIDE"); //$NON-NLS-1$
} else {
prefs.put("LEGAL_TRAFFIC_SIDE", side.name()... | java | public static void setPreferredLegalTrafficSide(LegalTrafficSide side) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (side == null) {
prefs.remove("LEGAL_TRAFFIC_SIDE"); //$NON-NLS-1$
} else {
prefs.put("LEGAL_TRAFFIC_SIDE", side.name()... | [
"public",
"static",
"void",
"setPreferredLegalTrafficSide",
"(",
"LegalTrafficSide",
"side",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"n... | Set the preferred side of traffic for vehicles on road segments.
@param side is the preferred side of traffic for vehicles on road segments. | [
"Set",
"the",
"preferred",
"side",
"of",
"traffic",
"for",
"vehicles",
"on",
"road",
"segments",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L342-L351 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredAttributeNameForTrafficDirection | @Pure
public static String getPreferredAttributeNameForTrafficDirection() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("TRAFFIC_DIRECTION_ATTR_NAME", DEFAULT_ATTR_TRAFFIC_DIRECTION); //$NON-NLS-1$
}
return DEFAULT_ATTR_TRAFFIC_... | java | @Pure
public static String getPreferredAttributeNameForTrafficDirection() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("TRAFFIC_DIRECTION_ATTR_NAME", DEFAULT_ATTR_TRAFFIC_DIRECTION); //$NON-NLS-1$
}
return DEFAULT_ATTR_TRAFFIC_... | [
"@",
"Pure",
"public",
"static",
"String",
"getPreferredAttributeNameForTrafficDirection",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
... | Replies the preferred name for the traffic direction on the roads.
@return the preferred name for the traffic direction on the roads.
@see #DEFAULT_ATTR_TRAFFIC_DIRECTION | [
"Replies",
"the",
"preferred",
"name",
"for",
"the",
"traffic",
"direction",
"on",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L358-L365 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredAttributeNameForTrafficDirection | public static void setPreferredAttributeNameForTrafficDirection(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_TRAFFIC_DIRECTION.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove(... | java | public static void setPreferredAttributeNameForTrafficDirection(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_TRAFFIC_DIRECTION.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove(... | [
"public",
"static",
"void",
"setPreferredAttributeNameForTrafficDirection",
"(",
"String",
"name",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!="... | Set the preferred name for the traffic direction on the roads.
@param name is the preferred name for the traffic direction on the roads.
@see #DEFAULT_ATTR_TRAFFIC_DIRECTION | [
"Set",
"the",
"preferred",
"name",
"for",
"the",
"traffic",
"direction",
"on",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L372-L381 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredAttributeValueForTrafficDirection | @Pure
public static String getPreferredAttributeValueForTrafficDirection(TrafficDirection direction, int index) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
final StringBuilder b = new StringBuilder();
b.append("TRAFFIC_DIRECTION_VALUE_"); //$NO... | java | @Pure
public static String getPreferredAttributeValueForTrafficDirection(TrafficDirection direction, int index) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
final StringBuilder b = new StringBuilder();
b.append("TRAFFIC_DIRECTION_VALUE_"); //$NO... | [
"@",
"Pure",
"public",
"static",
"String",
"getPreferredAttributeValueForTrafficDirection",
"(",
"TrafficDirection",
"direction",
",",
"int",
"index",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
... | Replies the preferred value of traffic direction
used in the attributes for the traffic direction on the roads.
@param direction a direction.
@param index is the index of the supported string to reply
@return the preferred name for the traffic direction on the roads,
or <code>null</code> if there is no string value fo... | [
"Replies",
"the",
"preferred",
"value",
"of",
"traffic",
"direction",
"used",
"in",
"the",
"attributes",
"for",
"the",
"traffic",
"direction",
"on",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L391-L412 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredAttributeValuesForTrafficDirection | @Pure
public static List<String> getPreferredAttributeValuesForTrafficDirection(TrafficDirection direction) {
final List<String> array = new ArrayList<>();
int i = 0;
String value = getPreferredAttributeValueForTrafficDirection(direction, i);
while (value != null) {
array.add(value);
value = getPreferred... | java | @Pure
public static List<String> getPreferredAttributeValuesForTrafficDirection(TrafficDirection direction) {
final List<String> array = new ArrayList<>();
int i = 0;
String value = getPreferredAttributeValueForTrafficDirection(direction, i);
while (value != null) {
array.add(value);
value = getPreferred... | [
"@",
"Pure",
"public",
"static",
"List",
"<",
"String",
">",
"getPreferredAttributeValuesForTrafficDirection",
"(",
"TrafficDirection",
"direction",
")",
"{",
"final",
"List",
"<",
"String",
">",
"array",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"int",
"i... | Replies the preferred values of traffic direction
used in the attributes for the traffic direction on the roads.
@param direction aa direction
@return the preferred names for the traffic direction on the roads, never <code>null</code>. | [
"Replies",
"the",
"preferred",
"values",
"of",
"traffic",
"direction",
"used",
"in",
"the",
"attributes",
"for",
"the",
"traffic",
"direction",
"on",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L420-L430 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getSystemDefault | @Pure
public static String getSystemDefault(TrafficDirection direction, int valueIndex) {
// Values from the IGN-BDCarto standard
switch (direction) {
case DOUBLE_WAY:
switch (valueIndex) {
case 0:
return DEFAULT_DOUBLE_WAY_TRAFFIC_DIRECTION_0;
case 1:
return DEFAULT_DOUBLE_WAY_TRAFFIC_DIRECTION... | java | @Pure
public static String getSystemDefault(TrafficDirection direction, int valueIndex) {
// Values from the IGN-BDCarto standard
switch (direction) {
case DOUBLE_WAY:
switch (valueIndex) {
case 0:
return DEFAULT_DOUBLE_WAY_TRAFFIC_DIRECTION_0;
case 1:
return DEFAULT_DOUBLE_WAY_TRAFFIC_DIRECTION... | [
"@",
"Pure",
"public",
"static",
"String",
"getSystemDefault",
"(",
"TrafficDirection",
"direction",
",",
"int",
"valueIndex",
")",
"{",
"// Values from the IGN-BDCarto standard",
"switch",
"(",
"direction",
")",
"{",
"case",
"DOUBLE_WAY",
":",
"switch",
"(",
"value... | Replies the system default string-value for the traffic direction, at the
given index in the list of system default values.
@param direction is the direction for which the string value should be replied
@param valueIndex is the position of the string-value.
@return the string-value at the given position, never <code>n... | [
"Replies",
"the",
"system",
"default",
"string",
"-",
"value",
"for",
"the",
"traffic",
"direction",
"at",
"the",
"given",
"index",
"in",
"the",
"list",
"of",
"system",
"default",
"values",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L441-L484 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getSystemDefault | @Pure
public static String getSystemDefault(RoadType type) {
switch (type) {
case OTHER:
return DEFAULT_OTHER_ROAD_TYPE;
case PRIVACY_PATH:
return DEFAULT_PRIVACY_ROAD_TYPE;
case TRACK:
return DEFAULT_TRACK_ROAD_TYPE;
case BIKEWAY:
return DEFAULT_BIKEWAY_ROAD_TYPE;
case LOCAL_ROAD:
return DE... | java | @Pure
public static String getSystemDefault(RoadType type) {
switch (type) {
case OTHER:
return DEFAULT_OTHER_ROAD_TYPE;
case PRIVACY_PATH:
return DEFAULT_PRIVACY_ROAD_TYPE;
case TRACK:
return DEFAULT_TRACK_ROAD_TYPE;
case BIKEWAY:
return DEFAULT_BIKEWAY_ROAD_TYPE;
case LOCAL_ROAD:
return DE... | [
"@",
"Pure",
"public",
"static",
"String",
"getSystemDefault",
"(",
"RoadType",
"type",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"OTHER",
":",
"return",
"DEFAULT_OTHER_ROAD_TYPE",
";",
"case",
"PRIVACY_PATH",
":",
"return",
"DEFAULT_PRIVACY_ROAD_TYPE",
... | Replies the system-default value for the type of
road.
@param type a type
@return the system-default value.
@throws IllegalArgumentException if bad type. | [
"Replies",
"the",
"system",
"-",
"default",
"value",
"for",
"the",
"type",
"of",
"road",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L493-L519 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getSystemDefaults | @Pure
public static List<String> getSystemDefaults(TrafficDirection direction) {
final List<String> array = new ArrayList<>();
try {
int i = 0;
while (true) {
array.add(getSystemDefault(direction, i));
++i;
}
} catch (AssertionError e) {
throw e;
} catch (Throwable exception) {
//
}
... | java | @Pure
public static List<String> getSystemDefaults(TrafficDirection direction) {
final List<String> array = new ArrayList<>();
try {
int i = 0;
while (true) {
array.add(getSystemDefault(direction, i));
++i;
}
} catch (AssertionError e) {
throw e;
} catch (Throwable exception) {
//
}
... | [
"@",
"Pure",
"public",
"static",
"List",
"<",
"String",
">",
"getSystemDefaults",
"(",
"TrafficDirection",
"direction",
")",
"{",
"final",
"List",
"<",
"String",
">",
"array",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"try",
"{",
"int",
"i",
"=",
"... | Replies the system default string-values for the traffic direction.
@param direction is the direction for which the string values should be replied
@return the string-values, never <code>null</code> | [
"Replies",
"the",
"system",
"default",
"string",
"-",
"values",
"for",
"the",
"traffic",
"direction",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L526-L541 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredAttributeValueForTrafficDirection | public static void setPreferredAttributeValueForTrafficDirection(TrafficDirection direction, int index, String value) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
final StringBuilder keyName = new StringBuilder();
keyName.append("TRAFFIC_DIRECTIO... | java | public static void setPreferredAttributeValueForTrafficDirection(TrafficDirection direction, int index, String value) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
final StringBuilder keyName = new StringBuilder();
keyName.append("TRAFFIC_DIRECTIO... | [
"public",
"static",
"void",
"setPreferredAttributeValueForTrafficDirection",
"(",
"TrafficDirection",
"direction",
",",
"int",
"index",
",",
"String",
"value",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkCon... | Set the preferred value of traffic direction
used in the attributes for the traffic direction on the roads.
@param direction a direction.
@param index is the index of the supported string to reply
@param value is the preferred name for the traffic direction on the roads. | [
"Set",
"the",
"preferred",
"value",
"of",
"traffic",
"direction",
"used",
"in",
"the",
"attributes",
"for",
"the",
"traffic",
"direction",
"on",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L550-L571 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredRoadConnectionDistance | @Pure
public static double getPreferredRoadConnectionDistance() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.getDouble("ROAD_CONNECTION_DISTANCE", DEFAULT_ROAD_CONNECTION_DISTANCE); //$NON-NLS-1$
}
return DEFAULT_ROAD_CONNECTION_DI... | java | @Pure
public static double getPreferredRoadConnectionDistance() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.getDouble("ROAD_CONNECTION_DISTANCE", DEFAULT_ROAD_CONNECTION_DISTANCE); //$NON-NLS-1$
}
return DEFAULT_ROAD_CONNECTION_DI... | [
"@",
"Pure",
"public",
"static",
"double",
"getPreferredRoadConnectionDistance",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null",
... | Replies the preferred distance below which roads may be connected.
@return the preferred distance (in meters) below which roads may be connected. | [
"Replies",
"the",
"preferred",
"distance",
"below",
"which",
"roads",
"may",
"be",
"connected",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L602-L609 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredRoadConnectionDistance | public static void setPreferredRoadConnectionDistance(double distance) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (distance <= 0.) {
prefs.remove("ROAD_CONNECTION_DISTANCE"); //$NON-NLS-1$
} else {
prefs.putDouble("ROAD_CONNECTION_DI... | java | public static void setPreferredRoadConnectionDistance(double distance) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (distance <= 0.) {
prefs.remove("ROAD_CONNECTION_DISTANCE"); //$NON-NLS-1$
} else {
prefs.putDouble("ROAD_CONNECTION_DI... | [
"public",
"static",
"void",
"setPreferredRoadConnectionDistance",
"(",
"double",
"distance",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"n... | Set the preferred distance below which roads may be connected.
@param distance is the preferred distance (in meters) below which roads may be connected. | [
"Set",
"the",
"preferred",
"distance",
"below",
"which",
"roads",
"may",
"be",
"connected",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L615-L624 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredRoadType | @Pure
public static RoadType getPreferredRoadType() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
String name = null;
if (prefs != null) {
name = prefs.get("ROAD_TYPE", null); //$NON-NLS-1$
}
if (name != null) {
RoadType type;
try {
type = RoadType.value... | java | @Pure
public static RoadType getPreferredRoadType() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
String name = null;
if (prefs != null) {
name = prefs.get("ROAD_TYPE", null); //$NON-NLS-1$
}
if (name != null) {
RoadType type;
try {
type = RoadType.value... | [
"@",
"Pure",
"public",
"static",
"RoadType",
"getPreferredRoadType",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"String",
"name",
"=",
"null",
";",
"if",
"... | Replies the preferred type of road segment.
@return the preferred type of road segment. | [
"Replies",
"the",
"preferred",
"type",
"of",
"road",
"segment",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L630-L649 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredRoadType | public static void setPreferredRoadType(RoadType type) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (type == null) {
prefs.remove("ROAD_TYPE"); //$NON-NLS-1$
} else {
prefs.put("ROAD_TYPE", type.name()); //$NON-NLS-1$
}
}
} | java | public static void setPreferredRoadType(RoadType type) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (type == null) {
prefs.remove("ROAD_TYPE"); //$NON-NLS-1$
} else {
prefs.put("ROAD_TYPE", type.name()); //$NON-NLS-1$
}
}
} | [
"public",
"static",
"void",
"setPreferredRoadType",
"(",
"RoadType",
"type",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null",
")",
"... | Set the preferred type of road segment.
@param type is the preferred type of road segment. | [
"Set",
"the",
"preferred",
"type",
"of",
"road",
"segment",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L655-L664 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredAttributeNameForRoadType | @Pure
public static String getPreferredAttributeNameForRoadType() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("ROAD_TYPE_ATTR_NAME", DEFAULT_ATTR_ROAD_TYPE); //$NON-NLS-1$
}
return DEFAULT_ATTR_ROAD_TYPE;
} | java | @Pure
public static String getPreferredAttributeNameForRoadType() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("ROAD_TYPE_ATTR_NAME", DEFAULT_ATTR_ROAD_TYPE); //$NON-NLS-1$
}
return DEFAULT_ATTR_ROAD_TYPE;
} | [
"@",
"Pure",
"public",
"static",
"String",
"getPreferredAttributeNameForRoadType",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null",... | Replies the preferred name for the types of the roads.
@return the preferred name for the types of the roads.
@see #DEFAULT_ATTR_ROAD_TYPE | [
"Replies",
"the",
"preferred",
"name",
"for",
"the",
"types",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L671-L678 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredAttributeNameForRoadType | public static void setPreferredAttributeNameForRoadType(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_ROAD_TYPE.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove("ROAD_TYPE_ATTR_... | java | public static void setPreferredAttributeNameForRoadType(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_ROAD_TYPE.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove("ROAD_TYPE_ATTR_... | [
"public",
"static",
"void",
"setPreferredAttributeNameForRoadType",
"(",
"String",
"name",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"nul... | Set the preferred name for the types of the roads.
@param name is the preferred name for the types of the roads.
@see #DEFAULT_ATTR_ROAD_TYPE | [
"Set",
"the",
"preferred",
"name",
"for",
"the",
"types",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L685-L694 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredAttributeValueForRoadType | @Pure
public static String getPreferredAttributeValueForRoadType(RoadType type) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
final String v = prefs.get("ROAD_TYPE_VALUE_" + type.name(), null); //$NON-NLS-1$
if (v != null && !"".equals(v)) { //$N... | java | @Pure
public static String getPreferredAttributeValueForRoadType(RoadType type) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
final String v = prefs.get("ROAD_TYPE_VALUE_" + type.name(), null); //$NON-NLS-1$
if (v != null && !"".equals(v)) { //$N... | [
"@",
"Pure",
"public",
"static",
"String",
"getPreferredAttributeValueForRoadType",
"(",
"RoadType",
"type",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"... | Replies the preferred value of road type
used in the attributes for the types of the roads.
@param type a type
@return the preferred name for the given type of the roads. | [
"Replies",
"the",
"preferred",
"value",
"of",
"road",
"type",
"used",
"in",
"the",
"attributes",
"for",
"the",
"types",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L702-L712 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredAttributeValueForRoadType | public static void setPreferredAttributeValueForRoadType(RoadType type, String value) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
final String sysDef = getSystemDefault(type);
if (value == null || "".equals(value) || sysDef.equalsIgnoreCase(valu... | java | public static void setPreferredAttributeValueForRoadType(RoadType type, String value) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
final String sysDef = getSystemDefault(type);
if (value == null || "".equals(value) || sysDef.equalsIgnoreCase(valu... | [
"public",
"static",
"void",
"setPreferredAttributeValueForRoadType",
"(",
"RoadType",
"type",
",",
"String",
"value",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",... | Set the preferred value of road type
used in the attributes for the types of the roads.
@param type a type
@param value is the preferred name for the types of the roads. | [
"Set",
"the",
"preferred",
"value",
"of",
"road",
"type",
"used",
"in",
"the",
"attributes",
"for",
"the",
"types",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L720-L730 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredAttributeNameForRoadName | @Pure
public static String getPreferredAttributeNameForRoadName() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("ROAD_NAME_ATTR_NAME", DEFAULT_ATTR_ROAD_NAME); //$NON-NLS-1$
}
return DEFAULT_ATTR_ROAD_NAME;
} | java | @Pure
public static String getPreferredAttributeNameForRoadName() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("ROAD_NAME_ATTR_NAME", DEFAULT_ATTR_ROAD_NAME); //$NON-NLS-1$
}
return DEFAULT_ATTR_ROAD_NAME;
} | [
"@",
"Pure",
"public",
"static",
"String",
"getPreferredAttributeNameForRoadName",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null",... | Replies the preferred name for the name of the roads.
@return the preferred name for the name of the roads.
@see #DEFAULT_ATTR_ROAD_NAME | [
"Replies",
"the",
"preferred",
"name",
"for",
"the",
"name",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L737-L744 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredAttributeNameForRoadName | public static void setPreferredAttributeNameForRoadName(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_ROAD_NAME.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove("ROAD_NAME_ATTR_... | java | public static void setPreferredAttributeNameForRoadName(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_ROAD_NAME.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove("ROAD_NAME_ATTR_... | [
"public",
"static",
"void",
"setPreferredAttributeNameForRoadName",
"(",
"String",
"name",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"nul... | Set the preferred name for the name of the roads.
@param name is the preferred name for the name of the roads.
@see #DEFAULT_ATTR_ROAD_NAME | [
"Set",
"the",
"preferred",
"name",
"for",
"the",
"name",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L751-L760 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredAttributeNameForRoadNumber | @Pure
public static String getPreferredAttributeNameForRoadNumber() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("ROAD_NUMBER_ATTR_NAME", DEFAULT_ATTR_ROAD_NUMBER); //$NON-NLS-1$
}
return DEFAULT_ATTR_ROAD_NUMBER;
} | java | @Pure
public static String getPreferredAttributeNameForRoadNumber() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("ROAD_NUMBER_ATTR_NAME", DEFAULT_ATTR_ROAD_NUMBER); //$NON-NLS-1$
}
return DEFAULT_ATTR_ROAD_NUMBER;
} | [
"@",
"Pure",
"public",
"static",
"String",
"getPreferredAttributeNameForRoadNumber",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"null... | Replies the preferred name for the numbers of the roads.
@return the preferred name for the numbers of the roads.
@see #DEFAULT_ATTR_ROAD_NUMBER | [
"Replies",
"the",
"preferred",
"name",
"for",
"the",
"numbers",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L767-L774 | train |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.setPreferredAttributeNameForRoadNumber | public static void setPreferredAttributeNameForRoadNumber(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_ROAD_NUMBER.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove("ROAD_NUMBER... | java | public static void setPreferredAttributeNameForRoadNumber(String name) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (name == null || "".equals(name) || DEFAULT_ATTR_ROAD_NUMBER.equalsIgnoreCase(name)) { //$NON-NLS-1$
prefs.remove("ROAD_NUMBER... | [
"public",
"static",
"void",
"setPreferredAttributeNameForRoadNumber",
"(",
"String",
"name",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",
"n... | Set the preferred name for the numbers of the roads.
@param name is the preferred name for the numbers of the roads.
@see #DEFAULT_ATTR_ROAD_NUMBER | [
"Set",
"the",
"preferred",
"name",
"for",
"the",
"numbers",
"of",
"the",
"roads",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L781-L790 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.readDBFHeader | @SuppressWarnings("checkstyle:magicnumber")
public void readDBFHeader() throws IOException {
if (this.finished) {
throw new EOFDBaseFileException();
}
if (this.fieldCount != -1) {
// The header was already red
return;
}
//-----------------------------------------------------------
// Bytes ... | java | @SuppressWarnings("checkstyle:magicnumber")
public void readDBFHeader() throws IOException {
if (this.finished) {
throw new EOFDBaseFileException();
}
if (this.fieldCount != -1) {
// The header was already red
return;
}
//-----------------------------------------------------------
// Bytes ... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:magicnumber\"",
")",
"public",
"void",
"readDBFHeader",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"this",
".",
"finished",
")",
"{",
"throw",
"new",
"EOFDBaseFileException",
"(",
")",
";",
"}",
"if",
"(",
... | Read the header of the DBF file.
@throws IOException in case of error. | [
"Read",
"the",
"header",
"of",
"the",
"DBF",
"file",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L466-L559 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.getDBFFieldName | @Pure
public String getDBFFieldName(int index) {
if (this.fieldCount != -1) {
try {
final DBaseFileField field = this.fields.get(index);
if (field != null) {
return field.getName();
}
} catch (Exception exception) {
//
}
}
return null;
} | java | @Pure
public String getDBFFieldName(int index) {
if (this.fieldCount != -1) {
try {
final DBaseFileField field = this.fields.get(index);
if (field != null) {
return field.getName();
}
} catch (Exception exception) {
//
}
}
return null;
} | [
"@",
"Pure",
"public",
"String",
"getDBFFieldName",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"this",
".",
"fieldCount",
"!=",
"-",
"1",
")",
"{",
"try",
"{",
"final",
"DBaseFileField",
"field",
"=",
"this",
".",
"fields",
".",
"get",
"(",
"index",
"... | Replies the name of the i-th field.
@param index the index.
@return the name or <code>null</code> if the function {@link #readDBFFields()}
was never called. | [
"Replies",
"the",
"name",
"of",
"the",
"i",
"-",
"th",
"field",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L592-L605 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.getDBFFieldIndex | @Pure
public int getDBFFieldIndex(String name) {
assert name != null;
if (this.fieldCount != -1) {
try {
int i = 0;
for (final DBaseFileField field : this.fields) {
if (field != null && name.equals(field.getName())) {
return i;
}
++i;
}
} catch (Exception exception) {
//
... | java | @Pure
public int getDBFFieldIndex(String name) {
assert name != null;
if (this.fieldCount != -1) {
try {
int i = 0;
for (final DBaseFileField field : this.fields) {
if (field != null && name.equals(field.getName())) {
return i;
}
++i;
}
} catch (Exception exception) {
//
... | [
"@",
"Pure",
"public",
"int",
"getDBFFieldIndex",
"(",
"String",
"name",
")",
"{",
"assert",
"name",
"!=",
"null",
";",
"if",
"(",
"this",
".",
"fieldCount",
"!=",
"-",
"1",
")",
"{",
"try",
"{",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"final",
"D... | Replies the column index of the specified column name.
@param name the field name.
@return the index or <code>-1</code> if the columns was not found
or the function {@link #readDBFFields()} was never called | [
"Replies",
"the",
"column",
"index",
"of",
"the",
"specified",
"column",
"name",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L614-L631 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.getDBFFieldType | @Pure
public DBaseFieldType getDBFFieldType(int index) {
if (this.fieldCount != -1) {
try {
final DBaseFileField field = this.fields.get(index);
if (field != null) {
return field.getType();
}
} catch (Exception exception) {
//
}
}
return null;
} | java | @Pure
public DBaseFieldType getDBFFieldType(int index) {
if (this.fieldCount != -1) {
try {
final DBaseFileField field = this.fields.get(index);
if (field != null) {
return field.getType();
}
} catch (Exception exception) {
//
}
}
return null;
} | [
"@",
"Pure",
"public",
"DBaseFieldType",
"getDBFFieldType",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"this",
".",
"fieldCount",
"!=",
"-",
"1",
")",
"{",
"try",
"{",
"final",
"DBaseFileField",
"field",
"=",
"this",
".",
"fields",
".",
"get",
"(",
"ind... | Replies the type of the i-th field.
@param index the index.
@return the type or <code>null</code> if the function {@link #readDBFFields()}
was never called. | [
"Replies",
"the",
"type",
"of",
"the",
"i",
"-",
"th",
"field",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L640-L653 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.readDBFFields | @SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:magicnumber"})
public List<DBaseFileField> readDBFFields() throws IOException, EOFException {
if (this.fields != null) {
return this.fields;
}
if (this.finished) {
throw new EOFDBaseFileException();
}
if (this.fieldCount == -1) {
throw new... | java | @SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:magicnumber"})
public List<DBaseFileField> readDBFFields() throws IOException, EOFException {
if (this.fields != null) {
return this.fields;
}
if (this.finished) {
throw new EOFDBaseFileException();
}
if (this.fieldCount == -1) {
throw new... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:npathcomplexity\"",
",",
"\"checkstyle:magicnumber\"",
"}",
")",
"public",
"List",
"<",
"DBaseFileField",
">",
"readDBFFields",
"(",
")",
"throws",
"IOException",
",",
"EOFException",
"{",
"if",
"(",
"this",
".",
"f... | Read the field definitions.
Multiple calls to this method will return always the
same data structure. The column list is red only
at the first call to this function.
So you could use this method to obtain the list
of the dBASE file's columns.
<p>Instead of {@link #getDBFFields()}, this method
does not returns the valu... | [
"Read",
"the",
"field",
"definitions",
".",
"Multiple",
"calls",
"to",
"this",
"method",
"will",
"return",
"always",
"the",
"same",
"data",
"structure",
".",
"The",
"column",
"list",
"is",
"red",
"only",
"at",
"the",
"first",
"call",
"to",
"this",
"functio... | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L672-L773 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.skip | public void skip(int skipAmount) throws IOException {
if (this.recordCount == -1) {
throw new MustCallReadHeaderFunctionException();
}
if ((this.readingPosition + skipAmount) >= this.recordCount) {
throw new EOFException();
}
if (skipAmount > 0) {
this.readingPosition += skipAmount;
//this.stream.... | java | public void skip(int skipAmount) throws IOException {
if (this.recordCount == -1) {
throw new MustCallReadHeaderFunctionException();
}
if ((this.readingPosition + skipAmount) >= this.recordCount) {
throw new EOFException();
}
if (skipAmount > 0) {
this.readingPosition += skipAmount;
//this.stream.... | [
"public",
"void",
"skip",
"(",
"int",
"skipAmount",
")",
"throws",
"IOException",
"{",
"if",
"(",
"this",
".",
"recordCount",
"==",
"-",
"1",
")",
"{",
"throw",
"new",
"MustCallReadHeaderFunctionException",
"(",
")",
";",
"}",
"if",
"(",
"(",
"this",
"."... | Move the reading head by the specified record count amount.
<p>If the count of records to skip puts the reading head after
the last record, the exception {@link EOFException} is thrown.
@param skipAmount is the count of records to skip.
@throws IOException in case of error. | [
"Move",
"the",
"reading",
"head",
"by",
"the",
"specified",
"record",
"count",
"amount",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L810-L825 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.readRestOfDBFRecords | public List<DBaseFileRecord> readRestOfDBFRecords() throws IOException {
if (this.finished) {
throw new EOFDBaseFileException();
}
if (this.recordCount == -1) {
throw new MustCallReadHeaderFunctionException();
}
final Vector<DBaseFileRecord> records = new Vector<>();
try {
while (this.readingPosit... | java | public List<DBaseFileRecord> readRestOfDBFRecords() throws IOException {
if (this.finished) {
throw new EOFDBaseFileException();
}
if (this.recordCount == -1) {
throw new MustCallReadHeaderFunctionException();
}
final Vector<DBaseFileRecord> records = new Vector<>();
try {
while (this.readingPosit... | [
"public",
"List",
"<",
"DBaseFileRecord",
">",
"readRestOfDBFRecords",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"this",
".",
"finished",
")",
"{",
"throw",
"new",
"EOFDBaseFileException",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"recordCount",
... | Read all the records.
<p><strong>This method close the input stream !!!</strong>
<p>The returned value could take a lot
of memory. In this case, the virtual machine
could freeze when you try to access to the
collection content.
@return all the records
@throws IOException in case of error. | [
"Read",
"all",
"the",
"records",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L892-L914 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.readStringRecordValue | private int readStringRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData,
int rawOffset, OutputParameter<String> value) throws IOException {
final byte[] recordData = new byte[field.getLength()];
System.arraycopy(rawData, rawOffset, recordData, 0, recordData.length);
String data;
if (... | java | private int readStringRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData,
int rawOffset, OutputParameter<String> value) throws IOException {
final byte[] recordData = new byte[field.getLength()];
System.arraycopy(rawData, rawOffset, recordData, 0, recordData.length);
String data;
if (... | [
"private",
"int",
"readStringRecordValue",
"(",
"DBaseFileField",
"field",
",",
"int",
"nrecord",
",",
"int",
"nfield",
",",
"byte",
"[",
"]",
"rawData",
",",
"int",
"rawOffset",
",",
"OutputParameter",
"<",
"String",
">",
"value",
")",
"throws",
"IOException"... | Read a STRING record value.
@param field is the current parsed field.
@param nrecord is the number of the record
@param nfield is the number of the field
@param rawData raw data
@param rawOffset is the index at which the data could be obtained
@param value will be set with the value extracted from the dBASE file
@retu... | [
"Read",
"a",
"STRING",
"record",
"value",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1055-L1073 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.readDateRecordValue | @SuppressWarnings("checkstyle:magicnumber")
private static int readDateRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData,
int rawOffset, OutputParameter<Date> value) throws IOException {
final GregorianCalendar cal = new GregorianCalendar();
final int year = ((rawData[rawOffset] & 0xFF) ... | java | @SuppressWarnings("checkstyle:magicnumber")
private static int readDateRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData,
int rawOffset, OutputParameter<Date> value) throws IOException {
final GregorianCalendar cal = new GregorianCalendar();
final int year = ((rawData[rawOffset] & 0xFF) ... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:magicnumber\"",
")",
"private",
"static",
"int",
"readDateRecordValue",
"(",
"DBaseFileField",
"field",
",",
"int",
"nrecord",
",",
"int",
"nfield",
",",
"byte",
"[",
"]",
"rawData",
",",
"int",
"rawOffset",
",",
"Outp... | Read a DATE record value.
@param field is the current parsed field.
@param nrecord is the number of the record
@param nfield is the number of the field
@param rawData raw data
@param rawOffset is the index at which the data could be obtained
@param value will be set with the value extracted from the dBASE file
@return... | [
"Read",
"a",
"DATE",
"record",
"value",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1086-L1109 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.readNumberRecordValue | private static int readNumberRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData,
int rawOffset, OutputParameter<Double> value) throws IOException {
final String buffer = new String(rawData, rawOffset, field.getLength());
try {
final String b = buffer.trim();
if (b != null && b.length... | java | private static int readNumberRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData,
int rawOffset, OutputParameter<Double> value) throws IOException {
final String buffer = new String(rawData, rawOffset, field.getLength());
try {
final String b = buffer.trim();
if (b != null && b.length... | [
"private",
"static",
"int",
"readNumberRecordValue",
"(",
"DBaseFileField",
"field",
",",
"int",
"nrecord",
",",
"int",
"nfield",
",",
"byte",
"[",
"]",
"rawData",
",",
"int",
"rawOffset",
",",
"OutputParameter",
"<",
"Double",
">",
"value",
")",
"throws",
"... | Read a NUMBER record value.
@param field is the current parsed field.
@param nrecord is the number of the record
@param nfield is the number of the field
@param rawData raw data
@param rawOffset is the index at which the data could be obtained
@param value will be set with the value extracted from the dBASE file
@retu... | [
"Read",
"a",
"NUMBER",
"record",
"value",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1122-L1135 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.readBooleanRecordValue | @SuppressWarnings("checkstyle:magicnumber")
private static int readBooleanRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData,
int rawOffset, OutputParameter<Boolean> value) throws IOException {
final int byteCode = rawData[rawOffset] & 0xFF;
if (TRUE_CHARS.indexOf(byteCode) != -1) {
v... | java | @SuppressWarnings("checkstyle:magicnumber")
private static int readBooleanRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData,
int rawOffset, OutputParameter<Boolean> value) throws IOException {
final int byteCode = rawData[rawOffset] & 0xFF;
if (TRUE_CHARS.indexOf(byteCode) != -1) {
v... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:magicnumber\"",
")",
"private",
"static",
"int",
"readBooleanRecordValue",
"(",
"DBaseFileField",
"field",
",",
"int",
"nrecord",
",",
"int",
"nfield",
",",
"byte",
"[",
"]",
"rawData",
",",
"int",
"rawOffset",
",",
"O... | Read a BOOLEAN record value.
@param field is the current parsed field.
@param nrecord is the number of the record
@param nfield is the number of the field
@param rawData raw data
@param rawOffset is the index at which the data could be obtained
@param value will be set with the value extracted from the dBASE file
@ret... | [
"Read",
"a",
"BOOLEAN",
"record",
"value",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1148-L1164 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.read2ByteIntegerRecordValue | private static int read2ByteIntegerRecordValue(DBaseFileField field, int nrecord, int nfield,
byte[] rawData, int rawOffset, OutputParameter<Integer> value) throws IOException {
final short rawNumber = EndianNumbers.toLEShort(rawData[rawOffset], rawData[rawOffset + 1]);
try {
value.set(new Integer(rawNumber))... | java | private static int read2ByteIntegerRecordValue(DBaseFileField field, int nrecord, int nfield,
byte[] rawData, int rawOffset, OutputParameter<Integer> value) throws IOException {
final short rawNumber = EndianNumbers.toLEShort(rawData[rawOffset], rawData[rawOffset + 1]);
try {
value.set(new Integer(rawNumber))... | [
"private",
"static",
"int",
"read2ByteIntegerRecordValue",
"(",
"DBaseFileField",
"field",
",",
"int",
"nrecord",
",",
"int",
"nfield",
",",
"byte",
"[",
"]",
"rawData",
",",
"int",
"rawOffset",
",",
"OutputParameter",
"<",
"Integer",
">",
"value",
")",
"throw... | Read a 2 BYTE INTEGER record value.
@param field is the current parsed field.
@param nrecord is the number of the record
@param nfield is the number of the field
@param rawData raw data
@param rawOffset is the index at which the data could be obtained
@param value will be set with the value extracted from the dBASE fi... | [
"Read",
"a",
"2",
"BYTE",
"INTEGER",
"record",
"value",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1177-L1186 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.read4ByteIntegerRecordValue | @SuppressWarnings("checkstyle:magicnumber")
private static int read4ByteIntegerRecordValue(DBaseFileField field, int nrecord, int nfield,
byte[] rawData, int rawOffset, OutputParameter<Long> value) throws IOException {
final int rawNumber = EndianNumbers.toLEInt(
rawData[rawOffset], rawData[rawOffset + 1],
... | java | @SuppressWarnings("checkstyle:magicnumber")
private static int read4ByteIntegerRecordValue(DBaseFileField field, int nrecord, int nfield,
byte[] rawData, int rawOffset, OutputParameter<Long> value) throws IOException {
final int rawNumber = EndianNumbers.toLEInt(
rawData[rawOffset], rawData[rawOffset + 1],
... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:magicnumber\"",
")",
"private",
"static",
"int",
"read4ByteIntegerRecordValue",
"(",
"DBaseFileField",
"field",
",",
"int",
"nrecord",
",",
"int",
"nfield",
",",
"byte",
"[",
"]",
"rawData",
",",
"int",
"rawOffset",
",",... | Read a 4 BYTE INTEGER record value.
@param field is the current parsed field.
@param nrecord is the number of the record
@param nfield is the number of the field
@param rawData raw data
@param rawOffset is the index at which the data could be obtained
@param value will be set with the value extracted from the dBASE fi... | [
"Read",
"a",
"4",
"BYTE",
"INTEGER",
"record",
"value",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1199-L1211 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.read8ByteDoubleRecordValue | @SuppressWarnings("checkstyle:magicnumber")
private static int read8ByteDoubleRecordValue(DBaseFileField field, int nrecord, int nfield,
byte[] rawData, int rawOffset, OutputParameter<Double> value) throws IOException {
final double rawNumber = EndianNumbers.toLEDouble(
rawData[rawOffset], rawData[rawOffset +... | java | @SuppressWarnings("checkstyle:magicnumber")
private static int read8ByteDoubleRecordValue(DBaseFileField field, int nrecord, int nfield,
byte[] rawData, int rawOffset, OutputParameter<Double> value) throws IOException {
final double rawNumber = EndianNumbers.toLEDouble(
rawData[rawOffset], rawData[rawOffset +... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:magicnumber\"",
")",
"private",
"static",
"int",
"read8ByteDoubleRecordValue",
"(",
"DBaseFileField",
"field",
",",
"int",
"nrecord",
",",
"int",
"nfield",
",",
"byte",
"[",
"]",
"rawData",
",",
"int",
"rawOffset",
",",
... | Read a 8 BYTE DOUBLE record value.
@param field is the current parsed field.
@param nrecord is the number of the record
@param nfield is the number of the field
@param rawData raw data
@param rawOffset is the index at which the data could be obtained
@param value will be set with the value extracted from the dBASE fil... | [
"Read",
"a",
"8",
"BYTE",
"DOUBLE",
"record",
"value",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1224-L1238 | train |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.isColumnSelectable | @Pure
public boolean isColumnSelectable(DBaseFileField column) {
return column != null && (this.selectedColumns.isEmpty()
|| this.selectedColumns.contains(column));
} | java | @Pure
public boolean isColumnSelectable(DBaseFileField column) {
return column != null && (this.selectedColumns.isEmpty()
|| this.selectedColumns.contains(column));
} | [
"@",
"Pure",
"public",
"boolean",
"isColumnSelectable",
"(",
"DBaseFileField",
"column",
")",
"{",
"return",
"column",
"!=",
"null",
"&&",
"(",
"this",
".",
"selectedColumns",
".",
"isEmpty",
"(",
")",
"||",
"this",
".",
"selectedColumns",
".",
"contains",
"... | Replies if the specified column could be replied or ignored.
@param column the column.
@return <code>true</code> if the given column is selectable, otherwise <code>false</code> | [
"Replies",
"if",
"the",
"specified",
"column",
"could",
"be",
"replied",
"or",
"ignored",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1260-L1264 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/Encryption.java | Encryption.loadDefaultEncryptionModule | public static void loadDefaultEncryptionModule() {
// Be sure that the cryptographical algorithms are loaded
final Provider[] providers = Security.getProviders();
boolean found = false;
for (final Provider provider : providers) {
if (provider instanceof SunJCE) {
found = true;
break;
}
}
if (!... | java | public static void loadDefaultEncryptionModule() {
// Be sure that the cryptographical algorithms are loaded
final Provider[] providers = Security.getProviders();
boolean found = false;
for (final Provider provider : providers) {
if (provider instanceof SunJCE) {
found = true;
break;
}
}
if (!... | [
"public",
"static",
"void",
"loadDefaultEncryptionModule",
"(",
")",
"{",
"// Be sure that the cryptographical algorithms are loaded",
"final",
"Provider",
"[",
"]",
"providers",
"=",
"Security",
".",
"getProviders",
"(",
")",
";",
"boolean",
"found",
"=",
"false",
";... | Load the default encryption module.
<p>By default this is the SunJCE module. | [
"Load",
"the",
"default",
"encryption",
"module",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/Encryption.java#L106-L119 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/Encryption.java | Encryption.md5 | public static String md5(String str) {
if (str == null) {
return ""; //$NON-NLS-1$
}
final byte[] uniqueKey = str.getBytes();
byte[] hash = null;
try {
hash = MessageDigest.getInstance("MD5").digest(uniqueKey); //$NON-NLS-1$
} catch (NoSuchAlgorithmException e) {
throw new Error(Locale.getString(... | java | public static String md5(String str) {
if (str == null) {
return ""; //$NON-NLS-1$
}
final byte[] uniqueKey = str.getBytes();
byte[] hash = null;
try {
hash = MessageDigest.getInstance("MD5").digest(uniqueKey); //$NON-NLS-1$
} catch (NoSuchAlgorithmException e) {
throw new Error(Locale.getString(... | [
"public",
"static",
"String",
"md5",
"(",
"String",
"str",
")",
"{",
"if",
"(",
"str",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"//$NON-NLS-1$",
"}",
"final",
"byte",
"[",
"]",
"uniqueKey",
"=",
"str",
".",
"getBytes",
"(",
")",
";",
"byte",
... | Replies a MD5 key.
<p>MD5 was developed by Professor Ronald L. Rivest in 1994.
Its 128 bit (16 byte) message digest makes it a
faster implementation than SHA-1.
<p>The fingerprint (message digest) is
non-reversable.... your data cannot be retrieved from
the message digest, yet as stated earlier,
the digest uniquely i... | [
"Replies",
"a",
"MD5",
"key",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/Encryption.java#L136-L161 | train |
gallandarakhneorg/afc | advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/ifx/Path3ifx.java | Path3ifx.isMultiPartsProperty | public BooleanProperty isMultiPartsProperty() {
if (this.isMultipart == null) {
this.isMultipart = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_MULTIPARTS, false);
this.isMultipart.bind(Bindings.createBooleanBinding(() -> {
boolean foundOne = false;
for (final PathElementType type : innerTyp... | java | public BooleanProperty isMultiPartsProperty() {
if (this.isMultipart == null) {
this.isMultipart = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_MULTIPARTS, false);
this.isMultipart.bind(Bindings.createBooleanBinding(() -> {
boolean foundOne = false;
for (final PathElementType type : innerTyp... | [
"public",
"BooleanProperty",
"isMultiPartsProperty",
"(",
")",
"{",
"if",
"(",
"this",
".",
"isMultipart",
"==",
"null",
")",
"{",
"this",
".",
"isMultipart",
"=",
"new",
"ReadOnlyBooleanWrapper",
"(",
"this",
",",
"MathFXAttributeNames",
".",
"IS_MULTIPARTS",
"... | Replies the isMultiParts property.
@return the isMultiParts property. | [
"Replies",
"the",
"isMultiParts",
"property",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/ifx/Path3ifx.java#L388-L406 | train |
agmip/translator-dssat | src/main/java/org/agmip/translators/dssat/DssatWthFileHelper.java | DssatWthFileHelper.getWthInsiCodeOr | private String getWthInsiCodeOr(Map wthData) {
String insiName = getWthInsiCode(wthData);
if (insiName.equals("")) {
return getNextDefName();
} else {
return insiName;
}
} | java | private String getWthInsiCodeOr(Map wthData) {
String insiName = getWthInsiCode(wthData);
if (insiName.equals("")) {
return getNextDefName();
} else {
return insiName;
}
} | [
"private",
"String",
"getWthInsiCodeOr",
"(",
"Map",
"wthData",
")",
"{",
"String",
"insiName",
"=",
"getWthInsiCode",
"(",
"wthData",
")",
";",
"if",
"(",
"insiName",
".",
"equals",
"(",
"\"\"",
")",
")",
"{",
"return",
"getNextDefName",
"(",
")",
";",
... | Get the 4-bit institute code for weather file name, if not available from
data holder, then use default code
@param wthData Weather data holder
@return 4-bit institute code | [
"Get",
"the",
"4",
"-",
"bit",
"institute",
"code",
"for",
"weather",
"file",
"name",
"if",
"not",
"available",
"from",
"data",
"holder",
"then",
"use",
"default",
"code"
] | 4be61d998f106eb7234ea8701b63c3746ae688f4 | https://github.com/agmip/translator-dssat/blob/4be61d998f106eb7234ea8701b63c3746ae688f4/src/main/java/org/agmip/translators/dssat/DssatWthFileHelper.java#L64-L71 | train |
agmip/translator-dssat | src/main/java/org/agmip/translators/dssat/DssatWthFileHelper.java | DssatWthFileHelper.getWthInsiCode | public static String getWthInsiCode(Map wthData) {
String wst_name = getValueOr(wthData, "wst_name", "");
if (wst_name.matches("(\\w{4})|(\\w{8})")) {
return wst_name;
}
String wst_id = getValueOr(wthData, "wst_id", "");
if (wst_id.matches("(\\w{4})|(\\w{8})")) {
... | java | public static String getWthInsiCode(Map wthData) {
String wst_name = getValueOr(wthData, "wst_name", "");
if (wst_name.matches("(\\w{4})|(\\w{8})")) {
return wst_name;
}
String wst_id = getValueOr(wthData, "wst_id", "");
if (wst_id.matches("(\\w{4})|(\\w{8})")) {
... | [
"public",
"static",
"String",
"getWthInsiCode",
"(",
"Map",
"wthData",
")",
"{",
"String",
"wst_name",
"=",
"getValueOr",
"(",
"wthData",
",",
"\"wst_name\"",
",",
"\"\"",
")",
";",
"if",
"(",
"wst_name",
".",
"matches",
"(",
"\"(\\\\w{4})|(\\\\w{8})\"",
")",
... | Get the 4-bit institute code for weather file nam
@param wthData weather data holder
@return the 4-bit institute code | [
"Get",
"the",
"4",
"-",
"bit",
"institute",
"code",
"for",
"weather",
"file",
"nam"
] | 4be61d998f106eb7234ea8701b63c3746ae688f4 | https://github.com/agmip/translator-dssat/blob/4be61d998f106eb7234ea8701b63c3746ae688f4/src/main/java/org/agmip/translators/dssat/DssatWthFileHelper.java#L88-L105 | train |
agmip/translator-dssat | src/main/java/org/agmip/translators/dssat/DssatWthFileHelper.java | DssatWthFileHelper.getWthYearDuration | public static String getWthYearDuration(Map wthData) {
String yearDur = "";
ArrayList<Map> wthRecords = (ArrayList) getObjectOr(wthData, "dailyWeather", new ArrayList());
if (!wthRecords.isEmpty()) {
// Get the year of starting date and end date
String startYear = getValu... | java | public static String getWthYearDuration(Map wthData) {
String yearDur = "";
ArrayList<Map> wthRecords = (ArrayList) getObjectOr(wthData, "dailyWeather", new ArrayList());
if (!wthRecords.isEmpty()) {
// Get the year of starting date and end date
String startYear = getValu... | [
"public",
"static",
"String",
"getWthYearDuration",
"(",
"Map",
"wthData",
")",
"{",
"String",
"yearDur",
"=",
"\"\"",
";",
"ArrayList",
"<",
"Map",
">",
"wthRecords",
"=",
"(",
"ArrayList",
")",
"getObjectOr",
"(",
"wthData",
",",
"\"dailyWeather\"",
",",
"... | Get the last 2-bit year number and 2-bit of the duration for weather file
name
@param wthData weather data holder
@return the 4-bit number for year and duration | [
"Get",
"the",
"last",
"2",
"-",
"bit",
"year",
"number",
"and",
"2",
"-",
"bit",
"of",
"the",
"duration",
"for",
"weather",
"file",
"name"
] | 4be61d998f106eb7234ea8701b63c3746ae688f4 | https://github.com/agmip/translator-dssat/blob/4be61d998f106eb7234ea8701b63c3746ae688f4/src/main/java/org/agmip/translators/dssat/DssatWthFileHelper.java#L114-L140 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.