Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 31bdafc

Browse files
Initial version, added valuetypes
1 parent 32fdaab commit 31bdafc

File tree

90 files changed

+9167
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+9167
-0
lines changed

sysmlinjava/ApacheLicense.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package sysmlinjava;
2+
3+
/**
4+
* The Apache license text in comment form
5+
*
6+
* @author ModelerOne
7+
*
8+
*/
9+
public class ApacheLicense
10+
{
11+
/**
12+
* Copyright 2022 SysMLinJava, Inc. Belle Fourche, South Dakota, USA
13+
*
14+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
15+
* use this file except in compliance with the License. You may obtain a copy of
16+
* the License at
17+
*
18+
* http://www.apache.org/licenses/LICENSE-2.0
19+
*
20+
* Unless required by applicable law or agreed to in writing, software
21+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
22+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
23+
* License for the specific language governing permissions and limitations under
24+
* the License.
25+
*/
26+
}

sysmlinjava/MITLicense.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package sysmlinjava;
2+
3+
/**
4+
* MIT License text
5+
*
6+
* @author ModelerOne
7+
*
8+
*/
9+
public class MITLicense
10+
{
11+
/**
12+
* Copyright 2022 SysMLinJava, Inc. Belle Fourche, South Dakota, USA
13+
*
14+
* Permission is hereby granted, free of charge, to any person obtaining a copy
15+
* of this software and associated documentation files (the "Software"), to deal
16+
* in the Software without restriction, including without limitation the rights
17+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18+
* copies of the Software, and to permit persons to whom the Software is
19+
* furnished to do so, subject to the following conditions:
20+
*
21+
* The above copyright notice and this permission notice shall be included in
22+
* all copies or substantial portions of the Software.
23+
*
24+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30+
* SOFTWARE.
31+
*/
32+
}

sysmlinjava/package-info.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Root package for the SysMLinJava framework software. Reference this package's
3+
* directory when specifying the SysMLinJava directory for
4+
* the SysMLinJava TaskMaster™ application.
5+
*/
6+
package sysmlinjava;
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package sysmlinjava.valuetypes;
2+
3+
import sysmlinjava.units.SysMLinJavaUnits;
4+
5+
/**
6+
* SysMLinJava value type for acceleration in kilometers-per-hour-per-second
7+
*
8+
* @author ModelerOne
9+
*
10+
*/
11+
public class AccelerationKilometersPerHourPerSecond extends RReal
12+
{
13+
/** Serializable ID*/private static final long serialVersionUID = -1566489011777283872L;
14+
15+
/**
16+
* Constructor
17+
*
18+
* @param value double value to be used as initial value
19+
*/
20+
public AccelerationKilometersPerHourPerSecond(double value)
21+
{
22+
super(value);
23+
}
24+
25+
@Override
26+
protected void createUnits()
27+
{
28+
units = SysMLinJavaUnits.KilometersPerHourPerSecond;
29+
}
30+
31+
@Override
32+
public String toString()
33+
{
34+
return String.format("AccelerationKilometersPerHourPerSecond [value=%s, units=%s]", value, units);
35+
}
36+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package sysmlinjava.valuetypes;
2+
3+
import sysmlinjava.units.SysMLinJavaUnits;
4+
5+
/**
6+
* SysMLinJava value type for acceleration in meters/second/second
7+
*
8+
* @author ModelerOne
9+
*
10+
*/
11+
public class AccelerationMetersPerSecondPerSecond extends RReal
12+
{
13+
/** Serializable ID*/private static final long serialVersionUID = -1566489011777283872L;
14+
15+
/**
16+
* A constant value for the acceleration of gravity
17+
*/
18+
public static final AccelerationMetersPerSecondPerSecond gravity = new AccelerationMetersPerSecondPerSecond(9.80665);
19+
20+
/**
21+
* Constructor
22+
*
23+
* @param value value to be used for initial value
24+
*/
25+
public AccelerationMetersPerSecondPerSecond(double value)
26+
{
27+
super(value);
28+
}
29+
30+
@Override
31+
protected void createUnits()
32+
{
33+
units = SysMLinJavaUnits.MeterPerSecondSquared;
34+
}
35+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package sysmlinjava.valuetypes;
2+
3+
import sysmlinjava.units.SysMLinJavaUnits;
4+
5+
/**
6+
* SysMLinJava value type for air flow in cubic-meters/hour
7+
*
8+
* @author ModelerOne
9+
*
10+
*/
11+
public class AirFlowMetersCubedPerHour extends RReal
12+
{
13+
/** Serializable ID*/private static final long serialVersionUID = 7667078754166139009L;
14+
15+
/**
16+
* Constructor
17+
*
18+
* @param value value to be used for initial value
19+
*/
20+
public AirFlowMetersCubedPerHour(double value)
21+
{
22+
super(value);
23+
}
24+
25+
@Override
26+
protected void createUnits()
27+
{
28+
units = SysMLinJavaUnits.MetersCubicPerHour;
29+
}
30+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
package sysmlinjava.valuetypes;
2+
3+
import sysmlinjava.units.SysMLinJavaUnits;
4+
5+
/**
6+
* SysMLinJava value type for altitude in meters
7+
*
8+
* @author ModelerOne
9+
*
10+
*/
11+
public class AltitudeMeters extends RReal
12+
{
13+
/** Serializable ID*/private static final long serialVersionUID = -1566489011777283872L;
14+
15+
/**
16+
* Constructor
17+
*
18+
* @param value double value to be used for initial value
19+
*/
20+
public AltitudeMeters(double value)
21+
{
22+
super(value);
23+
}
24+
25+
/**
26+
* Constructor
27+
*
28+
* @param value RReal value to be used for initial value
29+
*/
30+
public AltitudeMeters(RReal value)
31+
{
32+
this(value.value);
33+
}
34+
35+
/**
36+
* Constructor
37+
*
38+
* @param value distance value to be used for initial value
39+
*/
40+
public AltitudeMeters(DistanceMeters value)
41+
{
42+
this(value.value);
43+
}
44+
45+
/**
46+
* Constructor - copy
47+
*
48+
* @param copied altitude whose value is to used for copy
49+
*/
50+
public AltitudeMeters(AltitudeMeters copied)
51+
{
52+
super(copied);
53+
}
54+
55+
@Override
56+
protected void createUnits()
57+
{
58+
units = SysMLinJavaUnits.Meters;
59+
}
60+
61+
@Override
62+
public String toString()
63+
{
64+
return String.format("AltitudeMeters [value=%s, units=%s]", value, units);
65+
}
66+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package sysmlinjava.valuetypes;
2+
3+
import sysmlinjava.units.SysMLinJavaUnits;
4+
5+
/**
6+
* SysMLinJava value type for area in square feet
7+
*
8+
* @author ModelerOne
9+
*
10+
*/
11+
public class AreaFeetSquare extends RReal
12+
{
13+
/** Serializable ID*/private static final long serialVersionUID = -1566489011777283872L;
14+
15+
/**
16+
* Constructor
17+
*
18+
* @param value initial value for square feet of area
19+
*/
20+
public AreaFeetSquare(double value)
21+
{
22+
super(value);
23+
}
24+
25+
/**
26+
* Copy constructor
27+
*
28+
* @param copyFrom value from which this is to be copied from
29+
*/
30+
public AreaFeetSquare(AreaFeetSquare copyFrom)
31+
{
32+
super(copyFrom.value);
33+
}
34+
35+
@Override
36+
protected void createUnits()
37+
{
38+
units = SysMLinJavaUnits.FeetSquare;
39+
}
40+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package sysmlinjava.valuetypes;
2+
3+
import sysmlinjava.units.SysMLinJavaUnits;
4+
5+
/**
6+
* SysMLinJava value type for area in square inches
7+
*
8+
* @author ModelerOne
9+
*
10+
*/
11+
public class AreaInchesSquare extends RReal
12+
{
13+
/** Serializable ID*/private static final long serialVersionUID = -1566489111777283872L;
14+
15+
/**
16+
* Constructor
17+
*
18+
* @param value initial value for square inches of area
19+
*/
20+
public AreaInchesSquare(double value)
21+
{
22+
super(value);
23+
}
24+
25+
/**
26+
* Copy constructor
27+
*
28+
* @param copyFrom value from which this is to be copied from
29+
*/
30+
public AreaInchesSquare(AreaInchesSquare copyFrom)
31+
{
32+
super(copyFrom.value);
33+
}
34+
35+
@Override
36+
protected void createUnits()
37+
{
38+
units = SysMLinJavaUnits.InchesSquare;
39+
}
40+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package sysmlinjava.valuetypes;
2+
3+
import sysmlinjava.units.SysMLinJavaUnits;
4+
5+
/**
6+
* SysMLinJava value type for area in square meters
7+
*
8+
* @author ModelerOne
9+
*
10+
*/
11+
public class AreaMetersSquare extends RReal
12+
{
13+
/** Serializable ID*/private static final long serialVersionUID = -1566489011777283872L;
14+
15+
/**
16+
* Constructor
17+
*
18+
* @param value double value to be used for initial value
19+
*/
20+
public AreaMetersSquare(double value)
21+
{
22+
super(value);
23+
}
24+
25+
/**
26+
* Constructor - copy
27+
*
28+
* @param copyFrom value of which this is to be a copy of
29+
*/
30+
public AreaMetersSquare(AreaMetersSquare copyFrom)
31+
{
32+
super(copyFrom.value);
33+
}
34+
35+
@Override
36+
protected void createUnits()
37+
{
38+
units = SysMLinJavaUnits.SquareMeter;
39+
}
40+
}

0 commit comments

Comments
 (0)