blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
d7f21eb6e0c94782ea684f1a317b14ca32c9200c
b348d5fd7dda290c5cf85a79fb39454c4cfa4419
/source/com.microsoft.tfs.jni/src/com/microsoft/tfs/jni/internal/unix/macos/SystemConfiguration.java
8beaabb314a8435e0d03756e3dbab60fc59e5a58
[ "MIT" ]
permissive
ForNeVeR/team-explorer-everywhere
6404d6a68baec205f526566196dbc6a7a7cba3ab
53c6af482fff2b69be7e027c55d20c2e4e38151e
refs/heads/master
2023-04-29T22:11:39.893078
2021-08-10T13:56:25
2021-11-26T06:58:59
192,899,236
0
0
NOASSERTION
2023-04-15T19:13:10
2019-06-20T10:22:33
Java
UTF-8
Java
false
false
666
java
package com.microsoft.tfs.jni.internal.unix.macos; import com.sun.jna.Library; import com.sun.jna.Native; import com.sun.jna.platform.mac.CoreFoundation; public interface SystemConfiguration extends Library { SystemConfiguration INSTANCE = Native.load("SystemConfiguration", SystemConfiguration.class); SCPreferencesRef SCPreferencesCreate( CoreFoundation.CFAllocatorRef allocator, CoreFoundation.CFStringRef name, CoreFoundation.CFStringRef prefsID); CoreFoundation.CFStringRef SCPreferencesGetHostName(SCPreferencesRef preferences); CoreFoundation.CFStringRef SCDynamicStoreCopyLocalHostName(SCDynamicStoreRef store); }
[ "ivan.migalev@jetbrains.com" ]
ivan.migalev@jetbrains.com
72649b9f0bd92f966da8cdc2c4955d5af85f85d4
95b3a688737b16f1c0b954dbad3132ac99e9d53a
/app/src/main/java/com/mad/groupexerciseorganiser/ui/SignupActivity.java
b7628c2c71d148b432b1334d0b14724e26cd1aa7
[]
no_license
Carl-Matheson/GroupExerciseOrganiser
d7e10a274ec0eb21eac52f8716c03e048d6b529e
59a2fe5864c8e6e8583b6854e148cf344b77e20b
refs/heads/master
2021-09-26T22:20:21.777559
2018-06-25T11:43:30
2018-06-25T11:43:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,037
java
package com.mad.groupexerciseorganiser.ui; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.Toast; import com.mad.groupexerciseorganiser.R; import com.mad.groupexerciseorganiser.signup.ISignUpView; import com.mad.groupexerciseorganiser.signup.SignUpPresenter; import butterknife.BindView; import butterknife.ButterKnife; /** * Handles all view related components to sign-up */ public class SignupActivity extends AppCompatActivity implements ISignUpView { SignUpPresenter mPresenter; private ProgressDialog mProgress; private static final String TAG = "SignupActivity"; @BindView(R.id.signup_firstName_txt) EditText mFirstNameText; @BindView(R.id.signup_lastName_txt) EditText mLastNameText; @BindView(R.id.signup_email_txt) EditText mEmailText; @BindView(R.id.signup_password_txt) EditText mPasswordText; @BindView(R.id.signup_radioGroup) RadioGroup mRadioGroup; @BindView(R.id.signup_register_btn) Button mRegisterBtn; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_signup); ButterKnife.bind(this); if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); } mPresenter = new SignUpPresenter(this, getApplicationContext()); mProgress = new ProgressDialog(this); mRegisterBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { signUpUser(); } }); } /** * Handles user input, passes it to the presenter, then to the interactor */ @Override public void signUpUser() { mProgress.setMessage(getString(R.string.register_prompt)); mProgress.show(); String firstName = mFirstNameText.getText().toString().trim(); String lastName = mLastNameText.getText().toString().trim(); String email = mEmailText.getText().toString().trim(); String password = mPasswordText.getText().toString().trim(); String type = getString(R.string.empty); int selectedUserType = mRadioGroup.getCheckedRadioButtonId(); //Handles the selected user type if (selectedUserType != -1) { RadioButton selectedRadioButton = findViewById(selectedUserType); type = selectedRadioButton.getText().toString(); } mPresenter.validateSignUp(firstName, lastName, email, password, type); } @Override public void signUpFailed(String error) { mProgress.dismiss(); Toast.makeText(getApplicationContext(), getString(R.string.error_prompt) + error, Toast.LENGTH_LONG).show(); Log.d(TAG, getString(R.string.signup_failed)); } @Override public void signUpSuccessful() { mProgress.dismiss(); Intent registerIntent = new Intent(SignupActivity.this, MainActivity.class); registerIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(registerIntent); } @Override public void emptyDetails() { mProgress.dismiss(); Toast.makeText(getApplicationContext(), R.string.emptyFields_prompt, Toast.LENGTH_LONG).show(); Log.d(TAG, getString(R.string.group_empty_details)); } @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == android.R.id.home) { finish(); } return super.onOptionsItemSelected(item); } }
[ "carlmatheson779@gmail.com" ]
carlmatheson779@gmail.com
43b0b9312b66e990e39d3f262d2f533fd6561c09
26ab7eebe8231791577f0f5c47a72a60bcd9d46d
/src/test/java/com/fasterxml/jackson/failing/JsonTypeInfoCustomResolver2811Test.java
fbaa47bf502f8044a841e62d233542d563630c64
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
Tobi1879/jackson-databind
4600a3feafd990f83692e93f7370bc6fbe043eb5
b0aab8ac5e2f633c18b95cf4a339c66238b95a97
refs/heads/master
2023-01-08T17:13:09.927215
2020-11-15T03:28:29
2020-11-15T03:28:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,866
java
package com.fasterxml.jackson.failing; import java.io.IOException; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver; import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase; public class JsonTypeInfoCustomResolver2811Test extends BaseMapTest { interface Vehicle { } static class Car implements Vehicle { public int wheels; public String color; } static class Bicycle implements Vehicle { public int wheels; public String bicycleType; } static class Person<T extends Vehicle> { public String name; public VehicleType vehicleType; @JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "vehicleType", defaultImpl = Car.class ) @JsonTypeIdResolver(VehicleTypeResolver.class) public T vehicle; } public enum VehicleType { CAR(Car.class), BICYCLE(Bicycle.class); public final Class<? extends Vehicle> vehicleClass; VehicleType(Class<? extends Vehicle> vehicleClass) { this.vehicleClass = vehicleClass; } } static class VehicleTypeResolver extends TypeIdResolverBase { JavaType superType; @Override public void init(JavaType bt) { this.superType = bt; } @Override public String idFromValue(DatabindContext ctxt, Object value) { return idFromValueAndType(ctxt, value, value.getClass()); } @Override public String idFromValueAndType(DatabindContext ctxt, Object value, Class<?> suggestedType) { // only to be called for default type but... return suggestedType.getSimpleName().toUpperCase(); } @Override public JavaType typeFromId(DatabindContext context, String id) throws IOException { Class<? extends Vehicle> vehicleClass; try { vehicleClass = VehicleType.valueOf(id).vehicleClass; } catch (IllegalArgumentException e) { throw new IOException(e.getMessage(), e); } return context.constructSpecializedType(superType, vehicleClass); } @Override public JsonTypeInfo.Id getMechanism() { return JsonTypeInfo.Id.NAME; } } private final ObjectMapper MAPPER = jsonMapperBuilder() .disable(DeserializationFeature.FAIL_ON_MISSING_EXTERNAL_TYPE_ID_PROPERTY) .disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE) .build(); // [databind#2811] public void testTypeInfoWithCustomResolver2811NoTypeId() throws Exception { String json = "{ \"name\": \"kamil\", \"vehicle\": {\"wheels\": 4, \"color\": \"red\"}}"; Person<?> person = MAPPER.readValue(json, Person.class); assertEquals("kamil", person.name); assertNull(person.vehicleType); assertNotNull(person.vehicle); assertEquals(Car.class, person.vehicle.getClass()); } // Passing case for comparison /* public void testTypeInfoWithCustomResolver2811WithTypeId() throws Exception { String json = "{\n" + " \"name\": \"kamil\",\n" + " \"vehicleType\": \"CAR\",\n" + " \"vehicle\": {\n" + " \"wheels\": 4,\n" + " \"color\": \"red\"\n" + " }\n" + "}" ; Person<?> person = MAPPER.readValue(json, Person.class); assertEquals("kamil", person.name); assertEquals(VehicleType.CAR, person.vehicleType); assertNotNull(person.vehicle); } */ }
[ "tatu.saloranta@iki.fi" ]
tatu.saloranta@iki.fi
879e8ea5f9452d12ba9a131aadaef565bc60f29a
2523116610808727a47adf68c7646e5c000e0b63
/src/main/java/com/toroto/pterosauria/config/RestConfig.java
c4088797f5cbf8770d489c8087b5ed09cbe1d1ce
[ "Apache-2.0" ]
permissive
yulinfox/pterosauria
4d26f9a0a9314ae70532f92e2656705df6e47af9
51e15692caeb2b25478e71a05b297638d8effb24
refs/heads/master
2023-03-18T12:49:50.110991
2021-03-10T08:49:28
2021-03-10T08:49:28
279,796,359
4
0
Apache-2.0
2021-03-10T08:49:29
2020-07-15T07:22:54
Java
UTF-8
Java
false
false
389
java
package com.toroto.pterosauria.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.client.RestTemplate; /** * @author yulinfu * @date 2020/7/15 */ @Configuration public class RestConfig { @Bean public RestTemplate restTemplate() { return new RestTemplate(); } }
[ "yulinfu@kungeek.com" ]
yulinfu@kungeek.com
aa54593ed635da6369e0b53fea775995b0efaf54
467293366a221a3632028304e3e51e5f51043bc1
/src/main/java/com/topjava/graduation/web/RestaurantController.java
a4c246cabb77cc9a443d12ac1fba7b982fd5fe94
[]
no_license
sombremachine/graduation
d91b6b39525e96f8e9e7db99ebc86f6ca8d8430c
96c8a9fc8451031351f6a4b3c672050df8326d05
refs/heads/master
2020-04-15T18:54:18.677543
2019-01-09T20:12:34
2019-01-09T20:12:34
164,929,963
0
0
null
null
null
null
UTF-8
Java
false
false
2,073
java
package com.topjava.graduation.web; import com.topjava.graduation.data.Restaurant; import com.topjava.graduation.service.RestaurantService; import com.topjava.graduation.service.response.RestaurantTo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.annotation.Secured; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import javax.validation.Valid; import java.net.URI; import java.util.List; @RestController @Secured("ROLE_ADMIN") @RequestMapping(RestaurantController.REST_URL) public class RestaurantController { static final String REST_URL = "/restaurant"; private final RestaurantService service; @Autowired public RestaurantController(RestaurantService service) { this.service = service; } @Secured("ROLE_USER") @GetMapping public List<RestaurantTo> getAll() { return service.getAll(); } @GetMapping("/{id}") public Restaurant get(@PathVariable("id") int id) { return service.get(id); } @PostMapping public ResponseEntity<Restaurant> createWithLocation(@Valid @RequestBody Restaurant restaurant) { Restaurant created = service.create(restaurant); URI uriOfNewResource = ServletUriComponentsBuilder.fromCurrentContextPath() .path(REST_URL + "/{id}") .buildAndExpand(created.getId()).toUri(); return ResponseEntity.created(uriOfNewResource).body(created); } @DeleteMapping("/{id}") @ResponseStatus(value = HttpStatus.NO_CONTENT) public void delete(@PathVariable("id") int id) { service.delete(id); } @PutMapping("/{id}") @ResponseStatus(value = HttpStatus.NO_CONTENT) public void update(@Valid @RequestBody Restaurant restaurant, @PathVariable("id") int id) { // assureIdConsistent(user, id); //{TODO:} service.update(restaurant); } }
[ "no@mail.here" ]
no@mail.here
a91ef03b7d8aa82b2e4ae9896a9e3dc90ee92dae
9e6b2f21dd4644d15fc19ee6ed54843516987939
/ThinkingInJava/src/rozdzial10/Cw02.java
c2cf6a56679812236263345878a5307fe54aabb3
[]
no_license
grzegul/JavaPlayground
7fa86dde2d3b76271021eebb7cd0b2d3fe4a129f
e1b78e5c2e1cd7caeb2cc56b51d1214516201da3
refs/heads/master
2020-12-30T15:42:55.384087
2017-05-13T12:02:21
2017-05-13T12:02:21
91,171,266
0
0
null
null
null
null
UTF-8
Java
false
false
205
java
package rozdzial10; public class Cw02 { private String ciag; public Cw02(String ciag){ this.ciag = ciag; } @Override public String toString(){ return "Ciag znakow: " + ciag; } }
[ "grzegul@gmail.com" ]
grzegul@gmail.com
dd5030cbd1a2ad1af99c247dddc3f2b4e0e33ab5
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_323/Testnull_32273.java
14c4d4af74a584406d1149404248e675eea2a000
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_323; import static org.junit.Assert.*; public class Testnull_32273 { private final Productionnull_32273 production = new Productionnull_32273("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f701736f16c2eebdc1506ab1c2e66d3582feb98f
687a5b7a82c80c37dcf5ea23dfab2c12f8cf9980
/src/main/java/com/youknow/book/springboot/domain/posts/Posts.java
14fd3089064265a4ba1fb1b3624618a28fb060d1
[]
no_license
youknow92/freelec-springboot2-webservice
e2ad394208e5944e8987a2065dcf04e84c2d0080
ceb618be23fb3a28314f3f04e89bbff492dfb964
refs/heads/master
2022-09-02T03:01:35.275103
2020-05-24T13:29:45
2020-05-24T13:29:45
262,746,236
0
0
null
null
null
null
UTF-8
Java
false
false
1,002
java
package com.youknow.book.springboot.domain.posts; import com.youknow.book.springboot.domain.BaseTimeEntity; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import javax.persistence.*; @Getter @NoArgsConstructor //기본 생성자 자동 추가 @Entity //테이블과 링크될 클래스임을 나타냄 public class Posts extends BaseTimeEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) //PK 생성규칙 private Long id; @Column(length = 500, nullable = false) //테이블의 컬럼을 나타냄 private String title; @Column(columnDefinition = "TEXT", nullable = false) private String content; private String author; @Builder public Posts(String title, String content, String author){ this.title = title; this.content = content; this.author = author; } public void update(String title, String content) { this.title = title; this.content = content; } }
[ "dbflwla1@gmail.com" ]
dbflwla1@gmail.com
009e543fb57ea7c8ffda70c9b3646c6478ca2e52
05d2f529428706ff47cb6904dff5fa1e436cc66e
/src/main/java/com/aplos/cms/appconstants/CmsAppConstants.java
d2a6751e047c357fdd5fec18c9a5701e73f603f4
[]
no_license
aplossystems/aplos-cms
c022675d096c4dd5fb9e8e9a1f8291161e270dd7
a92f18f50188d7a17eba0771c5d4655599f68499
refs/heads/master
2020-04-26T04:48:41.058918
2017-01-27T23:58:42
2017-01-27T23:58:42
38,503,895
0
0
null
null
null
null
UTF-8
Java
false
false
1,166
java
package com.aplos.cms.appconstants; public class CmsAppConstants { public static final String BLOG_ARCHIVE = "blogArchive"; public static final String BLOG_ENTRY_ID = "blogEntryId"; public static final String CMS_INNER_TEMPLATE_CONTENT_MAP = "cmsInnerTemplateContentMap"; public static final String CMS_MODULE_VERSION_MAJOR = "CmsModuleVersionMajor"; public static final String CMS_MODULE_VERSION_MINOR = "CmsModuleVersionMinor"; public static final String CMS_MODULE_VERSION_PATCH = "CmsModuleVersionPatch"; public static final String CMS_PAGE_CONTENT_HOLDER = "cmsPageContentHolder"; public static final String CMS_PAGE_REVISION_ID = "cpr_id"; public static final String CMS_PAGE_ID = "cp_id"; public static final String COMPANY_DETAILS_ID = "companyDetailsId"; public static final String DESIGNERS_MENU = "designersMenu"; public static final String FRONT_END_GENERATED_MENU_MAP = "frontendGeneratedMenuMap"; public static final String CASE_STUDY_ID = "caseStudyId"; public static final String PRODUCT_GROUP_PAGES = "productGroupPages"; public static final String SITE_ID = "siteId"; public static final String TEMPLATE_CLASS = "templateClass"; }
[ "info@aplossystems.co.uk" ]
info@aplossystems.co.uk
708e1467f668014fbab5f16e62cafcb2b6c0cc93
e7ce6a78596c3cf4863d240081a858b01119062b
/app/src/main/java/com/example/audiobook/BookTest.java
8da2ba70312f27066e0f5500a9466d7f0ed66292
[]
no_license
micaljohn60/AudioBook
6f93d0aaca648f6c957b11f4e7fb447aaa446f05
3cc2ad157f4a6315bed798d8a0229c68db6e5d6e
refs/heads/master
2020-04-17T13:56:27.056463
2019-01-20T09:47:40
2019-01-20T09:47:40
166,636,468
0
0
null
null
null
null
UTF-8
Java
false
false
58
java
package com.example.audiobook; public class BookTest { }
[ "micaljohn60@gmail.com" ]
micaljohn60@gmail.com
e28619da1b56ab60638b683f018e0854304d5faf
bb05fc62169b49e01078b6bd211f18374c25cdc9
/soft/form/src/com/chimu/form/description/DescriptionPack.java
4332f473ac264cca31e20c14a2ee376d41698b96
[]
no_license
markfussell/form
58717dd84af1462d8e3fe221535edcc8f18a8029
d227c510ff072334a715611875c5ae6a13535510
refs/heads/master
2016-09-10T00:12:07.602440
2013-02-07T01:24:14
2013-02-07T01:24:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,298
java
/*====================================================================== ** ** File: chimu/form/description/DescriptionPack.java ** ** Copyright (c) 1997-2000, ChiMu Corporation. All Rights Reserved. ** See the file COPYING for copying permission. ** ======================================================================*/ package com.chimu.form.description; import java.sql.Connection; import com.chimu.kernel.collections.*; import com.chimu.form.database.*; import com.chimu.form.database.product.*; import com.chimu.form.database.typeConstants.*; /** **/ public class DescriptionPack { static public DatabaseDescription newDatabaseDescription() { return new DatabaseDescriptionC(); } static public DatabaseDescription newDatabaseDescriptionFrom(DatabaseConnection dbConnection) { DatabaseDescription dbDesc = newDatabaseDescription(); dbDesc.initFrom(dbConnection); return dbDesc; } //************************************** //************************************** //************************************** static public CatalogDescription newCatalogDescription() { return new CatalogDescriptionC(); } static public CatalogDescription newCatalogDescriptionFrom(Catalog aCatalog) { CatalogDescription cd = new CatalogDescriptionC(); cd.initFrom(aCatalog); return cd; } //************************************** //************************************** //************************************** static public SchemeDescription newSchemeDescription() { return new SchemeDescriptionC(); } static public SchemeDescription newSchemeDescriptionFrom(Scheme aScheme){ SchemeDescription sd = new SchemeDescriptionC(); sd.initFrom(aScheme); return sd; } static public SchemeDescription newSchemeDescriptionFrom(Scheme aScheme, CatalogDescription cd){ SchemeDescription sd = new SchemeDescriptionC(); sd.initFrom(aScheme, cd); return sd; } //************************************** //************************************** //************************************** static public TableDescription newTableDescriptionFrom(Table aTable) { TableDescription table = new TableDescriptionC(); table.initFrom(aTable); return table; } static public TableDescription newTableDescriptionFrom(String tableName, SchemeDescription sd, String primaryKey) { TableDescription td = newTableDescription(tableName, primaryKey); td.setSchemeDescription(sd); td.setPrimaryKey(primaryKey); return td; } static public TableDescription newTableDescription(String name, List colList, String primaryKey) { TableDescription table = new TableDescriptionC(); table.setName(name); table.setPrimaryKey(primaryKey); table.setColumnsList(colList); return table; } static public TableDescription newTableDescription(String name, String primaryKey) { TableDescription table = new TableDescriptionC(); table.setName(name); table.setPrimaryKey(primaryKey); return table; } static public TableDescription newTableDescription(String name) { TableDescription table = new TableDescriptionC(); table.setName(name); return table; } //************************************** //************************************** //************************************** static public ColumnDescription newColumnDescription(String name, String sqlTypeString, boolean nullable) { ColumnDescription col = new ColumnDescriptionC(name, sqlTypeString, nullable); SqlDataType sqlType = SqlDataTypePack.typeFromKey(sqlTypeString); int typeInt = sqlType.code(); col.setSqlDataType(typeInt); return col; } //************************************** //************************************** //************************************** private DescriptionPack() {}; };
[ "mark.fussell@emenar.com" ]
mark.fussell@emenar.com
2a9686723748c348ebbeb90f10d1e20ea393d189
efc12c234a22bddd072e15c1d29ada4238636c4a
/app/src/main/java/sg/edu/np/s10177744connect/madassignment/Country.java
89da23acacc890695511215da6385d29c4887c5f
[]
no_license
JJSeah/Xplore
568d19e1d2d062eaeb65cbfb77d228b16e820da3
607e881f69a3853d5728fa8c73200ce02b5c7472
refs/heads/master
2021-07-15T17:27:16.788462
2020-06-08T12:39:51
2020-06-08T12:39:51
169,875,435
1
0
null
null
null
null
UTF-8
Java
false
false
2,452
java
package sg.edu.np.s10177744connect.madassignment; public class Country { public String Photo; public String Place; public String Num; public String Attraction; public String Address; public String Details; public String Status; public String Countryname; public String Visit; public int id; public byte[] image; public String Lag; public String Long; public Country() {} public Country(String a, String d, byte[] i, int Id) { Attraction = a; Details = d; image = i; id = Id; } public Country(String i ,String a, String d, String p, String s, String l) { Num = i; Attraction = a; Address = l; Details = d; Photo = p; Status = s; } public Country(int id, String a, String l) { this.id = id; Attraction = a; Address = l; } public Country(String a,String s) { Attraction = a; Status = s; } public Country(String a,String s, byte[] i) { Attraction = a; Status = s; image = i; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getAttraction() { return Attraction; } public void setAttraction(String Attraction) {this.Attraction = Attraction; } public String getAddress() { return Address; } public void setAddress(String Address) { this.Address = Address; } public String getPhoto() { return Photo; } public void setPhoto(String photo) { Photo = photo; } public String getStatus() { return Status; } public void setStatus(String status) { Status = status; } public String getDetails() { return Details; } public void setDetails(String details) { Details = details; } public String getCountryname() { return Countryname; } public void setCountryname(String countryname) { Countryname = countryname; } public String getVisit() { return Visit; } public void setVisit(String visit) { Visit = visit; } public byte[] getImage() { return image; } public void setImage(byte[] image) { this.image = image; } public String getLag() { return Lag; } public void setLag(String lag) { Lag = lag; } public String getLong() { return Long; } public void setLong(String aLong) { Long = aLong; } }
[ "jjseah00@gmail.com" ]
jjseah00@gmail.com
b4d91044593e0926cc8e26c139b161014855be23
edcdacdd276a5acc24d34041b9012b8b8eef1e74
/coffeeShopInterfaceAbstract/src/Concrete/NeroCustomerManager.java
c60f565106be94f5fe4a99ce5bf8ecae0c7632a5
[]
no_license
yahyaerdoan/JavaIntro
e518c9b25913ff98313b3d9e60964b01ea0da1d8
d9e96b9f5f0e84a05a0bc4a15ee60b73b5fd8948
refs/heads/master
2023-05-01T00:59:16.590890
2021-05-18T20:12:46
2021-05-18T20:12:46
360,321,109
1
0
null
null
null
null
ISO-8859-9
Java
false
false
593
java
package Concrete; import Abstract.BaseCustomerManager; import Abstract.CustomerCheckService; import Entities.Customer; public class NeroCustomerManager extends BaseCustomerManager { private CustomerCheckService customerCheckService; public NeroCustomerManager(CustomerCheckService customerCheckService) { super(); this.customerCheckService = customerCheckService; } @Override public void save(Customer customer) { if (customerCheckService.CheckIfRealPerson(customer)) { super.save(customer); } else { System.out.println("TC.Kimlik Doğrulama Yapılamadı!"); } } }
[ "77584301+yahyaerdoan@users.noreply.github.com" ]
77584301+yahyaerdoan@users.noreply.github.com
0d59f2370b0b341ff3a4529e4986809a400081d5
e37696807878afeb115afe05d80244bfb3d22a5b
/src/main/java/mediaDB/AudioVideo.java
c90fda738cb4fdf43d5d94e637ebbbac37b83733
[]
no_license
PaulWuesthoff/MediaDB
ff02f3202b3cf1c0c70c823f3a49aea428b9c1c4
3082d0710d5da01f86fa89b72ff12c1df725dfb6
refs/heads/master
2020-11-27T13:54:56.360605
2019-12-22T15:30:15
2019-12-22T15:30:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
74
java
package mediaDB; public interface AudioVideo extends Audio,Video { }
[ "33453018+Toast3P1C@users.noreply.github.com" ]
33453018+Toast3P1C@users.noreply.github.com
207357d080ba7256181bd4462f63b47d71148aec
2e688ce53f378dcaeb88f713021d98823ec8ff52
/app/src/main/java/com/miracle/rajdhani/bottomMenu/BlankFragment.java
4d54cb1af94ab71d39435a2a9891f4579e9f8ca6
[]
no_license
pradeep2424/HotelRajdhani
1775aac333587021e5eaaa7f61e4252a4031f8e2
3601126a8a67a992b381ed62c3bb5cebf83d59c2
refs/heads/master
2023-03-17T04:57:57.274759
2020-05-02T18:17:06
2020-05-02T18:17:06
260,742,522
0
0
null
null
null
null
UTF-8
Java
false
false
3,663
java
package com.miracle.rajdhani.bottomMenu; import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.fragment.app.Fragment; import com.miracle.rajdhani.R; /** * A simple {@link Fragment} subclass. * Activities that contain this fragment must implement the * {@link BlankFragment.OnFragmentInteractionListener} interface * to handle interaction events. * Use the {@link BlankFragment#newInstance} factory method to * create an instance of this fragment. */ public class BlankFragment extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; private OnFragmentInteractionListener mListener; public BlankFragment() { // Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param param1 Parameter 1. * @param param2 Parameter 2. * @return A new instance of fragment BlankFragment. */ // TODO: Rename and change types and number of parameters public static BlankFragment newInstance(String param1, String param2) { BlankFragment fragment = new BlankFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_blank, container, false); } // TODO: Rename method, update argument and hook method into UI event public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } } @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnFragmentInteractionListener) { mListener = (OnFragmentInteractionListener) context; } else { throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener"); } } @Override public void onDetach() { super.onDetach(); mListener = null; } /** * This interface must be implemented by activities that contain this * fragment to allow an interaction in this fragment to be communicated * to the activity and potentially other fragments contained in that * activity. * <p> * See the Android Training lesson <a href= * "http://developer.android.com/training/basics/fragments/communicating.html" * >Communicating with Other Fragments</a> for more information. */ public interface OnFragmentInteractionListener { // TODO: Update argument type and name void onFragmentInteraction(Uri uri); } }
[ "pradeepjadhav18@gmail.com" ]
pradeepjadhav18@gmail.com
d9b794fdad0ed9334fb42e5d474133b494d0430d
a7db0420a8c75b18379d5043cd1bf02c0ae96238
/src/com/android/mobilesocietynetwork/client/NetworkSetActivity.java
9aba47681894eaa38591ed57270caa60f534a4a6
[]
no_license
pfqian2016/MSNClient
176888563d417099cf87d15628a23284a85fe26c
48c2de5b5beb1a532a6890a33753d179e2471445
refs/heads/master
2020-05-30T11:05:01.181940
2017-02-21T03:24:33
2017-02-21T03:24:33
82,630,427
0
0
null
null
null
null
GB18030
Java
false
false
2,407
java
package com.android.mobilesocietynetwork.client; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.Window; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import com.android.mobilesocietynetwork.client.util.Constants; public class NetworkSetActivity extends Activity { private EditText etIP; private EditText etName; private EditText etPort; private Button btSubmit; private Button btQuit; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_network_set); initView(); initControl(); } private void initControl() { // TODO Auto-generated method stub MyOnClickListner setNetButtonOnclick = new MyOnClickListner(); btSubmit.setOnClickListener(setNetButtonOnclick); btQuit.setOnClickListener(setNetButtonOnclick); } private class MyOnClickListner implements OnClickListener { public void onClick(View arg0) { int buttonID = arg0.getId(); switch (buttonID) { case R.id.bt_Submit: //点击完成的响应 if (etIP.getText().toString().equals("")) { Toast.makeText(NetworkSetActivity.this, "Please set IP", 1).show(); break; } if (etName.getText().toString().equals("")) { Toast.makeText(NetworkSetActivity.this, "Please set server domain", 1).show(); break; } if (etPort.getText().toString().equals("")) { Toast.makeText(NetworkSetActivity.this, "Please set port", 1).show(); break; } Constants.SERVER_IP = etIP.getText().toString(); Constants.SERVER_NAME = etName.getText().toString(); Constants.SERVER_PORT= Integer.parseInt(etPort.getText().toString()); Toast.makeText(getApplicationContext(), "Set successfully", Toast.LENGTH_SHORT).show(); finish(); break; case R.id.bt_Quit: //点击取消 NetworkSetActivity.this.finish(); break; default: break; } } } private void initView() { // TODO Auto-generated method stub etIP = (EditText)findViewById(R.id.et_ip); etName = (EditText)findViewById(R.id.et_name); etPort = (EditText)findViewById(R.id.et_port); btSubmit = (Button)findViewById(R.id.bt_Submit); btQuit = (Button)findViewById(R.id.bt_Quit); } }
[ "qianpf0717@gmail.com" ]
qianpf0717@gmail.com
a78fa70233ae03954cac4b3421e966bc5ce781e6
79451f4fb364f8e27c4b74eb7395baf605675744
/src/com/javarush/test/level34/lesson15/big01/view/View.java
4ba2806374aaf7a362554890787ba9fcd60df473
[]
no_license
RoyalKremlin/JavaRush
bdb7227c87ee8d44a2c7d6cea1e37ab8dbe48c57
4ac94f91604bd2d5836735cdd17eacc019e93c99
refs/heads/master
2021-03-13T00:39:34.002897
2017-05-16T14:49:26
2017-05-16T14:49:26
91,470,059
0
0
null
null
null
null
UTF-8
Java
false
false
1,212
java
package com.javarush.test.level34.lesson15.big01.view; import com.javarush.test.level34.lesson15.big01.controller.Controller; import com.javarush.test.level34.lesson15.big01.controller.EventListener; import com.javarush.test.level34.lesson15.big01.model.GameObjects; import javax.swing.*; public class View extends JFrame { private Controller controller; private Field field; public View(Controller controller) { this.controller = controller; } public void setEventListener(EventListener eventListener) { field.setEventListener(eventListener); } public void init() { field = new Field(this); add(field); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setSize(800, 800); setLocationRelativeTo(null); setTitle("Сокобан"); setVisible(true); } public void update() { field.repaint(); } public GameObjects getGameObjects() { return controller.getGameObjects(); } public void completed(int level) { update(); JOptionPane.showMessageDialog(this, "LevelCompleted!"); controller.startNextLevel(); } }
[ "arazzadin666@gmail.com" ]
arazzadin666@gmail.com
887ed5d7a6e8f650a494e9d3993f320536b83f59
5cb5faa789f37112f86587c1ab3af3ad82fcea22
/src/day12_JavaRecap/Scanner_WarmupTask4.java
c67e5b1a53fc2385fd7ec332f66666fa851620b2
[]
no_license
silverhillus/Java_A-Z
b04d00589f6eb1a2b33ec9b20f18b5b48130af45
61fd6f894a9b40ee9ff32e99b15dcfe3d0bab99b
refs/heads/master
2022-10-29T17:05:32.045201
2020-06-15T21:18:16
2020-06-15T21:18:16
258,566,766
0
0
null
null
null
null
UTF-8
Java
false
false
1,201
java
package day12_JavaRecap; /* 4. Revenue can be calculated as the selling price of the product times the quantity sold, i.e. revenue = price × quantity. Write a program that asks the user to enter product price and quantity and then calculate the revenue. If the revenue is more than 5000 a discount is 10% offered. Program should display the discount and net revenue. */ import java.util.Scanner; public class Scanner_WarmupTask4 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter the product price and the quantity sold:"); double product = input.nextDouble(); int quantity = input.nextInt(); double revenue = product * quantity; double discount = revenue * 0.1; double netRevenue=revenue*0.9; if (revenue >= 5000) { System.out.println("The revenue is: $" + revenue); System.out.println("The 10 % discount you received is: $" + discount); System.out.println("The net revenue after discount is: $" +netRevenue ); } else { System.out.println("The revenue is: $" + revenue); } } }
[ "silverhillus@gmail.com" ]
silverhillus@gmail.com
bcafa7ee89b14e02c4ffdd943b0698fe80e1753b
2de9b979d44e221f520084fe30d0d4f4d0dc45ac
/product-service/src/main/java/pl/rmitula/productservice/model/converter/Converter.java
33b81dcd1ba56766aedb1d9f832cac132592ae69
[]
no_license
rmitula/spring-cloud-microservices
ee00f55a6b634da2290f17e4678af4e98da6ca90
f9622f953907079f1173c15bc5ce3d2f2f6c188d
refs/heads/master
2020-03-22T19:57:47.997826
2018-07-31T12:00:53
2018-07-31T12:00:53
140,564,079
0
1
null
2018-07-30T23:04:40
2018-07-11T11:10:50
Java
UTF-8
Java
false
false
878
java
package pl.rmitula.productservice.model.converter; import pl.rmitula.productservice.model.Product; import pl.rmitula.productservice.model.dto.ProductDTO; public class Converter { public static Product fromProductDto(ProductDTO productDTO) { Product product = new Product(); product.setId(productDTO.getId()); product.setName(productDTO.getName()); product.setQuanityInStock(productDTO.getQuanityInStock()); product.setPrice(productDTO.getPrice()); return product; } public static ProductDTO toProductDto(Product product) { ProductDTO productDTO = new ProductDTO(); productDTO.setId(product.getId()); productDTO.setName(product.getName()); productDTO.setQuanityInStock(product.getQuanityInStock()); productDTO.setPrice(product.getPrice()); return productDTO; } }
[ "rmitula@gmail.com" ]
rmitula@gmail.com
67ac8919a01533d7c405f7ae467640ee2367bf1b
19613033ecf65b0780b99f1039843f746e375eaa
/src/main/java/br/com/artemis/repository/SupplierRepository.java
6a69142426566b352cf91b0574ebc2dd782cb29c
[]
no_license
BulkSecurityGeneratorProject/artemis
162db3684d485b610ff05a899adbc0d16e448b1a
86b24c59229b1d4b5f1dc42173f068bc384ee8a9
refs/heads/master
2022-12-17T01:43:36.408690
2018-10-08T17:01:57
2018-10-08T17:01:57
296,606,656
0
0
null
2020-09-18T11:51:57
2020-09-18T11:51:56
null
UTF-8
Java
false
false
434
java
package br.com.artemis.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import br.com.artemis.domain.Product; import br.com.artemis.domain.Supplier; /** * Spring Data JPA repository for the Supplier entity. */ @SuppressWarnings("unused") @Repository public interface SupplierRepository extends JpaRepository<Supplier, Long> { }
[ "sapiensmagno@bol.com.br" ]
sapiensmagno@bol.com.br
174f3672e986047b2e76bdf9ae8d575428434fc0
b7612b5448e8728c40d78202e89e5b92727e41a9
/app/src/androidTest/java/com/android/mobilerecorder/ApplicationTest.java
5bb9a9633c8ebbc1f714f10a13ce0acca4a95c4f
[]
no_license
haydn111/MobileRecorder
c67ad8baa1df008043f3c714e874f2e30c5cda80
16419fb0366e0d408e3b0bdcddf02c76335dab00
refs/heads/master
2021-01-01T20:35:43.117651
2015-08-29T03:16:02
2015-08-29T03:16:02
41,577,079
0
0
null
null
null
null
UTF-8
Java
false
false
357
java
package com.android.mobilerecorder; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "haydn111@msn.cn" ]
haydn111@msn.cn
76e8af9ad2ca4c4cfb477672ff6b449912118d4c
3703527d82853288118cfbb60baaed448220d79c
/zyg-parent/zyg-item/zyg-item-service/src/main/java/com/zyg/item/mapper/StockMapper.java
1c1422bc6324010b39600ee3f8705ba2f31b7ff2
[]
no_license
zhangyuangang123/zyg
d1f6f45cac54d71d597b026dd2abd778c41a7697
d58cb4d8fa63d14a41d840c2509fcfd8876bce8d
refs/heads/master
2023-08-28T06:13:52.150327
2021-11-06T12:37:23
2021-11-06T12:37:23
333,321,368
0
0
null
null
null
null
UTF-8
Java
false
false
207
java
package com.zyg.item.mapper; import com.zyg.item.pojo.Stock; import tk.mybatis.mapper.common.Mapper; /** * Created by Administrator on 2020/10/4. */ public interface StockMapper extends Mapper<Stock>{ }
[ "a88615255" ]
a88615255
ee8e132fae5f203df84923f431a7817a9038358e
29a68bdf1eacb62eac7f106f0622e741d0295aec
/face_text_layout/src/main/java/la/juju/android/ftil/listeners/OnFaceTextClickListener.java
787cd76023985e42e18b781841c2d9b91be9102e
[]
no_license
razerdp/FaceTextLayout
8c4e5c6180d38988d99edd734e1d01202d3e520f
7e4f484a096eef382134f4b0b469d046a204c752
refs/heads/master
2023-08-29T07:45:09.496044
2016-02-28T11:50:26
2016-02-28T11:50:26
52,498,886
0
0
null
2016-02-25T05:19:00
2016-02-25T05:18:59
null
UTF-8
Java
false
false
221
java
package la.juju.android.ftil.listeners; import la.juju.android.ftil.entities.FaceText; /** * Created by HelloVass on 16/2/24. */ public interface OnFaceTextClickListener { void onFaceTextClick(FaceText faceText); }
[ "hellova33@gmail.com" ]
hellova33@gmail.com
d404bc5f78dda28bb23baf80723330ab121a234d
0f2565855ffd5035b60d165e4a7d66cd23f1655a
/nredis-proxy-core/src/main/java/com/opensource/netty/redis/proxy/core/config/LBRedisServerMasterCluster.java
8ab0b249501fc46fb35f0972cf029601511b075e
[]
no_license
shop-zhang/nredis-proxy
29bb4e442480ac452543916fd0ff19046fc31124
5aaae40eae2ff6536aa69e0902908bc297278f06
refs/heads/master
2021-09-08T05:28:05.593865
2018-03-07T15:51:01
2018-03-07T15:51:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,132
java
/** * */ package com.opensource.netty.redis.proxy.core.config; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.opensource.netty.redis.proxy.core.client.impl.AbstractPoolClient; import com.opensource.netty.redis.proxy.core.cluster.LoadBalance; import com.opensource.netty.redis.proxy.core.config.support.LBRedisServerBean; import com.opensource.netty.redis.proxy.core.config.support.LBRedisServerClusterBean; /** * 多主 * 集群模式配置 * * @author liubing * */ public class LBRedisServerMasterCluster implements Serializable { /** * */ private static final long serialVersionUID = 8481358070088941073L; private List<LBRedisServerClusterBean> redisServerClusterBeans; private Map<String, LBRedisServerClusterBean> ffanRedisServerClusterBeanMap=new HashMap<String, LBRedisServerClusterBean>(); /** 一主多从模式 */ private Map<String, List<LBRedisServerBean>> masterClusters = new HashMap<String, List<LBRedisServerBean>>(); /** 主集合 ***/ private List<LBRedisServerBean> masters = new ArrayList<LBRedisServerBean>(); private String redisProxyHost;//主机名 private int redisProxyPort;//端口号 private LoadBalance loadMasterBalance;//主的一致性算法 private Map<String, AbstractPoolClient> ffanRedisClientBeanMap =new HashMap<String, AbstractPoolClient>(); public LBRedisServerMasterCluster( List<LBRedisServerClusterBean> redisServerClusterBeans) { this.redisServerClusterBeans = redisServerClusterBeans; init(); } /** * 初始化 */ private void init() { if(redisServerClusterBeans!=null&&redisServerClusterBeans.size()>0){ for(LBRedisServerClusterBean ffanRedisServerClusterBean:redisServerClusterBeans){ masters.add(ffanRedisServerClusterBean.getFfanMasterRedisServerBean()); ffanRedisServerClusterBeanMap.put(ffanRedisServerClusterBean.getFfanMasterRedisServerBean().getKey(), ffanRedisServerClusterBean); masterClusters.put(ffanRedisServerClusterBean.getFfanMasterRedisServerBean().getKey(), ffanRedisServerClusterBean.getFfanRedisServerClusterBeans()); } } } /** * 获取指定主的多从 * @param key * @return */ public List<LBRedisServerBean> getMasterFfanRedisServerBean(String key){ if(masterClusters!=null&&masterClusters.containsKey(key)){ return masterClusters.get(key); } return null; } /** * 更新指定主的从 * 更改权重 * @param key * @param ffanRedisClusterBeans */ public void updateFfanRedisClusterBeans(String key,List<LBRedisServerBean> ffanRedisClusterBeans){ List<LBRedisServerBean> ffanRedisServerBeans=masterClusters.get(key); masterClusters.put(key, ffanRedisClusterBeans); if(ffanRedisServerBeans!=null){ for(LBRedisServerBean ffanRedisServerBean:ffanRedisServerBeans){//删除挂掉的从 if(!ffanRedisClusterBeans.contains(ffanRedisServerBean)){ if(ffanRedisClientBeanMap.containsKey(ffanRedisServerBean.getKey())){ ffanRedisClientBeanMap.remove(ffanRedisServerBean.getKey()); } } } if(ffanRedisServerClusterBeanMap.containsKey(key)){ LBRedisServerClusterBean ffanRedisServerClusterBean=ffanRedisServerClusterBeanMap.get(key); if(ffanRedisServerClusterBean.getFfanMasterRedisServerBean().getKey().equals(key)){ ffanRedisServerClusterBean.setFfanRedisServerClusterBeans(ffanRedisClusterBeans); } } for(LBRedisServerClusterBean ffanRedisServerClusterBean:redisServerClusterBeans){ if(ffanRedisServerClusterBean.getFfanMasterRedisServerBean().getKey().equals(key)){ ffanRedisServerClusterBean.setFfanRedisServerClusterBeans(ffanRedisClusterBeans); break; } } } } /** * 更改指定的主 * @param key * @param ffanRedisMasterBean */ public void updateFfanRedisMasterBean(String key,LBRedisServerBean ffanRedisMasterBean){ for(LBRedisServerBean ffanRedisServerBean :masters){ if(ffanRedisServerBean.getKey().equals(key)){ ffanRedisServerBean=ffanRedisMasterBean; break; } } for(LBRedisServerClusterBean ffanRedisServerClusterBean:redisServerClusterBeans){ if(ffanRedisServerClusterBean.getFfanMasterRedisServerBean().getKey().equals(key)){ ffanRedisServerClusterBean.setFfanMasterRedisServerBean(ffanRedisMasterBean); break; } } if(ffanRedisServerClusterBeanMap.containsKey(key)){ LBRedisServerClusterBean ffanRedisServerClusterBean=ffanRedisServerClusterBeanMap.get(key); if(ffanRedisServerClusterBean.getFfanMasterRedisServerBean().getKey().equals(key)){ ffanRedisServerClusterBean.setFfanMasterRedisServerBean(ffanRedisMasterBean); } } if(ffanRedisClientBeanMap.containsKey(key)){ AbstractPoolClient abstractPoolClient=ffanRedisClientBeanMap.get(ffanRedisMasterBean.getKey()); ffanRedisClientBeanMap.put(key, abstractPoolClient); } } /** * @return the masters */ public List<LBRedisServerBean> getMasters() { return masters; } /** * @return the redisServerClusterBeans */ public List<LBRedisServerClusterBean> getRedisServerClusterBeans() { return redisServerClusterBeans; } /** * 主挂了,移除元素 * @param key */ public void remove(String key){ if(ffanRedisServerClusterBeanMap.containsKey(key)){ ffanRedisServerClusterBeanMap.remove(key); } if(masterClusters.containsKey(key)){ masterClusters.remove(key); } if(ffanRedisClientBeanMap.containsKey(key)){ ffanRedisClientBeanMap.remove(key); } for(LBRedisServerBean ffanRedisServerBean :masters){ if(ffanRedisServerBean.getKey().equals(key)){ masters.remove(ffanRedisServerBean); break; } } for(LBRedisServerClusterBean ffanRedisServerClusterBean:redisServerClusterBeans){ if(ffanRedisServerClusterBean.getFfanMasterRedisServerBean().getKey().equals(key)){ redisServerClusterBeans.remove(ffanRedisServerClusterBean); break; } } } /** * 有主,无从 * @param key */ public void removeSlavesByMaster(String key){ if(ffanRedisServerClusterBeanMap.containsKey(key)){ ffanRedisServerClusterBeanMap.remove(key); } List<LBRedisServerBean> ffanRedisServerBeans=masterClusters.get(key); for(LBRedisServerBean ffanRedisServerBean:ffanRedisServerBeans){//删除主对应的从连接客户端 if(ffanRedisClientBeanMap.containsKey(ffanRedisServerBean.getKey())){ ffanRedisClientBeanMap.remove(ffanRedisServerBean.getKey()); } } if(masterClusters.containsKey(key)){//删除对应的主从 masterClusters.remove(key); } for(LBRedisServerClusterBean ffanRedisServerClusterBean:redisServerClusterBeans){//主存在,从不存在,删除对应的从 if(ffanRedisServerClusterBean.getFfanMasterRedisServerBean().getKey().equals(key)){ ffanRedisServerClusterBean.getFfanRedisServerClusterBeans().clear(); break; } } } public LBRedisServerClusterBean getFfanRedisServerClusterBean(String key){ if(ffanRedisServerClusterBeanMap.containsKey(key)){ return ffanRedisServerClusterBeanMap.get(key); } return null; } /** * @param redisServerClusterBeans * the redisServerClusterBeans to set */ public void setRedisServerClusterBeans( List<LBRedisServerClusterBean> redisServerClusterBeans) { this.redisServerClusterBeans = redisServerClusterBeans; } /** * @return the redisProxyHost */ public String getRedisProxyHost() { return redisProxyHost; } /** * @param redisProxyHost the redisProxyHost to set */ public void setRedisProxyHost(String redisProxyHost) { this.redisProxyHost = redisProxyHost; } /** * @return the redisProxyPort */ public int getRedisProxyPort() { return redisProxyPort; } /** * @param redisProxyPort the redisProxyPort to set */ public void setRedisProxyPort(int redisProxyPort) { this.redisProxyPort = redisProxyPort; } /** * @return the loadMasterBalance */ public LoadBalance getLoadMasterBalance() { loadMasterBalance.setFfanRedisServerMasterCluster(this); return loadMasterBalance; } /** * @param loadMasterBalance the loadMasterBalance to set */ public void setLoadMasterBalance(LoadBalance loadMasterBalance) { this.loadMasterBalance = loadMasterBalance; } /** * @return the ffanRedisServerClusterBeanMap */ public Map<String, LBRedisServerClusterBean> getFfanRedisServerClusterBeanMap() { return ffanRedisServerClusterBeanMap; } /** * @param ffanRedisServerClusterBeanMap the ffanRedisServerClusterBeanMap to set */ public void setFfanRedisServerClusterBeanMap( Map<String, LBRedisServerClusterBean> ffanRedisServerClusterBeanMap) { this.ffanRedisServerClusterBeanMap = ffanRedisServerClusterBeanMap; } /** * @return the ffanRedisClientBeanMap */ public Map<String, AbstractPoolClient> getFfanRedisClientBeanMap() { return ffanRedisClientBeanMap; } /** * @param ffanRedisClientBeanMap the ffanRedisClientBeanMap to set */ public void setFfanRedisClientBeanMap(Map<String, AbstractPoolClient> ffanRedisClientBeanMap) { this.ffanRedisClientBeanMap = ffanRedisClientBeanMap; } }
[ "songyuanyuan@360jk.com" ]
songyuanyuan@360jk.com
9189e6720612257d422e5b56f43a0ef20eb18f3b
8344528b9d902c6f2859c0a0c82bc3ef0bff472c
/src/nl/jessegeerts/discordbots/poedelbot/util/Args.java
536480c4686ab189b6b0602fd9500e203c7813f9
[]
no_license
jesgeerts/PoedelBot
be9a60afa75e71dea3a9eaf8a870ad072ab33415
fa52b65af3d13b89395b02fb9a766836b8552cb1
refs/heads/master
2021-03-27T11:54:24.445288
2018-05-01T18:22:00
2018-05-01T18:22:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
680
java
package nl.jessegeerts.discordbots.poedelbot.util; public class Args { public final String banandkick(String[] args){ String msg = ""; String[] arrayOfString; int j = (arrayOfString = args).length; for (int i = 1; i < j; i++) { String a = arrayOfString[i]; msg = msg + " " + a; } return msg; } public final String regular(String[] args){ String msg = ""; String[] arrayOfString; int j = (arrayOfString = args).length; for (int i = 0; i < j; i++) { String a = arrayOfString[i]; msg = msg + " " + a; } return msg; } }
[ "me@jessegeerts.nl" ]
me@jessegeerts.nl
23916f683e587654c2aa0f4a7c2734eb13fa1d1f
adb6c023e9051d4a5d3be1bc530b43946a261e03
/src/main/java/com/example/userprofile/HomePage/IHomePage.java
6b5439f9f13925eba4fe48747237fbb66e2d1356
[]
no_license
vivekmaheshsahu/Glide
381ad2497061fa3e76893ef91d250a88a00352ca
b90b038e0315f4a32e2ee806c5e2850e6bbb51af
refs/heads/master
2022-11-27T21:02:24.819128
2020-08-13T15:04:03
2020-08-13T15:04:03
287,309,898
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package com.example.userprofile.HomePage; import java.util.List; import com.example.userprofile.Data.Candidate_details; public interface IHomePage { void setAdapter(List<Candidate_details> candidate_data); void hideprogressbar(); void errorDisplay(); }
[ "vivekmaheshsahu@gmail.com" ]
vivekmaheshsahu@gmail.com
c0066fc9c42c88b33995ae0967b7c7c71238f3ae
d834398d37713784fd79d9ffad6be129eeaa2b61
/src/main/java/com/shop/repository/CartRepository.java
34e57ad0369a91f64cac2f0a6076fb1d3cdee5af
[]
no_license
byeungoo/shop
5bd8edf370206b4e19cf33a14f2e758d39f2cfe5
d540e0e411ce4d7bb505d91d1da4364eab8cef27
refs/heads/master
2023-02-07T18:55:57.995905
2020-12-28T06:22:25
2020-12-28T06:22:25
293,307,609
0
1
null
null
null
null
UTF-8
Java
false
false
234
java
package com.shop.repository; import com.shop.entity.Cart; import org.springframework.data.jpa.repository.JpaRepository; public interface CartRepository extends JpaRepository<Cart, Long> { Cart findByMemberId(Long memberId); }
[ "dksekfldks65@naver.com" ]
dksekfldks65@naver.com
6ba4a331eb583df8ba5912cd64603ea434d56cac
22d378cd64f315141d5bdc3584039b20a25bcd29
/src/zwf/service/impl/ProjectServiceImpl.java
231e8e2d2203ba720700ae733d21d7338fe5e962
[]
no_license
tanbinh123/Hospital-13
3660d2f246cff5fe0251b1ce495a14a68347918b
5523520bc45c59480b7128bbb0a07a1cdd9825d6
refs/heads/master
2023-03-24T08:26:26.259100
2019-12-19T12:13:43
2019-12-19T12:13:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
730
java
package zwf.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import zwf.dao.ProjectDao; import zwf.po.Project; import zwf.service.ProjectService; @Service @Transactional public class ProjectServiceImpl implements ProjectService { @Autowired private ProjectDao projectDao; @Override public List<Project> selectproject(String condition, Integer project_category) { return this.projectDao.selectproject(condition, project_category); } @Override public int gstCountproject(String condition) { return this.projectDao.gstCountproject(condition); } }
[ "sollan@qq.com" ]
sollan@qq.com
ca68545b6e8a8196076b8907bdfc40699ae62efe
990ec1f31dffa04eb232313e08720d7c375970cf
/src/file/UpLoad2Servlet.java
e5bc36475208ca561f5f03cf8252efd714c587ff
[]
no_license
MrFengHa/MyFristJavaWebProject
07d9a1196b373187cab139bb7f0b3911e149b50b
cb467e13bad29948a08f852c1ba4673145fb4b6b
refs/heads/master
2021-03-08T05:22:57.787463
2020-04-11T16:28:48
2020-04-11T16:28:48
246,320,379
0
0
null
null
null
null
UTF-8
Java
false
false
2,442
java
package file; /** * 文件描述 * * @Author 冯根源 * @create 2020/4/9 11:15 */ import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; import java.util.List; /** *文件描述 * *@author 冯根源 *@date 2020/4/9 11:15 */ @WebServlet(name = "UpLoad2Servlet", urlPatterns = "/UpLoad2Servlet") public class UpLoad2Servlet extends HttpServlet { @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //请求访问编码 request.setCharacterEncoding("UTF-8"); //响应编码 response.setContentType("text/html;charset=utf-8"); /** * 上传三步 * 1.得到工厂 * 2.通过工厂创建解析器 * 3.解析request,得到FileItem集合 * 4.遍历FileItem集合,调用其Api完成文件的保存 */ DiskFileItemFactory itemFactory = new DiskFileItemFactory(); ServletFileUpload servletFileUpload = new ServletFileUpload(itemFactory); try { List<FileItem> fileItems= servletFileUpload.parseRequest(request); FileItem item1 = fileItems.get(0); FileItem item2 = fileItems.get(1); System.out.println("普通表单项:"+item1.getFieldName()+"="+item1.getString("UTF-8")); System.out.println("文件表单项演示:"); System.out.println("ContentType:"+item2.getContentType()); System.out.println("size:"+item2.getSize()); System.out.println("fileName:"+item2.getName()); //保存文件 File file = new File("d:/"+item2.getName()); item2.write(file); } catch (FileUploadException e) { throw new RuntimeException(e); } catch (Exception e) { e.printStackTrace(); } } @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } }
[ "1109179567@qq.com" ]
1109179567@qq.com
660170213701b7e92bb1346f92b7a2762d4073bd
e6411bdc26b6b965bffb7b332217c123d7569a62
/src/Core/ConnectMySQL.java
55199d86dc703f64318c935c384f391876062153
[]
no_license
hieuemmm/SalesManager_JavaSwing
f304036e64a6fd060f1dda69960567c21877cac6
501ff219c1cbd9544d948a41b0f4f5fe26d44c83
refs/heads/master
2023-04-27T07:05:47.713988
2021-05-20T16:06:58
2021-05-20T16:06:58
368,486,977
0
0
null
null
null
null
UTF-8
Java
false
false
881
java
package Core; import java.sql.DriverManager; import java.sql.SQLException; import com.mysql.jdbc.Connection; public class ConnectMySQL { public ConnectMySQL() { } public static Connection getJDBCConnection() throws ClassNotFoundException, SQLException { Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost:3306/QuanLyBanHang_JavaSwing?useSSL=false"; String user = "root"; String password = ""; Connection connection = (Connection) DriverManager.getConnection(url, user, password); return connection; } // public static void main(String[] args) throws ClassNotFoundException, SQLException { // if (getJDBCConnection()!= null){ // System.err.println("Ket noi Thanh cong"); // } else { // System.err.println("Ket noi That Bai"); // } // } }
[ "hieus247@gmail.com" ]
hieus247@gmail.com
15d36b3a539f6ec3f34586416efe3da4a485acfb
1cee898f3dd37047b4cdbefb32ef5cf91a4c67a4
/src/lesson16/List2.java
404b37dca820bdfd46040159498806c702eb533e
[]
no_license
k-nish/Java_nyuumon
600d939e7ca9f9ffded98b64a882c0f1e4cf967c
373cd54fab49e3ef5eab99bd25acad0dbc4ea3a9
refs/heads/master
2021-01-10T09:32:55.363876
2016-03-02T06:29:03
2016-03-02T06:29:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
577
java
package lesson16; import java.awt.FlowLayout; import javax.swing.*; public class List2 { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ JFrame frame = new JFrame("はじめてのGUI"); JLabel label = new JLabel("Hello World"); JButton button = new JButton("押してね"); frame.getContentPane().setLayout(new FlowLayout()); frame.getContentPane().add(label); frame.getContentPane().add(button); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(300, 100); frame.setVisible(true); } }
[ "koh.oct.un@gmail.com" ]
koh.oct.un@gmail.com
9f040caa24085eaf65ddef786bc7a5a4b3c7fd8c
aae553839fac431e0c354d003f3596b76a27c45b
/app/src/main/java/recyclercard/adx2099/com/recyclercardview/adapters/MyAdapter.java
6b65067d9e3368c9a71cab8fdc23f0a554b6de74
[]
no_license
ADX2099/ProjectManagmentDocs
64dd61b81ca596be8ad1414d5c6baeb8aeb73e62
fe161b1eaec70f4bcca6bce414bf4e6c331b58bf
refs/heads/master
2020-04-14T18:15:33.420406
2019-01-03T19:59:13
2019-01-03T19:59:13
164,011,993
0
0
null
null
null
null
UTF-8
Java
false
false
2,528
java
package recyclercard.adx2099.com.recyclercardview.adapters; import android.content.Context; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.squareup.picasso.Picasso; import java.util.List; import recyclercard.adx2099.com.recyclercardview.models.Movie; import recyclercard.adx2099.com.recyclercardview.R; public class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> { private List<Movie> movies; private int layout; private OnItemClickListener clickListener; private Context context; public MyAdapter(List<Movie> movies, int layout, OnItemClickListener clickListener){ this.movies = movies; this.layout = layout; this.clickListener = clickListener; } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int i) { View v = LayoutInflater.from(parent.getContext()).inflate(layout, parent, false); context = parent.getContext(); ViewHolder vh = new ViewHolder(v); return vh; } @Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { holder.bind(movies.get(position), clickListener); } @Override public int getItemCount() { return movies.size(); } public class ViewHolder extends RecyclerView.ViewHolder{ public TextView textViewName; public ImageView imageViewPoster; public ViewHolder(@NonNull View itemView) { super(itemView); textViewName = (TextView) itemView.findViewById(R.id.textViewTitle); imageViewPoster = (ImageView) itemView.findViewById(R.id.imageViewPoster); } public void bind(final Movie movie, final OnItemClickListener clickListener){ textViewName.setText(movie.getName()); Picasso.get().load(movie.getPoster()).fit().into(imageViewPoster); //imageViewPoster.setImageResource(movie.getPoster()); itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { clickListener.onItemClick(movie, getAdapterPosition()); } }); } } public interface OnItemClickListener{ void onItemClick(Movie movie, int position); } }
[ "radagasth@gmail.com" ]
radagasth@gmail.com
17a0e031927be48a3ffda91dbf2b911c36ea24ea
93a67a0fd2da342bdb4bab53f421e435f26794e3
/componentmodule/src/main/java/com/shuiyinhuo/component/mixdev/utils/pkg/domain/anim/PercentLayoutInfo.java
b9cfcc2f81be3d107f1e1f21c23bfb62f2fc1999
[]
no_license
pgyszhh/h5_bridge
d7ed0565fad19008a9b2fb38e52c59e9c5563181
7c08122163318c1f7f93a1468ac2c339568e54d5
refs/heads/master
2020-09-08T22:20:04.134231
2019-11-12T16:27:11
2019-11-12T16:27:11
221,258,426
1
0
null
null
null
null
UTF-8
Java
false
false
6,543
java
package com.shuiyinhuo.component.mixdev.utils.pkg.domain.anim; import android.support.v4.view.MarginLayoutParamsCompat; import android.util.Log; import android.view.ViewGroup; /** * ===================================== * * @ Author: ZhiHeng Su * @ Date : on 2019/9/9 0009 * @ Description: * ===================================== */ public class PercentLayoutInfo { public float widthPercent; public float heightPercent; public float leftMarginPercent; public float topMarginPercent; public float rightMarginPercent; public float bottomMarginPercent; public float startMarginPercent; public float endMarginPercent; public float aspectRatio; /* package */ final ViewGroup.MarginLayoutParams mPreservedParams; public PercentLayoutInfo() { widthPercent = -1f; heightPercent = -1f; leftMarginPercent = -1f; topMarginPercent = -1f; rightMarginPercent = -1f; bottomMarginPercent = -1f; startMarginPercent = -1f; endMarginPercent = -1f; mPreservedParams = new ViewGroup.MarginLayoutParams(0, 0); } /** * Fills {@code ViewGroup.LayoutParams} dimensions based on percentage values. */ public void fillLayoutParams(ViewGroup.LayoutParams params, int widthHint, int heightHint) { // Preserve the original layout params, so we can restore them after the measure step. mPreservedParams.width = params.width; mPreservedParams.height = params.height; // We assume that width/height set to 0 means that value was unset. This might not // necessarily be true, as the user might explicitly set it to 0. However, we use this // information only for the aspect ratio. If the user set the aspect ratio attribute, // it means they accept or soon discover that it will be disregarded. final boolean widthNotSet = params.width == 0 && widthPercent < 0; final boolean heightNotSet = params.height == 0 && heightPercent < 0; if (widthPercent >= 0) { params.width = (int) (widthHint * widthPercent); } if (heightPercent >= 0) { params.height = (int) (heightHint * heightPercent); } if (aspectRatio >= 0) { if (widthNotSet) { params.width = (int) (params.height * aspectRatio); } if (heightNotSet) { params.height = (int) (params.width / aspectRatio); } } } /** * Fills {@code ViewGroup.MarginLayoutParams} dimensions and margins based on percentage * values. */ public void fillMarginLayoutParams(ViewGroup.MarginLayoutParams params, int widthHint, int heightHint) { fillLayoutParams(params, widthHint, heightHint); // Preserver the original margins, so we can restore them after the measure step. mPreservedParams.leftMargin = params.leftMargin; mPreservedParams.topMargin = params.topMargin; mPreservedParams.rightMargin = params.rightMargin; mPreservedParams.bottomMargin = params.bottomMargin; MarginLayoutParamsCompat.setMarginStart(mPreservedParams, MarginLayoutParamsCompat.getMarginStart(params)); MarginLayoutParamsCompat.setMarginEnd(mPreservedParams, MarginLayoutParamsCompat.getMarginEnd(params)); if (leftMarginPercent >= 0) { params.leftMargin = (int) (widthHint * leftMarginPercent); } if (topMarginPercent >= 0) { params.topMargin = (int) (heightHint * topMarginPercent); } if (rightMarginPercent >= 0) { params.rightMargin = (int) (widthHint * rightMarginPercent); } if (bottomMarginPercent >= 0) { params.bottomMargin = (int) (heightHint * bottomMarginPercent); } if (startMarginPercent >= 0) { MarginLayoutParamsCompat.setMarginStart(params, (int) (widthHint * startMarginPercent)); } if (endMarginPercent >= 0) { MarginLayoutParamsCompat.setMarginEnd(params, (int) (widthHint * endMarginPercent)); } } @Override public String toString() { return String.format("PercentLayoutInformation width: %f height %f, margins (%f, %f, " + " %f, %f, %f, %f)", widthPercent, heightPercent, leftMarginPercent, topMarginPercent, rightMarginPercent, bottomMarginPercent, startMarginPercent, endMarginPercent); } /** * Restores original dimensions and margins after they were changed for percentage based * values. Calling this method only makes sense if you previously called * {@link PercentLayoutHelper.PercentLayoutInfo#fillMarginLayoutParams}. */ public void restoreMarginLayoutParams(ViewGroup.MarginLayoutParams params) { restoreLayoutParams(params); params.leftMargin = mPreservedParams.leftMargin; params.topMargin = mPreservedParams.topMargin; params.rightMargin = mPreservedParams.rightMargin; params.bottomMargin = mPreservedParams.bottomMargin; MarginLayoutParamsCompat.setMarginStart(params, MarginLayoutParamsCompat.getMarginStart(mPreservedParams)); MarginLayoutParamsCompat.setMarginEnd(params, MarginLayoutParamsCompat.getMarginEnd(mPreservedParams)); } /** * Restores original dimensions after they were changed for percentage based values. Calling * this method only makes sense if you previously called * {@link PercentLayoutHelper.PercentLayoutInfo#fillLayoutParams}. */ public void restoreLayoutParams(ViewGroup.LayoutParams params) { params.width = mPreservedParams.width; params.height = mPreservedParams.height; } public interface PercentLayoutParams { PercentLayoutInfo getPercentLayoutInfo(); } }
[ "741131160@qq.com" ]
741131160@qq.com
25ff8fbf121b1bae60eec7586d294d52762b46fa
a1845de2d91fc536d9870f82e752e0853c3020fc
/backend/src/main/java/com/gustmeyer/desafio01/dtos/ClientDTO.java
15731b6d6acceb33e3d2e838657112fd8ba686eb
[]
no_license
gustmeyer/CRUD-Client-Spring
e14d2de3287cb75861d3b2dbb76979f041cad7d1
a64563af72337cba0b52fb57ba184bbcefa51816
refs/heads/master
2023-06-12T09:16:49.712818
2021-06-28T15:10:21
2021-06-28T15:10:21
379,269,004
0
0
null
null
null
null
UTF-8
Java
false
false
2,483
java
package com.gustmeyer.desafio01.dtos; import java.io.Serializable; import java.time.Instant; import com.gustmeyer.desafio01.entity.Client; public class ClientDTO implements Serializable { private static final long serialVersionUID = 1L; private Long id; private String name; private String cpf; private Double income; private Instant birthDate; private Integer children; public ClientDTO() { } public ClientDTO(Client client) { this.id = client.getId(); this.name = client.getName(); this.cpf = client.getCpf(); this.income = client.getIncome(); this.birthDate = client.getBirthDate(); this.children = client.getChildren(); } public ClientDTO(Long id, String name, String cpf, Double income, Instant birthDate, Integer children) { this.id = id; this.name = name; this.cpf = cpf; this.income = income; this.birthDate = birthDate; this.children = children; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCpf() { return cpf; } public void setCpf(String cpf) { this.cpf = cpf; } public Double getIncome() { return income; } public void setIncome(Double income) { this.income = income; } public Instant getBirthDate() { return birthDate; } public void setBirthDate(Instant birthDate) { this.birthDate = birthDate; } public Integer getChildren() { return children; } public void setChildren(Integer children) { this.children = children; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((cpf == null) ? 0 : cpf.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ClientDTO other = (ClientDTO) obj; if (cpf == null) { if (other.cpf != null) return false; } else if (!cpf.equals(other.cpf)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; return true; } }
[ "gustmeyersax@gmail.com" ]
gustmeyersax@gmail.com
7c09a3e19e7777b48d70a6ea53f7c1455ddc7cbf
7feaf6a2d8dd0a129abd2921cc74c684b82588df
/src/mygeocal/GeoCircle.java
bbfa05fe306ad26fb4199eb460115f6be2c5ecd3
[]
no_license
tanvirtareq/mygeocal
73083642992dedb3e8e8b42071686ba5bf269883
b4e7fcf1cd0ddbc088d4f48930a89f32a92a0af0
refs/heads/main
2023-07-06T22:25:27.643946
2021-07-24T19:10:29
2021-07-24T19:10:29
389,179,775
1
0
null
null
null
null
UTF-8
Java
false
false
9,424
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package mygeocal; import java.util.ArrayList; import java.util.Formatter; import javafx.event.EventHandler; import javafx.scene.control.ContextMenu; import javafx.scene.control.MenuItem; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.input.ContextMenuEvent; import javafx.scene.shape.Circle; import javafx.scene.input.MouseEvent; import javafx.scene.paint.Color; import static mygeocal.FXMLDocumentController.gc; import static mygeocal.FXMLDocumentController.key; import static mygeocal.FXMLDocumentController.listPane; import static mygeocal.FXMLDocumentController.page; import static mygeocal.FXMLDocumentController.pane; import static mygeocal.FXMLDocumentController.segmentStarted; import static mygeocal.FXMLDocumentController.stage; import static mygeocal.FXMLDocumentController.tmpCircle; import static mygeocal.FXMLDocumentController.tmpSeg; import static mygeocal.FXMLDocumentController.toolBar; import static mygeocal.Grid.dX; import static mygeocal.Grid.dY; /** * * @Kiriti */ public class GeoCircle extends Circle { public Node centerNode, boundNode; public String name; public static ArrayList<GeoCircle> geoCircleList = new ArrayList<>(); Formatter xx = new Formatter(); Formatter yy = new Formatter(); Formatter rr = new Formatter(); public Formatter getXx() { return xx; } public void setXx(Formatter xx) { this.xx = xx; } public Formatter getYy() { return yy; } public void setYy(Formatter yy) { this.yy = yy; } public double getX() { return x; } public void setX(double x) { this.x = x; } public double getY() { return y; } public void setY(double y) { this.y = y; } public void setR(double r) { this.r = r; } public double getR() { return r; } public ContextMenu circleMenu; public MenuItem delete, properties; public double x, y, r; GeoCircle() { geoCircleList.add(this); this.setFill(Color.TRANSPARENT); this.setStroke(Color.PURPLE); this.setStrokeWidth(2.); Grid.pane.getChildren().add(this); delete = new MenuItem("Delete"); properties = new MenuItem("Properties"); this.delete.setGraphic(new ImageView(new Image(getClass().getResourceAsStream("/image/delete_img.png")))); this.properties.setGraphic(new ImageView(new Image(getClass().getResourceAsStream("/image/Node Properties.png")))); action(this); this.toBack(); } GeoCircle(MouseEvent event) { this(); this.centerNode = Node.addNode(event); this.name = centerNode.name.getText(); this.setCenterX(event.getX()); this.setCenterY(event.getY()); x = (getCenterX() - Grid.positionOfYAxis) * Grid.unitOfScale / Grid.increment; y = (Grid.positionOfXAxis - getCenterY() + Grid.dY) * Grid.unitOfScale / Grid.increment; xx.format("%.2f", x); yy.format("%.2f", y); } GeoCircle(Node center) { this(); this.centerNode = center; this.name = centerNode.name.getText(); this.setCenterX(center.getCenterX()); this.setCenterY(center.getCenterY()); x = (getCenterX() - Grid.positionOfYAxis) * Grid.unitOfScale / Grid.increment; y = (Grid.positionOfXAxis - getCenterY() + Grid.dY) * Grid.unitOfScale / Grid.increment; xx.format("%.2f", x); yy.format("%.2f", y); } public Formatter getRr() { return rr; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void setRr(Formatter rr) { this.rr = rr; } public static void redraw() { listPane.toFront(); GeoCircle tmp; for (int i = 0; i < geoCircleList.size(); i++) { tmp = geoCircleList.get(i); double xx = ((tmp.boundNode.getCenterX() - tmp.centerNode.getCenterX())); xx *= xx; double yy = ((tmp.boundNode.getCenterY() - tmp.centerNode.getCenterY())); yy *= yy; tmp.setRadius(Math.sqrt(xx + yy)); tmp.setCenterX(tmp.centerNode.getCenterX()); tmp.setCenterY(tmp.centerNode.getCenterY()); tmp.x = (tmp.getCenterX() - Grid.positionOfYAxis) * Grid.unitOfScale / Grid.increment; tmp.y = (Grid.positionOfXAxis - tmp.getCenterY() + Grid.dY) * Grid.unitOfScale / Grid.increment; tmp.r = tmp.getRadius()*Grid.unitOfScale/Grid.increment; tmp.xx = new Formatter(); tmp.yy = new Formatter(); tmp.rr = new Formatter(); tmp.rr.format("%.2f", tmp.r); tmp.xx.format("%.2f", tmp.x); tmp.yy.format("%.2f", tmp.y); // FXMLDocumentController.circleTable.getItems().set(Side.circleData.indexOf(tmp),tmp); FXMLDocumentController.circleTable.getItems().set(Side.circleData.indexOf(tmp), tmp); } } public void deleteGeoCircle() { geoCircleList.remove(this); Grid.pane.getChildren().remove(this); } public void action(GeoCircle tmp) { delete.setOnAction(e -> { this.deleteGeoCircle(); }); tmp.setOnContextMenuRequested(new EventHandler<ContextMenuEvent>() { public void handle(ContextMenuEvent event) { circleMenu.show(tmp, stage.getX() + event.getX() + 20, stage.getY() + 20 + event.getY()); FXMLDocumentController.moveGrid = false; Grid.bug1 = true; } }); this.setOnMouseMoved(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent event) { if (key == 1 && segmentStarted == true) { tmpSeg.setEndX(event.getX()); tmpSeg.setEndY(event.getY()); tmpSeg.slope = (tmpSeg.startNode.Y - tmpSeg.getEndY()) / ((tmpSeg.startNode.X - tmpSeg.getEndX())); page.redraw(gc); } else if (key == 2 && segmentStarted == true) { // canvas.setCursor(Cursor.CROSSHAIR); FXMLDocumentController.event = event; tmpSeg.setEndX(event.getX()); tmpSeg.setEndY(event.getY()); double a, b, c, d; if (tmpSeg.startNode.getCenterX() != event.getX() + dX) { tmpSeg.slope = ((event.getY()) - tmpSeg.startNode.getCenterY()) / ((event.getX()) - tmpSeg.startNode.getCenterX()); a = 0; b = tmpSeg.slope * (a - tmpSeg.startNode.getCenterX()) + tmpSeg.startNode.getCenterY(); c = pane.getWidth(); d = tmpSeg.slope * (c - tmpSeg.startNode.getCenterX()) + tmpSeg.startNode.getCenterY(); tmpSeg.setStartX(a); tmpSeg.setStartY(b); tmpSeg.setEndX(c); tmpSeg.setEndY(d); } else { tmpSeg.setStartX(event.getX()); tmpSeg.setStartY(0); tmpSeg.setEndX(event.getX()); tmpSeg.setEndY(pane.getHeight()); } page.redraw(gc); toolBar.toFront(); } else if (key == 3 && segmentStarted == true) { if (tmpSeg.parentSegment.getEndX() == tmpSeg.parentSegment.getEndY()) { tmpSeg.setStartX(event.getX()); tmpSeg.setStartY(0); tmpSeg.setEndX(event.getX()); tmpSeg.setEndY(pane.getHeight()); } else { if (tmpSeg.parentSegment.getStartX() == tmpSeg.parentSegment.getEndX()) { tmpSeg.slope = 0; } else { tmpSeg.slope = -1. / tmpSeg.parentSegment.slope; } double a, b, c, d; a = 0; b = tmpSeg.slope * (a - event.getX()) + event.getY(); c = pane.getWidth(); d = tmpSeg.slope * (c - event.getX()) + event.getY(); tmpSeg.setStartX(a); tmpSeg.setStartY(b); tmpSeg.setEndX(c); tmpSeg.setEndY(d); } } else if (key == 10 && segmentStarted == true) { for (int i = 0; i < Node.nodeList.size(); i++) { Node.nodeList.get(i).toFront(); } double xx = ((event.getX() - tmpCircle.centerNode.getCenterX())); xx *= xx; double yy = ((event.getY() - tmpCircle.centerNode.getCenterY())); yy *= yy; tmpCircle.setRadius(Math.sqrt(xx + yy)); } page.redraw(gc); } }); } }
[ "cse.tanvir.17@gmail.com" ]
cse.tanvir.17@gmail.com
57364e1ec7e9fc77a82bc885f92edf243b68f05d
291d7ed9a0aef444b977c723ca9e09988a976a3d
/src/main/java/com/slackers/slackapp/service/ChannelService.java
dae762dd05e473221e662250492684b8c0ca8b1e
[]
no_license
jtith5/slack
58f43b84596a4ad78a78e1546b2a9b2f9e54bb10
146b55adc1f933c2770f394c41d8546a0d8e2c8f
refs/heads/master
2020-04-12T16:53:10.646560
2018-12-20T19:48:29
2018-12-20T19:48:29
162,626,967
1
0
null
2018-12-20T20:14:00
2018-12-20T20:14:00
null
UTF-8
Java
false
false
1,079
java
package com.slackers.slackapp.service; import com.slackers.slackapp.domain.Channel; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import java.util.List; import java.util.Optional; /** * Service Interface for managing Channel. */ public interface ChannelService { /** * Save a channel. * * @param channel the entity to save * @return the persisted entity */ Channel save(Channel channel); /** * Get all the channels. * * @return the list of entities */ List<Channel> findAll(); /** * Get all the Channel with eager load of many-to-many relationships. * * @return the list of entities */ Page<Channel> findAllWithEagerRelationships(Pageable pageable); /** * Get the "id" channel. * * @param id the id of the entity * @return the entity */ Optional<Channel> findOne(Long id); /** * Delete the "id" channel. * * @param id the id of the entity */ void delete(Long id); }
[ "cgdunni14@gmail.com" ]
cgdunni14@gmail.com
8fd96f91254fa27d29487e2f115d08c596f18c7d
bd0ce1c94730f8b5e44ac26597129627fbb824bb
/src/test/java/net/markenwerk/utils/json/common/handler/text/AppendingJsonTextJsonHandlerTests.java
b0af633d2951bc27e080ad0b4652b9ff41b51c84
[ "MIT" ]
permissive
markenwerk/java-utils-json-handler-text
c07812029fe1616373d625b091488b32afc92bc0
0ccf6d7238e33a7a294cf5e090f0ef25bd815449
refs/heads/master
2020-05-21T04:47:35.879201
2017-03-05T12:42:37
2017-03-05T12:42:37
57,056,761
0
0
null
null
null
null
UTF-8
Java
false
false
9,278
java
package net.markenwerk.utils.json.common.handler.text; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import net.markenwerk.utils.json.common.JsonValueException; import net.markenwerk.utils.json.handler.JsonHandler; import net.markenwerk.utils.text.indentation.LineBreak; import net.markenwerk.utils.text.indentation.Whitespace; import net.markenwerk.utils.text.indentation.WhitespaceIndentation; @SuppressWarnings("javadoc") public class AppendingJsonTextJsonHandlerTests { private static final WhitespaceIndentation INDENTATION = new WhitespaceIndentation(Whitespace.SPACE, 0, LineBreak.UNIX); private StringBuilder builder; @Before public void prepareStringBuilder() { builder = new StringBuilder(); } @Test(expected = IllegalArgumentException.class) public void create_nullAppendable() { new AppendingJsonTextJsonHandler(null, INDENTATION); } @Test(expected = IllegalArgumentException.class) public void create_nullIndentation() { new AppendingJsonTextJsonHandler(builder, null); } @Test public void onNull() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onNull(); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("null", result); } @Test public void onBoolean_true() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onBoolean(true); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("true", result); } @Test public void onBoolean_false() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onBoolean(false); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("false", result); } @Test public void onLong_zero() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onLong(0); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals(Long.toString(0), result); } @Test public void onLong_positive() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onLong(Long.MAX_VALUE); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals(Long.toString(Long.MAX_VALUE), result); } @Test public void onLong_negative() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onLong(Long.MIN_VALUE); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals(Long.toString(Long.MIN_VALUE), result); } @Test(expected = JsonValueException.class) public void onDouble_infinite() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onDouble(Double.POSITIVE_INFINITY); handler.onDocumentEnd(); } @Test(expected = JsonValueException.class) public void onDouble_notANumber() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onDouble(Double.NaN); handler.onDocumentEnd(); } @Test public void onDouble_zero() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onDouble(0); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals(Double.toString(0), result); } @Test public void onDouble_positive() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onDouble(Double.MAX_VALUE); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals(Double.toString(Double.MAX_VALUE), result); } @Test public void onDouble_negative() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onDouble(Double.MIN_VALUE); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals(Double.toString(Double.MIN_VALUE), result); } @Test(expected = JsonValueException.class) public void onString_null() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onString(null); handler.onDocumentEnd(); } @Test public void onString_empty() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onString(""); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("\"\"", result); } @Test public void onString_nonEmpty() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onString("foobar"); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("\"foobar\"", result); } @Test public void onString_escapeSequances() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onString("__\"_\\_/_\b_\f_\n_\r_\t__"); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("\"__\\\"_\\\\_\\/_\\b_\\f_\\n_\\r_\\t__\"", result); } @Test public void onString_controllEscapeSequances() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onString(Character.toString((char) 0)); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("\"\\u0000\"", result); } @Test public void onString_unicodeEscapeSequances() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onString("𝄞"); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("\"\uD834\uDD1E\"", result); } @Test public void onArray_empty() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onArrayBegin(); handler.onArrayEnd(); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("[]", result); } @Test public void onArray_nonEmpty() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onArrayBegin(); handler.onNull(); handler.onArrayEnd(); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("[\nnull\n]", result); } @Test public void onObject_empty() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onObjectBegin(); handler.onObjectEnd(); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("{}", result); } @Test public void onObject_nonEmpty() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onObjectBegin(); handler.onName("n"); handler.onNull(); handler.onObjectEnd(); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("{\n\"n\": null\n}", result); } @Test public void onDocument_complex() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onObjectBegin(); handler.onName("n"); handler.onNull(); handler.onNext(); handler.onName("b"); handler.onBoolean(true); handler.onNext(); handler.onName("l"); handler.onLong(-42); handler.onNext(); handler.onName("d"); handler.onDouble(-23.42); handler.onNext(); handler.onName("a"); handler.onArrayBegin(); handler.onString("foo"); handler.onNext(); handler.onString("bar"); handler.onArrayEnd(); handler.onObjectEnd(); handler.onDocumentEnd(); String result = builder.toString(); Assert.assertEquals("{\n\"n\": null,\n\"b\": true,\n\"l\": -42,\n\"d\": -23.42,\n\"a\": [\n\"foo\",\n\"bar\"\n]\n}", result); } @Test public void onDocument_defaultIndentation() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder); handler.onDocumentBegin(); handler.onObjectBegin(); handler.onName("n"); handler.onNull(); handler.onNext(); handler.onName("b"); handler.onBoolean(true); handler.onObjectEnd(); handler.onDocumentEnd(); String result = builder.toString(); String lineBreak = System.getProperty("line.separator"); Assert.assertEquals("{" + lineBreak + "\t\"n\": null," + lineBreak + "\t\"b\": true" + lineBreak + "}", result); } @Test public void getResult_isNull() { JsonHandler<Void> handler = new AppendingJsonTextJsonHandler(builder, INDENTATION); handler.onDocumentBegin(); handler.onNull(); handler.onDocumentEnd(); Void result = handler.getResult(); Assert.assertNull(result); } }
[ "tk@markenwerk.net" ]
tk@markenwerk.net
2d1cc41b7b4e2769fc058a1e462f1f5a7b414475
c3670277ec8aa0a67c8c44498ca6c7192ee069ab
/provider_lpb/src/main/java/com/jk/model/UserBean.java
03c923cf1fff3adafb61b34f0b09b52182071c56
[]
no_license
wangze521/SixTeam
3a7da656bbc7e5d26c2b67325dfb8ea980bf115b
9f634380e503fe0bd9aab20fd49972ed0ccc5c3e
refs/heads/master
2022-06-21T16:16:49.662218
2019-11-21T13:31:42
2019-11-21T13:31:42
221,635,103
0
1
null
2019-11-18T02:55:00
2019-11-14T07:15:08
CSS
UTF-8
Java
false
false
1,943
java
package com.jk.model; import java.io.Serializable; public class UserBean implements Serializable { private static final long serialVersionUID = -1644737415958431074L; private Integer uid; private String peopleName; private String peopleNum; private String email; private Integer deptId; private String addTime; //业务字段 private String deptName; private String uname; private String upassword; private String code; public String getPeopleName() { return peopleName; } public void setPeopleName(String peopleName) { this.peopleName = peopleName; } public String getPeopleNum() { return peopleNum; } public void setPeopleNum(String peopleNum) { this.peopleNum = peopleNum; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Integer getTypeId() { return deptId; } public void setTypeId(Integer typeId) { this.deptId = typeId; } public String getAddTime() { return addTime; } public void setAddTime(String addTime) { this.addTime = addTime; } public String getTypeName() { return deptName; } public void setTypeName(String typeName) { this.deptName = typeName; } public Integer getUid() { return uid; } public void setUid(Integer uid) { this.uid = uid; } public String getUname() { return uname; } public void setUname(String uname) { this.uname = uname; } public String getUpassword() { return upassword; } public void setUpassword(String upassword) { this.upassword = upassword; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } }
[ "1404637588@qq.com" ]
1404637588@qq.com
0320bbeeb930501051448ab752084e2611c827f0
60d0f0a072d3104529ac48a37005e75ee6251ea0
/sources/com/google/android/gms/internal/C0148u.java
dc80aa0f63c572d5395ef025780ffe7e6ce51885
[]
no_license
ErikBoesen/YaleDiningApp
1a74d79f58b7994f91ab65f6b299157c37db3c34
b7d54214513010ea1a83cb882dacb0af2480082e
refs/heads/master
2020-06-29T00:10:55.807753
2019-08-03T14:00:19
2019-08-03T14:00:19
200,380,758
0
0
null
null
null
null
UTF-8
Java
false
false
3,003
java
package com.google.android.gms.internal; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; import com.google.android.gms.internal.C0139s.C0140a; /* renamed from: com.google.android.gms.internal.u */ public interface C0148u extends IInterface { /* renamed from: com.google.android.gms.internal.u$a */ public static abstract class C0149a extends Binder implements C0148u { /* renamed from: com.google.android.gms.internal.u$a$a */ private static class C0150a implements C0148u { /* renamed from: a */ private IBinder f107a; C0150a(IBinder iBinder) { this.f107a = iBinder; } public IBinder asBinder() { return this.f107a; } /* renamed from: h */ public void mo1406h(C0139s sVar) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.maps.internal.IOnInfoWindowClickListener"); obtain.writeStrongBinder(sVar != null ? sVar.asBinder() : null); this.f107a.transact(1, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } } public C0149a() { attachInterface(this, "com.google.android.gms.maps.internal.IOnInfoWindowClickListener"); } /* renamed from: q */ public static C0148u m238q(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.maps.internal.IOnInfoWindowClickListener"); return (queryLocalInterface == null || !(queryLocalInterface instanceof C0148u)) ? new C0150a(iBinder) : (C0148u) queryLocalInterface; } public IBinder asBinder() { return this; } public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { switch (i) { case 1: parcel.enforceInterface("com.google.android.gms.maps.internal.IOnInfoWindowClickListener"); mo1406h(C0140a.m209r(parcel.readStrongBinder())); parcel2.writeNoException(); return true; case 1598968902: parcel2.writeString("com.google.android.gms.maps.internal.IOnInfoWindowClickListener"); return true; default: return super.onTransact(i, parcel, parcel2, i2); } } } /* renamed from: h */ void mo1406h(C0139s sVar) throws RemoteException; }
[ "me@erikboesen.com" ]
me@erikboesen.com
a548ed68deb24f2c9003a31c1fd8bff2e8fb1627
bcc11b62748512dcdf0be04d22014195ca09edfa
/backend/src/main/java/com/juan/gamedevforums/service/CategoriesService.java
0e064bea927eac5f6ebd45f4367bc8096fd8b2c0
[]
no_license
delacrank/gamedev_forums
2e74ce997c8c6d5baeef5943131a7f79f4d12ce9
dea4e0806e3bab2fd0293e758bdff94d00fd76bf
refs/heads/master
2023-04-23T12:15:58.716807
2021-05-16T03:20:20
2021-05-16T03:20:20
322,819,992
0
0
null
null
null
null
UTF-8
Java
false
false
1,225
java
package com.juan.gamedevforums.service; import javax.transaction.Transactional; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.juan.gamedevforums.persistence.model.Categories; import com.juan.gamedevforums.persistence.dao.CategoriesRepository; @Service @Transactional public class CategoriesService implements ICategoriesService { @Autowired private CategoriesRepository categoriesRepository; @Override public List<Categories> findAll() { return categoriesRepository.findAll(); } @Override public Categories findOne(Long id) { // todo fix optional return categoriesRepository.findById(id).get(); } @Override public Categories findByName(String name) { return categoriesRepository.findByNameIgnoreCase(name); } @Override public Categories save(Categories categories) { return categoriesRepository.save(categories); } @Override public void delete(Long id) { delete(findOne(id)); } @Override public void delete(Categories categories) { categoriesRepository.delete(categories); } }
[ "jcarias86@gmail.com" ]
jcarias86@gmail.com
cf78b7f3029cd4a513702f27c6030a18b84a0c18
b6edf2f85c5971de600ff5d9d473749f6a50652f
/prettydialog/src/main/java/libs/mjn/prettydialog/PrettyDialog.java
4b5773bee5911009734ec58b532269d250d72499
[ "Apache-2.0" ]
permissive
eorhan/PrettyDialog
8f1bbfd9f15f565b03e0c137b45d369819abdcd3
832b8e9c3ad1603f69c9c32e8c77ba0c0c0e0fa8
refs/heads/master
2020-03-29T06:11:30.008201
2018-08-01T12:00:57
2018-08-01T12:00:57
149,613,621
0
1
null
2018-09-20T13:28:09
2018-09-20T13:28:09
null
UTF-8
Java
false
false
19,355
java
package libs.mjn.prettydialog; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapShader; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.ColorFilter; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.Shader; import android.graphics.Typeface; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.support.v7.app.AppCompatDialog; import android.support.v7.widget.AppCompatImageView; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.animation.Animation; import android.view.animation.DecelerateInterpolator; import android.view.animation.RotateAnimation; import android.widget.FrameLayout; import android.widget.LinearLayout; import android.widget.TextView; import static android.widget.ImageView.ScaleType.CENTER_CROP; import static android.widget.ImageView.ScaleType.CENTER_INSIDE; /** * Created by mJafarinejad on 8/15/2017. */ public class PrettyDialog extends AppCompatDialog { Resources resources; LinearLayout ll_content, ll_buttons; PrettyDialogCircularImageView iv_icon; RotateAnimation close_rotation_animation; boolean icon_animation = true; TextView tv_title, tv_message; Typeface typeface; PrettyDialog thisDialog; Context context; public PrettyDialog(Context context) { super(context); this.context = context; getWindow().requestFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.pdlg_layout); setCancelable(true); resources = context.getResources(); getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); DisplayMetrics displayMetrics = resources.getDisplayMetrics(); float pxWidth = displayMetrics.widthPixels; getWindow().setLayout((int)(pxWidth*0.75),ViewGroup.LayoutParams.WRAP_CONTENT); getWindow().getAttributes().windowAnimations = R.style.pdlg_default_animation; thisDialog = this; setupViews_Base(); } private void setupViews_Base(){ ll_content = (LinearLayout) findViewById(R.id.ll_content); ll_buttons = (LinearLayout) findViewById(R.id.ll_buttons); iv_icon = (PrettyDialogCircularImageView) findViewById(R.id.iv_icon); FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); lp.setMargins(0, resources.getDimensionPixelSize(R.dimen.pdlg_icon_size)/2, 0, 0); ll_content.setLayoutParams(lp); ll_content.setPadding(0,(int)(1.25*resources.getDimensionPixelSize(R.dimen.pdlg_icon_size)/2),0,resources.getDimensionPixelSize(R.dimen.pdlg_space_1_0x)); close_rotation_animation = new RotateAnimation(0, 180, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); close_rotation_animation.setDuration(300); close_rotation_animation.setRepeatCount(Animation.ABSOLUTE); close_rotation_animation.setInterpolator(new DecelerateInterpolator()); close_rotation_animation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { thisDialog.dismiss(); } @Override public void onAnimationRepeat(Animation animation) { } }); iv_icon.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()){ case MotionEvent.ACTION_DOWN: v.setAlpha(0.7f); return true; case MotionEvent.ACTION_UP: v.setAlpha(1.0f); if(icon_animation) { v.startAnimation(close_rotation_animation); } return true; default: return false; } } }); tv_title = (TextView) findViewById(R.id.tv_title); tv_title.setVisibility(View.GONE); tv_message = (TextView) findViewById(R.id.tv_message); tv_message.setVisibility(View.GONE); } public PrettyDialog setGravity(int gravity){ getWindow().setGravity(gravity); return this; } public PrettyDialog addButton(String text, Integer textColor, Integer backgroundColor, /*BUTTON_TYPE type,*/ PrettyDialogCallback callback){ PrettyDialogButton button = new PrettyDialogButton(context,text, textColor, backgroundColor, typeface, /*type,*/ callback); int margin = resources.getDimensionPixelSize(R.dimen.pdlg_space_1_0x); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); lp.setMargins(margin, margin, margin, 0); button.setLayoutParams(lp); ll_buttons.addView(button); return this; } public PrettyDialog setTitle(String text){ if(text.trim().length()>0) { tv_title.setVisibility(View.VISIBLE); tv_title.setText(text); } else { tv_title.setVisibility(View.GONE); } return this; } public PrettyDialog setTitleColor(Integer color){ //tv_title.setTextColor(ContextCompat.getColor(context,color==null?R.color.pdlg_color_black : color)); tv_title.setTextColor(context.getResources().getColor(color==null?R.color.pdlg_color_black : color)); return this; } public PrettyDialog setMessage(String text){ if(text.trim().length()>0) { tv_message.setVisibility(View.VISIBLE); tv_message.setText(text); } else { tv_message.setVisibility(View.GONE); } return this; } public PrettyDialog setMessageColor(Integer color){ //tv_message.setTextColor(ContextCompat.getColor(context,color==null?R.color.pdlg_color_black :color)); tv_message.setTextColor(context.getResources().getColor(color==null?R.color.pdlg_color_black :color)); return this; } public PrettyDialog setIcon(Integer icon){ iv_icon.setImageResource(icon==null?R.drawable.pdlg_icon_close :icon); icon_animation = false; iv_icon.setOnTouchListener(null); return this; } public PrettyDialog setIconTint(Integer color){ //iv_icon.setColorFilter(ContextCompat.getColor(context,color==null?default_icon_tint:color), PorterDuff.Mode.MULTIPLY); if(color==null){ iv_icon.setColorFilter(null); } else iv_icon.setColorFilter(context.getResources().getColor(color), PorterDuff.Mode.MULTIPLY); return this; } public PrettyDialog setIconCallback(final PrettyDialogCallback callback){ iv_icon.setOnTouchListener(null); if (callback != null) { iv_icon.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: v.setAlpha(0.7f); return true; case MotionEvent.ACTION_UP: v.setAlpha(1.0f); callback.onClick(); return true; default: return false; } } }); } return this; } public PrettyDialog setIcon(Integer icon, Integer iconTint, final PrettyDialogCallback callback){ icon_animation = false; iv_icon.setImageResource(icon==null?R.drawable.pdlg_icon_close :icon); //iv_icon.setColorFilter(ContextCompat.getColor(context,iconTint==null?default_icon_tint:iconTint), PorterDuff.Mode.MULTIPLY); if(iconTint==null) { iv_icon.setColorFilter(null); } else iv_icon.setColorFilter(context.getResources().getColor(iconTint), PorterDuff.Mode.MULTIPLY); iv_icon.setOnTouchListener(null); if (callback != null) { iv_icon.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: v.setAlpha(0.7f); return true; case MotionEvent.ACTION_UP: v.setAlpha(1.0f); callback.onClick(); return true; default: return false; } } }); } return this; } public PrettyDialog setTypeface(Typeface tf){ typeface = tf; tv_title.setTypeface(tf); tv_message.setTypeface(tf); for (int i=0;i<ll_buttons.getChildCount();i++){ PrettyDialogButton button = (PrettyDialogButton) ll_buttons.getChildAt(i); button.setTypeface(tf); button.requestLayout(); } return this; } public PrettyDialog setAnimationEnabled(boolean enabled){ if (enabled){ getWindow().getAttributes().windowAnimations = R.style.pdlg_default_animation; } else { getWindow().getAttributes().windowAnimations = R.style.pdlg_no_animation; } return this; } protected static class PrettyDialogCircularImageView extends AppCompatImageView { // Properties private float borderWidth; private int canvasSize; private ColorFilter colorFilter; // Object used to draw private Bitmap image; private Drawable drawable; private Paint paint; private Paint paintBorder; private Paint paintBackground; //region Constructor & Init Method public PrettyDialogCircularImageView(final Context context) { this(context, null); } public PrettyDialogCircularImageView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public PrettyDialogCircularImageView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(context, attrs, defStyleAttr); } private void init(Context context, AttributeSet attrs, int defStyleAttr) { // Init paint paint = new Paint(); paint.setAntiAlias(true); paintBorder = new Paint(); paintBorder.setAntiAlias(true); paintBackground = new Paint(); paintBackground.setAntiAlias(true); setBorderWidth(0); setBorderColor(Color.WHITE); setBackgroundColor(Color.WHITE); } //endregion //region Set Attr Method public void setBorderWidth(float borderWidth) { this.borderWidth = borderWidth; requestLayout(); invalidate(); } public void setBorderColor(int borderColor) { if (paintBorder != null) paintBorder.setColor(borderColor); invalidate(); } public void setBackgroundColor(int backgroundColor) { if (paintBackground != null) paintBackground.setColor(backgroundColor); invalidate(); } @Override public void setColorFilter(ColorFilter colorFilter) { if (this.colorFilter == colorFilter) return; this.colorFilter = colorFilter; drawable = null; // To force re-update shader invalidate(); } @Override public ScaleType getScaleType() { ScaleType currentScaleType = super.getScaleType(); return currentScaleType == null || currentScaleType != CENTER_INSIDE ? CENTER_CROP : currentScaleType; } @Override public void setScaleType(ScaleType scaleType) { if (scaleType != CENTER_CROP && scaleType != CENTER_INSIDE) { throw new IllegalArgumentException(String.format("ScaleType %s not supported. " + "Just ScaleType.CENTER_CROP & ScaleType.CENTER_INSIDE are available for this library.", scaleType)); } else { super.setScaleType(scaleType); } } //endregion //region Draw Method @Override public void onDraw(Canvas canvas) { // Load the bitmap loadBitmap(); // Check if image isn't null if (image == null) return; if (!isInEditMode()) { canvasSize = Math.min(canvas.getWidth(), canvas.getHeight()); } // circleCenter is the x or y of the view's center // radius is the radius in pixels of the cirle to be drawn // paint contains the shader that will texture the shape int circleCenter = (int) (canvasSize - (borderWidth * 2)) / 2; float margeWithShadowRadius = 0; // Draw Border canvas.drawCircle(circleCenter + borderWidth, circleCenter + borderWidth, circleCenter + borderWidth - margeWithShadowRadius, paintBorder); // Draw Circle background canvas.drawCircle(circleCenter + borderWidth, circleCenter + borderWidth, circleCenter - margeWithShadowRadius, paintBackground); // Draw CircularImageView canvas.drawCircle(circleCenter + borderWidth, circleCenter + borderWidth, circleCenter - margeWithShadowRadius, paint); } private void loadBitmap() { if (drawable == getDrawable()) return; drawable = getDrawable(); image = drawableToBitmap(drawable); updateShader(); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); canvasSize = Math.min(w, h); if (image != null) updateShader(); } private void updateShader() { if (image == null) return; // Create Shader BitmapShader shader = new BitmapShader(image, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); // Center Image in Shader float scale = 0; float dx = 0; float dy = 0; switch (getScaleType()) { case CENTER_CROP: if (image.getWidth() * getHeight() > getWidth() * image.getHeight()) { scale = getHeight() / (float) image.getHeight(); dx = (getWidth() - image.getWidth() * scale) * 0.5f; } else { scale = getWidth() / (float) image.getWidth(); dy = (getHeight() - image.getHeight() * scale) * 0.5f; } break; case CENTER_INSIDE: if (image.getWidth() * getHeight() < getWidth() * image.getHeight()) { scale = getHeight() / (float) image.getHeight(); dx = (getWidth() - image.getWidth() * scale) * 0.5f; } else { scale = getWidth() / (float) image.getWidth(); dy = (getHeight() - image.getHeight() * scale) * 0.5f; } break; } Matrix matrix = new Matrix(); matrix.setScale(scale, scale); matrix.postTranslate(dx, dy); shader.setLocalMatrix(matrix); // Set Shader in Paint paint.setShader(shader); // Apply colorFilter paint.setColorFilter(colorFilter); } private Bitmap drawableToBitmap(Drawable drawable) { if (drawable == null) { return null; } else if (drawable instanceof BitmapDrawable) { return ((BitmapDrawable) drawable).getBitmap(); } try { // Create Bitmap object out of the drawable Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); drawable.draw(canvas); return bitmap; } catch (Exception e) { e.printStackTrace(); return null; } } //endregion //region Measure Method @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int width = measureWidth(widthMeasureSpec); int height = measureHeight(heightMeasureSpec); setMeasuredDimension(width, height); } private int measureWidth(int measureSpec) { int result; int specMode = MeasureSpec.getMode(measureSpec); int specSize = MeasureSpec.getSize(measureSpec); if (specMode == MeasureSpec.EXACTLY) { // The parent has determined an exact size for the child. result = specSize; } else if (specMode == MeasureSpec.AT_MOST) { // The child can be as large as it wants up to the specified size. result = specSize; } else { // The parent has not imposed any constraint on the child. result = canvasSize; } return result; } private int measureHeight(int measureSpecHeight) { int result; int specMode = MeasureSpec.getMode(measureSpecHeight); int specSize = MeasureSpec.getSize(measureSpecHeight); if (specMode == MeasureSpec.EXACTLY) { // We were told how big to be result = specSize; } else if (specMode == MeasureSpec.AT_MOST) { // The child can be as large as it wants up to the specified size. result = specSize; } else { // Measure the text (beware: ascent is a negative number) result = canvasSize; } return result + 2; } //endregion } }
[ "mjn1369@gmail.com" ]
mjn1369@gmail.com
6f9e210f60f88e426a7f164a9d9c00cc9ffe4772
2d4928e1c80784ceff00c44fc8279a91ac27141c
/src/main/java/com/example/Exceptions/UserNotFoundException.java
b5a89faa33092d8845707563128367ff71bab976
[]
no_license
sandhyark139/javaInterview
2b0cb05046e878f5a511f200c8c53203a32b4c53
28eb330c4e84ad100cb5400a10ca7742a68c041b
refs/heads/master
2022-12-07T02:46:43.630616
2020-09-08T14:32:05
2020-09-08T14:32:05
293,555,921
0
0
null
null
null
null
UTF-8
Java
false
false
358
java
package com.example.Exceptions; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(HttpStatus.NOT_FOUND) public class UserNotFoundException extends RuntimeException { public UserNotFoundException(String message) { super(message); // TODO Auto-generated constructor stub } }
[ "sandhyark139@gmail.com" ]
sandhyark139@gmail.com
c8d7d0c947e40b5d086161975a6c3081ca39e9d8
4c234b541f91bc3dff2ab73ba9d9943ebd13d6db
/app/src/test/java/it/test/uvtpoint/ExampleUnitTest.java
71fc3df242b8e12896c31869ade53d2fab784c96
[]
no_license
salemmosbahi/UVTPoint
461232d770e20b9c9ca40c64029b4cdd7e0f98cf
4a3e51d01b010d4b71e60595f37a38a00e6c8837
refs/heads/master
2021-05-13T22:13:05.872922
2018-01-06T12:50:29
2018-01-06T12:50:29
116,482,530
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
package it.test.uvtpoint; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "salemmosbahi@gmail.com" ]
salemmosbahi@gmail.com
44182da2e0cc8fa8a6531f86bd8c35538301ae0b
139dd43525b54671c7b064529319d2bba5da5d72
/src/student/Student.java
1187b36f54c507f5fc719c1458bf3dc4e57dae5b
[]
no_license
KKarola/DziekanatDatabase
61012ff0bbacd8abf515023cd1c93b3ae700d638
d7b1c24b6dd4f6c401cc8d3251783e3702d004d4
refs/heads/master
2021-05-02T01:54:28.269012
2018-03-02T12:48:47
2018-03-02T12:48:47
120,876,676
0
0
null
null
null
null
UTF-8
Java
false
false
663
java
package student; public class Student { private int id_studenta; private String imie; private String nazwisko; private int grupa_id_grupy; public Student(int id_studenta, String imie, String nazwisko, int grupa_id_grupy) { this.id_studenta = id_studenta; this.imie = imie; this.nazwisko = nazwisko; this.grupa_id_grupy = grupa_id_grupy; } public int getIdStudenta() { return id_studenta; } public String getImie() { return imie; } public String getNazwisko() { return nazwisko; } public int getGrupaIdGrupy() { return grupa_id_grupy; } }
[ "karolina.kak08@gmail.com" ]
karolina.kak08@gmail.com
64d0aa68a72ef18e8c38675c97a70e2938f524ae
593b57891b06c5c8b820d0f90eab2a88b7610c05
/gmall-parent/gmall-ums/src/main/java/com/atguigu/gmall/ums/mapper/MemberProductCategoryRelationMapper.java
d8371de363b564688326e9ef744d28ac15f6ff72
[]
no_license
aww13483275287/gmall_lei
66e3db4b6c68127957530de08e1d6339ae092d78
9bd78b70e1c2bd995f81551ecd90d95204f4bdf6
refs/heads/master
2020-09-13T10:30:53.914445
2019-10-22T04:19:31
2019-10-22T04:19:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
408
java
package com.atguigu.gmall.ums.mapper; import com.atguigu.gmall.ums.entity.MemberProductCategoryRelation; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * <p> * 会员与产品分类关系表(用户喜欢的分类) Mapper 接口 * </p> * * @author Lfy * @since 2019-10-22 */ public interface MemberProductCategoryRelationMapper extends BaseMapper<MemberProductCategoryRelation> { }
[ "1551189282@qq.com" ]
1551189282@qq.com
3bced244ea723ee1fcd6d2fd38ad539c88f2e0fb
b899ac4bdb66414195198535cddfd09152ab95f5
/src/lv/javaguru/homework/lesson12/tictactoe/ComputerPlayer.java
0d5e4bf6c46abcc2544c8bf66d49725c6bfb66fd
[]
no_license
kaskro/jg_w_2020_Kaspars_Kronbergs
27f57daf9ea623c4241428f5d6dca82c266b4c74
4ff72d12604ea55b053882f20c252333ae0362e1
refs/heads/master
2020-12-19T06:02:33.390437
2020-04-20T17:23:07
2020-04-20T17:23:07
235,640,736
0
0
null
null
null
null
UTF-8
Java
false
false
736
java
package lv.javaguru.homework.lesson12.tictactoe; import java.util.Random; public class ComputerPlayer extends Player { public ComputerPlayer() { } public ComputerPlayer(String name, String symbol) { super(name, symbol); } @Override public void makeAMove(Field field) { Random random = new Random(); askForInput(field); field.addValueToCell(field.getFreeCells().get(random.nextInt(field.getFreeCells().size())), getSymbol()); field.displayField(); wait(1000); } private static void wait(int ms) { try { Thread.sleep(ms); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } } }
[ "kaspars.kronbergs@gmail.com" ]
kaspars.kronbergs@gmail.com
544179aa6603e0c59ca7803a45e2dabe1553467d
a95553cffb1cf6be85cd495a69baef5672c25db5
/code5-18/src/MySplit.java
1734715bcf6dc738a4f1eae2a5860d9fe168766b
[]
no_license
KEVINEAST333/LEARN_JAVA
2a0fa6a0d226303c2b9c2c3458ea4910147654f5
0544abe8619d234728bc3c09ff3f8c6b92dc82bc
refs/heads/master
2022-07-07T20:02:40.779593
2021-08-14T06:10:18
2021-08-14T06:10:18
233,530,950
3
0
null
2022-06-21T03:52:41
2020-01-13T06:54:35
Java
UTF-8
Java
false
false
810
java
import java.util.ArrayList; import java.util.List; public class MySplit { public static String[] splitString(String str, String flag) { List<String> list = new ArrayList<String>(); while (str.contains(flag)) { int index = str.indexOf(flag); String tmp = str.substring(0, index); list.add(tmp); str = str.substring(index + flag.length()); } list.add(str); String[] arr = new String[list.size()]; for (int i = 0; i < list.size(); i++) { arr[i] = list.get(i); } return arr; } public static void main(String[] args) { String s = "dalfsfasfsfa"; String[] a = splitString(s,"fa"); for(String c : a) { System.out.println(c); } } }
[ "1594066845@qq.com" ]
1594066845@qq.com
64ef6c1a64fde93b10c5281d3df3544443c0d06f
3cd23e96ac9127010668bae8acea596c9dd567b2
/app/src/main/java/com/example/victor_pc/qriend/home/HomeActivity.java
a3d33cb42547a301ad9031c1d378acd2e88abe8a
[]
no_license
victorang1/QRiend
b773b0393c2418371aa9f573a2b500f1e4a3fcac
f9707f4e2d1a7ddbef866345f4284a816c9b9bcc
refs/heads/master
2020-06-27T13:20:09.376848
2019-08-03T06:40:55
2019-08-03T06:40:55
199,964,119
0
0
null
null
null
null
UTF-8
Java
false
false
3,456
java
package com.example.victor_pc.qriend.home; import android.arch.lifecycle.Observer; import android.os.Bundle; import android.os.Handler; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.view.View; import com.example.victor_pc.qriend.R; import com.example.victor_pc.qriend.common.BaseActivity; import com.example.victor_pc.qriend.databinding.ActivityHomeBinding; import com.example.victor_pc.qriend.model.Friend; import com.example.victor_pc.qriend.scanqr.ScanQRActivity; import com.example.victor_pc.qriend.showqr.ShowQRActivity; import java.util.ArrayList; import java.util.List; public class HomeActivity extends BaseActivity<ActivityHomeBinding, HomeViewModel> implements View.OnClickListener { private HomeAdapter mAdapter; private List<Friend> list = new ArrayList<>(); public HomeActivity() { super(HomeViewModel.class, R.layout.activity_home); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); initListener(); showLoading(); getViewModel().getListFriend().observe(this, new Observer<List<Friend>>() { @Override public void onChanged(@Nullable List<Friend> friends) { if(!friends.isEmpty()) { hideDefaultListFriend(); list.clear(); list.addAll(friends); mAdapter.notifyDataSetChanged(); } else { showDefaultListFriend(); } } }); initAdapter(); } private void initAdapter() { mAdapter = new HomeAdapter(this, list); getBinding().recyclerView.setLayoutManager(new LinearLayoutManager(this)); getBinding().recyclerView.setHasFixedSize(true); getBinding().recyclerView.setAdapter(mAdapter); } private void initListener() { getBinding().llShowQR.setOnClickListener(this); getBinding().llScanQR.setOnClickListener(this); } @Override public void onClick(View v) { if(v == getBinding().llScanQR) { gotoActivity(ScanQRActivity.class, true); } else if(v == getBinding().llShowQR) { gotoActivity(ShowQRActivity.class, true); } } private void showLoading() { disableButton(); Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { getBinding().rlLoading.setVisibility(View.GONE); enableButton(); } }, 2000); } private void disableButton() { getBinding().llScanQR.setEnabled(false); getBinding().llShowQR.setEnabled(false); } private void enableButton() { getBinding().llScanQR.setEnabled(true); getBinding().llShowQR.setEnabled(true); } private void showDefaultListFriend() { getBinding().rlDefaultFriendList.setVisibility(View.VISIBLE); getBinding().rlFriendList.setVisibility(View.GONE); } private void hideDefaultListFriend() { getBinding().rlDefaultFriendList.setVisibility(View.GONE); getBinding().rlFriendList.setVisibility(View.VISIBLE); } @Override public void onBackPressed() { showExitAlert("Are you sure you want to quit this application?", true); } }
[ "angvicotr91@yahoo.com" ]
angvicotr91@yahoo.com
44e146e62db0a1fe3479486d001a0cce75011ad7
6c1097cb3b68f8dd800350a2535c76bc8c5f8187
/executor/src/main/java/org/study/locks/Sync021.java
6bfdf06ba7f5ad759b65c7f36889e07919583649
[]
no_license
db117/study
0955198ea5ba50ba93b42f8418c4e72a7cdb43d3
5da4648e9417846322093231975dca1dbf6831c7
refs/heads/master
2021-07-24T01:33:35.519465
2018-10-12T03:15:14
2018-10-12T03:15:14
152,688,110
1
0
null
2020-04-27T03:43:41
2018-10-12T03:18:16
Java
UTF-8
Java
false
false
1,254
java
package org.study.locks;/* * ━━━━━━如来保佑━━━━━━ *    ┏┓   ┏┓ *   ┏┛┻━━━┛┻┓ *   ┃   ━   ┃ *   ┃ ┳┛ ┗┳ ┃ *   ┃   ┻   ┃ *   ┗━┓   ┏━┛ *     ┃   ┗━━━┓ *     ┃       ┣┓ *     ┃       ┏┛ *     ┗┓┓┏━┳┓┏┛ *      ┗┻┛ ┗┻┛ * ━━━━━━永无BUG━━━━━━ * 图灵学院-悟空老师 * www.jiagouedu.com * 悟空老师QQ:245553999 * * 还没开始 */ public class Sync021 implements Runnable { static int i = 0; @Override public void run() { for (int j = 0; j < 100000; j++) { add(); } } public synchronized void add() { i++; } public static void main(String[] args) throws InterruptedException { Sync021 sync02 = new Sync021(); Thread thread1 = new Thread(sync02); Thread thread2 = new Thread(sync02); thread1.start(); thread2.start(); thread1.join(); thread2.join(); System.out.println(i); } }
[ "z351622948@163.com" ]
z351622948@163.com
051cd02b031d8abc9ea3ff6f7ba653e7f4c9aeac
9144635ee27091b403c0da2c01ab01eb3d1bee0f
/dspace-api/src/main/java/org/dspace/checker/MostRecentChecksum.java
cc9c096d44430d5af5f0d3a16cfd5b8a7a7090e7
[]
no_license
KevinVdV/dspace-hibernate-datamodel
badbc953b4dc2be3970763f0d9522357d8d3ea85
39a51e12f9ac60c11560727a2b35e6a1fa114f6f
refs/heads/master
2016-08-08T14:58:06.483333
2014-10-13T14:26:04
2014-10-13T14:26:04
16,580,955
1
0
null
2014-02-17T07:33:58
2014-02-06T14:01:44
Java
UTF-8
Java
false
false
3,511
java
package org.dspace.checker; import org.dspace.content.Bitstream; import javax.persistence.*; import java.io.Serializable; import java.util.Date; /** * User: kevin (kevin at atmire.com) * Date: 23/04/14 * Time: 15:52 */ @Entity @Table(name="most_recent_checksum", schema = "public") public class MostRecentChecksum implements Serializable { @Id @OneToOne @JoinColumn(name="bitstream_id", nullable = false) private Bitstream bitstream; @Column(name= "to_be_processed", nullable = false) private boolean toBeProcessed; @Column(name= "expected_checksum", nullable = false) private String expectedChecksum; @Column(name= "current_checksum", nullable = false) private String currentChecksum; @Temporal(TemporalType.TIMESTAMP) @Column(name= "last_process_start_date", nullable = false) private Date processStartDate; @Temporal(TemporalType.TIMESTAMP) @Column(name= "last_process_end_date", nullable = false) private Date processEndDate; @Column(name= "checksum_algorithm", nullable = false) private String checksumAlgorithm; @Column(name= "matched_prev_checksum", nullable = false) private boolean matchedPrevChecksum; @Transient private boolean infoFound; @Transient private boolean bitstreamFound; @OneToOne @JoinColumn(name= "result") private ChecksumResult checksumResult; public Bitstream getBitstream() { return bitstream; } void setBitstream(Bitstream bitstream) { this.bitstream = bitstream; } public boolean isToBeProcessed() { return toBeProcessed; } public void setToBeProcessed(boolean toBeProcessed) { this.toBeProcessed = toBeProcessed; } public String getExpectedChecksum() { return expectedChecksum; } public void setExpectedChecksum(String expectedChecksum) { this.expectedChecksum = expectedChecksum; } public String getCurrentChecksum() { return currentChecksum; } public void setCurrentChecksum(String currentChecksum) { this.currentChecksum = currentChecksum; } public Date getProcessStartDate() { return processStartDate; } public void setProcessStartDate(Date processStartDate) { this.processStartDate = processStartDate; } public Date getProcessEndDate() { return processEndDate; } public void setProcessEndDate(Date processEndDate) { this.processEndDate = processEndDate; } public String getChecksumAlgorithm() { return checksumAlgorithm; } public void setChecksumAlgorithm(String checksumAlgorithm) { this.checksumAlgorithm = checksumAlgorithm; } public boolean isMatchedPrevChecksum() { return matchedPrevChecksum; } public void setMatchedPrevChecksum(boolean matchedPrevChecksum) { this.matchedPrevChecksum = matchedPrevChecksum; } public ChecksumResult getChecksumResult() { return checksumResult; } public void setChecksumResult(ChecksumResult checksumResult) { this.checksumResult = checksumResult; } public boolean isInfoFound() { return infoFound; } public void setInfoFound(boolean infoFound) { this.infoFound = infoFound; } public boolean isBitstreamFound() { return bitstreamFound; } public void setBitstreamFound(boolean bitstreamFound) { this.bitstreamFound = bitstreamFound; } }
[ "kevin@mire.be" ]
kevin@mire.be
6240bf3195c61eda7ac6e488b8bf5f42a3a5b31e
464bd8894b09afb519dba54c8dbf0620a46d4155
/src/cn/bbs/common/Utils.java
59a74d2f455e18761126b7d038708c2fd488981c
[]
no_license
zhuifengzheng/bbs
bcdd2d835bce50930a879a5e01fdc18551f0ddf1
dd6003098e51bd49d6f909c4880def973d1bc8fa
refs/heads/master
2021-01-17T17:29:39.942443
2016-08-17T03:11:34
2016-08-17T03:11:34
65,872,408
0
0
null
null
null
null
GB18030
Java
false
false
740
java
package cn.bbs.common; import java.util.Date; public class Utils { /** * 将指定数据转换为整数类型 * @param obj * @param defaultValue * @return */ public static int convetToInt(Object obj,int defaultValue){ if(obj == null){ return defaultValue; }else{ try{ return Integer.parseInt(obj.toString()); }catch (Exception e) { return defaultValue; } } } public static String getHello(){ Date date=new Date(); int hours = date.getHours(); String hi="晚上好"; if(hours>6 && hours<9){ hi="早上好"; } if(hours>9 && hours<12){ hi="上午好"; } if(hours>12 && hours<14){ hi="中午好"; } if(hours>14 && hours<18){ hi="下午好"; } return hi; } }
[ "2581379953@qq.com" ]
2581379953@qq.com
29b224a5fb9385eae9c1fb0eb7cd790d6bd9b1bc
79d64a5d04e89de03c8b1fa9cf39c357dd8b065d
/mklib/nestedvm/nestedvm-2009-08-09/src/org/ibex/nestedvm/Compiler.java
03515ad63e3f52aec0e60a374b002ef075459e7c
[]
no_license
zhaozhihua2008/jerl
39c7a61ace647c9843298988b1918c4fee325f7b
cd3eb25a9d2364e6dfcc5e11e1d75aba97031dba
refs/heads/master
2022-02-02T05:08:45.783837
2015-04-09T14:52:39
2015-04-09T14:52:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
22,839
java
// Copyright 2000-2005 the Contributors, as shown in the revision logs. // Licensed under the Apache Public Source License 2.0 ("the License"). // You may not use this file except in compliance with the License. package org.ibex.nestedvm; import java.util.*; import java.io.*; import org.ibex.nestedvm.util.*; public abstract class Compiler implements Registers { /** The ELF binary being read */ ELF elf; /** The name of the class beging generated */ final String fullClassName; /** The name of the binary this class is begin generated from */ String source = "unknown.mips.binary"; public void setSource(String source) { this.source = source; } /** Thrown when the compilation fails for some reason */ static class Exn extends Exception { public Exn(String s) { super(s); } } // Set this to true to enable fast memory access // When this is enabled a Java RuntimeException will be thrown when a page fault occures. When it is disabled // a FaultException will be throw which is easier to catch and deal with, however. as the name implies, this is slower boolean fastMem = true; // This MUST be a power of two. If it is not horrible things will happen // NOTE: This value can be much higher without breaking the classfile // specs (around 1024) but Hotstop seems to do much better with smaller // methods. int maxInsnPerMethod = 128; // non-configurable int maxBytesPerMethod; int methodMask; int methodShift; void maxInsnPerMethodInit() throws Exn { if((maxInsnPerMethod&(maxInsnPerMethod-1)) != 0) throw new Exn("maxBytesPerMethod is not a power of two"); maxBytesPerMethod = maxInsnPerMethod*4; methodMask = ~(maxBytesPerMethod-1); while(maxBytesPerMethod>>>methodShift != 1) methodShift++; } // True to try to determine which case statement are needed and only include them boolean pruneCases = true; boolean assumeTailCalls = true; // True to insert some code in the output to help diagnore compiler problems boolean debugCompiler = false; // True to print various statistics about the compilation boolean printStats = false; // True to generate runtime statistics that slow execution down significantly boolean runtimeStats = false; boolean supportCall = true; boolean nullPointerCheck = false; String runtimeClass = "org.ibex.nestedvm.Runtime"; String hashClass = "java.util.Hashtable"; boolean unixRuntime; boolean lessConstants; boolean singleFloat; int pageSize = 4096; int totalPages = 65536; int pageShift; boolean onePage; void pageSizeInit() throws Exn { if((pageSize&(pageSize-1)) != 0) throw new Exn("pageSize not a multiple of two"); if((totalPages&(totalPages-1)) != 0) throw new Exn("totalPages not a multiple of two"); while(pageSize>>>pageShift != 1) pageShift++; } /** A set of all addresses that can be jumped too (only available if pruneCases == true) */ Hashtable jumpableAddresses; /** Some important symbols */ ELF.Symbol userInfo, gp; private static void usage() { System.err.println("Usage: java Compiler [-outfile output.java] [-o options] [-dumpoptions] <classname> <binary.mips>"); System.err.println("-o takes mount(8) like options and can be specified multiple times"); System.err.println("Available options:"); for(int i=0;i<options.length;i+=2) System.err.print(options[i] + ": " + wrapAndIndent(options[i+1],18-2-options[i].length(),18,62)); System.exit(1); } public static void main(String[] args) throws IOException { String outfile = null; String outdir = null; String o = null; String className = null; String mipsBinaryFileName = null; String outformat = null; boolean dumpOptions = false; int arg = 0; while(args.length-arg > 0) { if(args[arg].equals("-outfile")) { arg++; if(arg==args.length) usage(); outfile = args[arg]; } else if(args[arg].equals("-d")) { arg++; if(arg==args.length) usage(); outdir = args[arg]; } else if(args[arg].equals("-outformat")) { arg++; if(arg==args.length) usage(); outformat = args[arg]; } else if(args[arg].equals("-o")) { arg++; if(arg==args.length) usage(); if(o==null || o.length() == 0) o = args[arg]; else if(args[arg].length() != 0) o += "," + args[arg]; } else if(args[arg].equals("-dumpoptions")) { dumpOptions = true; } else if(className == null) { className = args[arg]; } else if(mipsBinaryFileName == null) { mipsBinaryFileName = args[arg]; } else { usage(); } arg++; } if(className == null || mipsBinaryFileName == null) usage(); Seekable mipsBinary = new Seekable.File(mipsBinaryFileName); Writer w = null; OutputStream os = null; Compiler comp = null; if(outformat == null || outformat.equals("class")) { if(outfile != null) { os = new FileOutputStream(outfile); comp = new ClassFileCompiler(mipsBinary,className,os); } else if(outdir != null) { File f = new File(outdir); if(!f.isDirectory()) { System.err.println(outdir + " doesn't exist or is not a directory"); System.exit(1); } comp = new ClassFileCompiler(mipsBinary,className,f); } else { System.err.println("Refusing to write a classfile to stdout - use -outfile foo.class"); System.exit(1); } } else if(outformat.equals("javasource") || outformat .equals("java")) { w = outfile == null ? new OutputStreamWriter(System.out): new FileWriter(outfile); comp = new JavaSourceCompiler(mipsBinary,className,w); } else { System.err.println("Unknown output format: " + outformat); System.exit(1); } comp.parseOptions(o); comp.setSource(mipsBinaryFileName); if(dumpOptions) { System.err.println("== Options =="); for(int i=0;i<options.length;i+=2) System.err.println(options[i] + ": " + comp.getOption(options[i]).get()); System.err.println("== End Options =="); } try { comp.go(); } catch(Exn e) { System.err.println("Compiler Error: " + e.getMessage()); System.exit(1); } finally { if(w != null) w.close(); if(os != null) os.close(); } } public Compiler(Seekable binary, String fullClassName) throws IOException { this.fullClassName = fullClassName; elf = new ELF(binary); if(elf.header.type != ELF.ET_EXEC) throw new IOException("Binary is not an executable"); if(elf.header.machine != ELF.EM_MIPS) throw new IOException("Binary is not for the MIPS I Architecture"); if(elf.ident.data != ELF.ELFDATA2MSB) throw new IOException("Binary is not big endian"); } abstract void _go() throws Exn, IOException; private boolean used; public void go() throws Exn, IOException { if(used) throw new RuntimeException("Compiler instances are good for one shot only"); used = true; if(onePage && pageSize <= 4096) pageSize = 4*1024*1024; if(nullPointerCheck && !fastMem) throw new Exn("fastMem must be enabled for nullPointerCheck to be of any use"); if(onePage && !fastMem) throw new Exn("fastMem must be enabled for onePage to be of any use"); if(totalPages == 1 && !onePage) throw new Exn("totalPages == 1 and onePage is not set"); if(onePage) totalPages = 1; maxInsnPerMethodInit(); pageSizeInit(); // Get a copy of the symbol table in the elf binary ELF.Symtab symtab = elf.getSymtab(); if(symtab == null) throw new Exn("Binary has no symtab (did you strip it?)"); ELF.Symbol sym; userInfo = symtab.getGlobalSymbol("user_info"); gp = symtab.getGlobalSymbol("_gp"); if(gp == null) throw new Exn("no _gp symbol (did you strip the binary?)"); if(pruneCases) { // Find all possible branches jumpableAddresses = new Hashtable(); jumpableAddresses.put(new Integer(elf.header.entry),Boolean.TRUE); ELF.SHeader text = elf.sectionWithName(".text"); if(text == null) throw new Exn("No .text segment"); findBranchesInSymtab(symtab,jumpableAddresses); for(int i=0;i<elf.sheaders.length;i++) { ELF.SHeader sheader = elf.sheaders[i]; String name = sheader.name; // if this section doesn't get loaded into our address space don't worry about it if(sheader.addr == 0x0) continue; if(name.equals(".data") || name.equals(".sdata") || name.equals(".rodata") || name.equals(".ctors") || name.equals(".dtors")) findBranchesInData(new DataInputStream(sheader.getInputStream()),sheader.size,jumpableAddresses,text.addr,text.addr+text.size); } findBranchesInText(text.addr,new DataInputStream(text.getInputStream()),text.size,jumpableAddresses); } if(unixRuntime && runtimeClass.startsWith("org.ibex.nestedvm.")) runtimeClass = "org.ibex.nestedvm.UnixRuntime"; for(int i=0;i<elf.sheaders.length;i++) { String name = elf.sheaders[i].name; if((elf.sheaders[i].flags & ELF.SHF_ALLOC) !=0 && !( name.equals(".text")|| name.equals(".data") || name.equals(".sdata") || name.equals(".rodata") || name.equals(".ctors") || name.equals(".dtors") || name.equals(".bss") || name.equals(".sbss"))) throw new Exn("Unknown section: " + name); } _go(); } private void findBranchesInSymtab(ELF.Symtab symtab, Hashtable jumps) { ELF.Symbol[] symbols = symtab.symbols; int n=0; for(int i=0;i<symbols.length;i++) { ELF.Symbol s = symbols[i]; if(s.type == ELF.Symbol.STT_FUNC) { if(jumps.put(new Integer(s.addr),Boolean.TRUE) == null) { //System.err.println("Adding symbol from symtab: " + s.name + " at " + toHex(s.addr)); n++; } } } if(printStats) System.err.println("Found " + n + " additional possible branch targets in Symtab"); } private void findBranchesInText(int base, DataInputStream dis, int size, Hashtable jumps) throws IOException { int count = size/4; int pc = base; int n=0; int[] lui_val = new int[32]; int[] lui_pc = new int[32]; //Interpreter inter = new Interpreter(source); for(int i=0;i<count;i++,pc+=4) { int insn = dis.readInt(); int op = (insn >>> 26) & 0xff; int rs = (insn >>> 21) & 0x1f; int rt = (insn >>> 16) & 0x1f; int signedImmediate = (insn << 16) >> 16; int unsignedImmediate = insn & 0xffff; int branchTarget = signedImmediate; int jumpTarget = (insn & 0x03ffffff); int subcode = insn & 0x3f; switch(op) { case 0: switch(subcode) { case 9: // JALR if(jumps.put(new Integer(pc+8),Boolean.TRUE) == null) n++; // return address break; case 12: // SYSCALL if(jumps.put(new Integer(pc+4),Boolean.TRUE) == null) n++; break; } break; case 1: switch(rt) { case 16: // BLTZAL case 17: // BGTZAL if(jumps.put(new Integer(pc+8),Boolean.TRUE) == null) n++; // return address // fall through case 0: // BLTZ case 1: // BGEZ if(jumps.put(new Integer(pc+branchTarget*4+4),Boolean.TRUE) == null) n++; break; } break; case 3: // JAL if(jumps.put(new Integer(pc+8),Boolean.TRUE) == null) n++; // return address // fall through case 2: // J if(jumps.put(new Integer((pc&0xf0000000)|(jumpTarget << 2)),Boolean.TRUE) == null) n++; break; case 4: // BEQ case 5: // BNE case 6: // BLEZ case 7: // BGTZ if(jumps.put(new Integer(pc+branchTarget*4+4),Boolean.TRUE) == null) n++; break; case 9: { // ADDIU if(pc - lui_pc[rs] <= 4*32) { int t = (lui_val[rs]<<16)+signedImmediate; if((t&3)==0 && t >= base && t < base+size) { if(jumps.put(new Integer(t),Boolean.TRUE) == null) { //System.err.println("Possible jump to " + toHex(t) + " (" + inter.sourceLine(t) + ") from " + toHex(pc) + " (" + inter.sourceLine(pc) + ")"); n++; } } // we just blew it away if(rt == rs) lui_pc[rs] = 0; } break; } case 15: { // LUI lui_val[rt] = unsignedImmediate; lui_pc[rt] = pc; break; } case 17: // FPU Instructions switch(rs) { case 8: // BC1F, BC1T if(jumps.put(new Integer(pc+branchTarget*4+4),Boolean.TRUE) == null) n++; break; } break; } } dis.close(); if(printStats) System.err.println("Found " + n + " additional possible branch targets in Text segment"); } private void findBranchesInData(DataInputStream dis, int size, Hashtable jumps, int textStart, int textEnd) throws IOException { int count = size/4; int n=0; for(int i=0;i<count;i++) { int word = dis.readInt(); if((word&3)==0 && word >= textStart && word < textEnd) { if(jumps.put(new Integer(word),Boolean.TRUE) == null) { //System.err.println("Added " + toHex(word) + " as possible branch target (fron data segment)"); n++; } } } dis.close(); if(n>0 && printStats) System.err.println("Found " + n + " additional possible branch targets in Data segment"); } // Helper functions for pretty output final static String toHex(int n) { return "0x" + Long.toString(n & 0xffffffffL, 16); } final static String toHex8(int n) { String s = Long.toString(n & 0xffffffffL, 16); StringBuffer sb = new StringBuffer("0x"); for(int i=8-s.length();i>0;i--) sb.append('0'); sb.append(s); return sb.toString(); } final static String toOctal3(int n) { char[] buf = new char[3]; for(int i=2;i>=0;i--) { buf[i] = (char) ('0' + (n & 7)); n >>= 3; } return new String(buf); } // Option parsing private class Option { private java.lang.reflect.Field field; public Option(String name) throws NoSuchFieldException { field = name==null ? null : Compiler.class.getDeclaredField(name); } public void set(Object val) { if(field == null) return; try { /*field.setAccessible(true); NOT in JDK 1.1 */ field.set(Compiler.this,val); } catch(IllegalAccessException e) { System.err.println(e); } } public Object get() { if(field == null) return null; try { /*field.setAccessible(true); NOT in JDK 1.1 */ return field.get(Compiler.this); } catch(IllegalAccessException e) { System.err.println(e); return null; } } public Class getType() { return field == null ? null : field.getType(); } } private static String[] options = { "fastMem", "Enable fast memory access - RuntimeExceptions will be thrown on faults", "nullPointerCheck", "Enables checking at runtime for null pointer accessses (slows things down a bit, only applicable with fastMem)", "maxInsnPerMethod", "Maximum number of MIPS instructions per java method (128 is optimal with Hotspot)", "pruneCases", "Remove unnecessary case 0xAABCCDD blocks from methods - may break some weird code", "assumeTailCalls", "Assume the JIT optimizes tail calls", "optimizedMemcpy", "Use an optimized java version of memcpy where possible", "debugCompiler", "Output information in the generated code for debugging the compiler - will slow down generated code significantly", "printStats", "Output some useful statistics about the compilation", "runtimeStats", "Keep track of some statistics at runtime in the generated code - will slow down generated code significantly", "supportCall", "Keep a stripped down version of the symbol table in the generated code to support the call() method", "runtimeClass", "Full classname of the Runtime class (default: Runtime) - use this is you put Runtime in a package", "hashClass", "Full classname of a Hashtable class (default: java.util.HashMap) - this must support get() and put()", "unixRuntime", "Use the UnixRuntime (has support for fork, wai, du, pipe, etc)", "pageSize", "The page size (must be a power of two)", "totalPages", "Total number of pages (total mem = pageSize*totalPages, must be a power of two)", "onePage", "One page hack (FIXME: document this better)", "lessConstants", "Use less constants at the cost of speed (FIXME: document this better)", "singleFloat", "Support single precision (32-bit) FP ops only" }; private Option getOption(String name) { name = name.toLowerCase(); try { for(int i=0;i<options.length;i+=2) if(options[i].toLowerCase().equals(name)) return new Option(options[i]); return null; } catch(NoSuchFieldException e) { return null; } } public void parseOptions(String opts) { if(opts == null || opts.length() == 0) return; StringTokenizer st = new StringTokenizer(opts,","); while(st.hasMoreElements()) { String tok = st.nextToken(); String key; String val; if(tok.indexOf("=") != -1) { key = tok.substring(0,tok.indexOf("=")); val = tok.substring(tok.indexOf("=")+1); } else if(tok.startsWith("no")) { key = tok.substring(2); val = "false"; } else { key = tok; val = "true"; } Option opt = getOption(key); if(opt == null) { System.err.println("WARNING: No such option: " + key); continue; } if(opt.getType() == String.class) opt.set(val); else if(opt.getType() == Integer.TYPE) try { opt.set(parseInt(val)); } catch(NumberFormatException e) { System.err.println("WARNING: " + val + " is not an integer"); } else if(opt.getType() == Boolean.TYPE) opt.set(new Boolean(val.toLowerCase().equals("true")||val.toLowerCase().equals("yes"))); else throw new Error("Unknown type: " + opt.getType()); } } private static Integer parseInt(String s) { int mult = 1; s = s.toLowerCase(); if(!s.startsWith("0x") && s.endsWith("m")) { s = s.substring(0,s.length()-1); mult = 1024*1024; } else if(!s.startsWith("0x") && s.endsWith("k")) { s = s.substring(0,s.length()-1); mult = 1024; } int n; if(s.length() > 2 && s.startsWith("0x")) n = Integer.parseInt(s.substring(2),16); else n = Integer.parseInt(s); return new Integer(n*mult); } private static String wrapAndIndent(String s, int firstindent, int indent, int width) { StringTokenizer st = new StringTokenizer(s," "); StringBuffer sb = new StringBuffer(); for(int i=0;i<firstindent;i++) sb.append(' '); int sofar = 0; while(st.hasMoreTokens()) { String tok = st.nextToken(); if(tok.length() + sofar + 1 > width && sofar > 0) { sb.append('\n'); for(int i=0;i<indent;i++) sb.append(' '); sofar = 0; } else if(sofar > 0) { sb.append(' '); sofar++; } sb.append(tok); sofar += tok.length(); } sb.append('\n'); return sb.toString(); } // This ugliness is to work around a gcj static linking bug (Bug 12908) // The best solution is to force gnu.java.locale.Calendar to be linked in but this'll do static String dateTime() { try { return new Date().toString(); } catch(RuntimeException e) { return "<unknown>"; } } }
[ "forge@zero.(none)" ]
forge@zero.(none)
c0ae8b6fe42e0167cfc8a00a72914c1edb3c376a
6cae6017dd4b8b0eeb85f7fdd38aaa9eb2c82ca2
/src/main/java/com/singtel/assignment/domain/ChickenSay.java
906292cc5f004a7852781daacda4a86c26da923d
[]
no_license
phatn/code-assignment
c8c2700e6eb9d44938a93ec4868bd13df1ba550c
bee80a8c9ec8ecc5a9cecb7033b429b687c3e6d2
refs/heads/master
2022-04-26T11:39:27.758703
2020-04-18T09:31:54
2020-04-18T09:31:54
256,696,063
0
0
null
null
null
null
UTF-8
Java
false
false
166
java
package com.singtel.assignment.domain; public class ChickenSay implements SayBehavior { public void say() { System.out.println("Cluck, cluck"); } }
[ "phatnguyentanit@gmail.com" ]
phatnguyentanit@gmail.com
7eaeccfb04f877b6aca535fe6dfe459791727240
9906374567855059c506dde6f76f4090ff3a1baf
/src/main/java/org/xmlcml/norma/grobid/GrobidFigDescElement.java
ca56cca91f6806d14f8bbe43f10e565ec5e7e254
[ "Apache-2.0" ]
permissive
passysosysmas/norma
f70a7b5399ba5d5ccb2e25d99130256377e35eac
e652321bc6238980aa9e83839653c5d1fb093bd3
refs/heads/master
2021-01-19T23:41:10.601951
2017-04-13T07:44:32
2017-04-13T07:44:32
89,010,715
0
0
null
2017-04-21T18:04:46
2017-04-21T18:04:46
null
UTF-8
Java
false
false
379
java
package org.xmlcml.norma.grobid; import org.apache.log4j.Level; import org.apache.log4j.Logger; public class GrobidFigDescElement extends GrobidElement { public static final String TAG = "figDesc"; private static final Logger LOG = Logger.getLogger(GrobidFigDescElement.class); static { LOG.setLevel(Level.DEBUG); } public GrobidFigDescElement() { super(TAG); } }
[ "peter.murray.rust@googlemail.com" ]
peter.murray.rust@googlemail.com
1d80612a049b64548c1a010119349ba4d8ea8c60
4c9086347e653b003726cb2ea990fe8290716617
/src/test/java/de/paydirekt/client/common/Sha256EncoderTest.java
86d87bc15319b3671382134d89621e690629bbad
[ "MIT" ]
permissive
gtxiqbal/paydirekt-java
a2a7172b93614c10a2af13a21343af5eecaf5fa6
1c07be39581d1f5e4f54d8888ffe9a7290a0b1c4
refs/heads/master
2023-05-26T12:23:45.720844
2021-06-10T06:32:13
2021-06-10T06:32:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
555
java
package de.paydirekt.client.common; import org.junit.Test; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; /** * Unit Test for {@link Sha256Encoder} */ public class Sha256EncoderTest { private static final String INPUT = "max@muster.de"; private static final String EXPECTED_OUTPUT = "6JL4VUgVxkq2m+a9I6ScfW2ofJP5y6wsvSaHIsX+iLs="; @Test public void shouldEncodeToSHA256() { String result = Sha256Encoder.encodeToSha256(INPUT); assertThat(result, is(EXPECTED_OUTPUT)); } }
[ "Mihael.Gorupec@Senacor.com" ]
Mihael.Gorupec@Senacor.com
83c33838498fc441b635ba198d7d8776249f781b
73dc8608f7f6f78bc8d88fdb432b2b4bc20a15c1
/src/main/java/com/jockie/bot/core/argument/factory/IArgumentFactory.java
9c7e3152a5116b8e617fb3a9dfd81090b3225875
[ "Apache-2.0" ]
permissive
Shea4/Jockie-Utils
74a7d24d47a2307cd4bd58b5b1c17de0271cb821
dca829e4d91517d5d61d15c06f049310ae629f06
refs/heads/master
2021-06-27T03:37:31.228364
2019-08-14T13:06:46
2019-08-14T13:06:46
205,548,805
0
0
Apache-2.0
2019-08-31T13:35:11
2019-08-31T13:35:11
null
UTF-8
Java
false
false
1,879
java
package com.jockie.bot.core.argument.factory; import java.lang.reflect.Parameter; import com.jockie.bot.core.argument.IArgument; import com.jockie.bot.core.argument.parser.IArgumentParser; public interface IArgumentFactory { /** * @param parameter the parameter to create the argument from * * @return the created argument */ public IArgument<?> createArgument(Parameter parameter); /** * @param type the type of the parser * @param parser the parser which will be used to parse arguments by the provided type * * @return the {@link IArgumentFactory} instance, useful for chaining */ public <T> IArgumentFactory registerParser(Class<T> type, IArgumentParser<T> parser); /** * @param type the type of the parser to unregister * * @return the {@link IArgumentFactory} instance, useful for chaining */ public IArgumentFactory unregisterParser(Class<?> type); /** * Aliases are used as way to have one type of argument be parsed as another, for instance * boolean can be parsed as {@link Boolean} * <br><br> * For instance: * <br> * <b>registerParserAlias(boolean.class, Boolean.class)</b> * <br> * <b>registerParserAlias(User.class, UserImpl.class)</b> * * @param type the type to register as an alias * @param alias the alias type * * @return the {@link IArgumentFactory} instance, useful for chaining */ public <T> IArgumentFactory registerParserAlias(Class<T> type, Class<? extends T> alias); /** * @param type the type to unregister as an alias * * @return the {@link IArgumentFactory} instance, useful for chaining */ public IArgumentFactory unregisterParserAlias(Class<?> type); /** * @param type the type to get the parser from * * @return the registered parser or null if there is none for the provided type */ public <T> IArgumentParser<T> getParser(Class<T> type); }
[ "21Joakim@users.noreply.github.com" ]
21Joakim@users.noreply.github.com
4f1fe31ba87d58da7913fdaf48c196ebc500faa0
687fbe32adf4099d511abb4d458bfcf9e6be650e
/GsonRequestDemo/app/src/main/java/com/iamasoldier6/gsonrequestdemo/GsonRequest.java
6c36276be39b21077a4bcec93f4b533b1f01d6db
[]
no_license
brucejing/AndroidExerciseDemos
2b7b0e5bd38ac3d1c9def8d2bf82fd63526c9e57
02df9d0821e6da016881582d3ad31f1b5180029e
refs/heads/master
2020-06-17T16:38:25.534323
2018-05-06T06:19:35
2018-05-06T06:19:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,534
java
package com.iamasoldier6.gsonrequestdemo; import com.android.volley.NetworkResponse; import com.android.volley.ParseError; import com.android.volley.Request; import com.android.volley.Response; import com.android.volley.toolbox.HttpHeaderParser; import com.google.gson.Gson; import com.google.gson.JsonSyntaxException; import java.io.UnsupportedEncodingException; /** * Created by Iamasoldier6 on 5/5/16. */ public class GsonRequest<T> extends Request<T> { private final Gson gson = new Gson(); private final Class<T> clazz; private final Response.Listener<T> listener; public GsonRequest(String url, Class<T> clazz, Response.Listener<T> listener, Response.ErrorListener errorListener) { super(Method.GET, url, errorListener); this.clazz = clazz; this.listener = listener; } @Override protected void deliverResponse(T response) { listener.onResponse(response); } @Override protected Response<T> parseNetworkResponse(NetworkResponse response) { try { String json = new String(response.data, HttpHeaderParser.parseCharset(response.headers)); return Response.success(gson.fromJson(json, clazz), HttpHeaderParser.parseCacheHeaders(response)); } catch (UnsupportedEncodingException e) { return Response.error(new ParseError(e)); } catch (JsonSyntaxException e) { return Response.error(new ParseError(e)); } } }
[ "zebron623@163.com" ]
zebron623@163.com
6a79bfcff26ac5dbdd41177ef594e5ed5d250182
60995c05300f4726eb24637d5b1a8c34915ac0f7
/app/src/main/java/com/arellomobile/picwall/events/NeedPrevPictureEvent.java
94a13c8faf355e7c36538ce2b5d4ec2cafe74643
[]
no_license
Kvisaz/PicWall
859b07e088ffa781f5dbe0773a03e721b9e35ea6
7fe231562088da343400fccd76e47c6479f7aaa2
refs/heads/master
2020-12-24T21:22:35.853119
2016-04-22T05:35:25
2016-04-22T05:35:25
56,288,195
0
0
null
null
null
null
UTF-8
Java
false
false
80
java
package com.arellomobile.picwall.events; public class NeedPrevPictureEvent { }
[ "sergey.zoomaster@gmail.com" ]
sergey.zoomaster@gmail.com
8f9a48f78f0ed335cf46f1e83f9ed5ecf15ec215
3e54556442d184dd787ace04227d967c8319258d
/jDart-TACAS2016/teamcoco-benchmarks-0957aa6ec436/src/main/java/power/PowExample.java
38d9ee219157e524ff290027230ea162c6ac134f
[]
no_license
sohah/veritestingBenchmarks
f5d8760c368e82780127bdf7bc6805d08fc7b7df
98b9fe577168aedc13e1b9d2ebb6f69dab7667e9
refs/heads/master
2021-05-25T09:54:43.135774
2018-10-11T22:26:37
2018-10-11T22:26:37
127,031,010
1
1
null
null
null
null
UTF-8
Java
false
false
805
java
package power; public class PowExample { public static void test(int x, int y) { int path = 0; if (x > 0) { // Changed from // if (y == Math.pow(x, 2.0)) { // to avoid double--int conversion (pdinges) if (y == x*x) { System.out.println("Solved S0"); path = 1; } else { System.out.println("Solved S1"); path = 2; } if (y > 8) { //if (x > 1 && y > 3) { if (path == 1) System.out.println("Solved S0;S3"); if (path == 2) System.out.println("Solved S1;S3"); } else { if (path == 1) System.out.println("Solved S0;S4"); if (path == 2) System.out.println("Solved S1;S4"); } } } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub test(2,10); } }
[ "mike.whalen@gmail.com" ]
mike.whalen@gmail.com
1b75b83fb7848febe251cf4ce863a0951416a5eb
21f4881b88298ceb15759cfe4f590a830aa3dd30
/src/test/java/com/toy/jpa/domain/MemberDummy.java
cf45edaaf9f2b8352ef024b03e8f2f332ac371ed
[]
no_license
kobeomseok95/toy_jpa
6be636a28cb5cfe3542902c095cd4e8dee000507
cf49fe94e0da866ee98cfdae0f2c3d46022c1f15
refs/heads/master
2023-02-15T18:54:24.321954
2021-01-16T13:43:00
2021-01-16T13:43:00
326,421,516
0
0
null
null
null
null
UTF-8
Java
false
false
1,157
java
package com.toy.jpa.domain; import com.toy.jpa.domain.status.ExitStatus; import java.util.ArrayList; public class MemberDummy { public static Member memberBuilder() { return Member.builder() .id(1L) .name("test") .password("test") .email("test@email.com") .status(ExitStatus.JOIN) .address( addressBuilder() ) .boards(new ArrayList<>()) .comments(new ArrayList<>()) .build(); } public static Member exitMemberBuilder() { return Member.builder() .id(1L) .name("test") .password("test") .email("test@email.com") .status(ExitStatus.EXIT) .address( addressBuilder() ) .build(); } public static Address addressBuilder() { return Address.builder() .city("test") .street("test") .zipcode("test") .build(); } }
[ "37062337+kobeomseok95@users.noreply.github.com" ]
37062337+kobeomseok95@users.noreply.github.com
a5078993f0e117a8158d72bed8ee63da46d14324
93c468b2b1d8c8b548f27ea7a916e3b761df5fdf
/app/src/main/java/quickconnectfamily/json/tests/JSONUtilitiesTest.java
3ccba7b9bf3dd7f614616bde9ed7306e5d97d159
[]
no_license
siricenter/SRA_Android
5db9824d5b40cc703bbe48dc2427a74a4b0ea7fe
1dfe1a0bb9c3e11c87ff6ecfd01c6bb47159710a
refs/heads/master
2020-06-06T17:11:27.394308
2015-05-20T15:58:33
2015-05-20T15:58:33
28,610,143
0
0
null
null
null
null
UTF-8
Java
false
false
21,857
java
/* * Since JSONUtilities methods use the JSONInput and JSONOutput streams this test class * tests those classes as well as the JSONUtilities class */ package quickconnectfamily.json.tests; import quickconnectfamily.json.JSONUtilities; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import static quickconnectfamily.json.tests.Assert.*; import static quickconnectfamily.json.tests.Assert.Assert; //import javax.swing.JButton; //import android.util.SparseArray; public class JSONUtilitiesTest { /* * Since the stringify method is a facade for the underlying JSONOutputStream writeObject method it only * needs to be tested to verify the facade is working correctly. */ public static void testStringifySerializable() { String jsonString = null; /* * Testing a valid 'happy path' scenario */ TestObject anObject = new TestObject("Hello there.", 7, new Date(1067899)); try { jsonString = JSONUtilities.stringify(anObject); System.out.println(jsonString); Assert( jsonString.equals("{\"theDate\":\"1969-12-31 17:17:47.899\",\"theString\":\"Hello there.\",\"theInt\":7}")); //System.out.println("happy path object: "+jsonString); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing a null parameter */ try { jsonString = JSONUtilities.stringify((Serializable)null); Assert( jsonString == null); //System.out.println("null serializable: "+jsonString); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing a null attribute */ TestObject anObjectWithNull = new TestObject(null, 7, new Date(1067899)); try { jsonString = JSONUtilities.stringify(anObjectWithNull); Assert( jsonString.equals("{\"theDate\":\"1969-12-31 17:17:47.899\",\"theInt\":7}")); //System.out.println("null attribute: "+jsonString); } catch (Exception e) { e.printStackTrace(); return; } /* * Test a string with escaped quotes as an attribute */ String stringWithEscapes = "hello \"bob\". What do you want?"; TestObject anObjectWithEscapedString = new TestObject(stringWithEscapes, 7, new Date(1067899)); try { jsonString = JSONUtilities.stringify(anObjectWithEscapedString); System.out.println(jsonString); Assert( jsonString.equals("{\"theDate\":\"1969-12-31 17:17:47.899\",\"theString\":\"hello \\\"bob\\\". What do you want?\",\"theInt\":7}")); } catch (Exception e1) { e1.printStackTrace(); return; } /* * Testing an array of Objects. */ try { Object[] anObjectArray = {new Integer(4), "Hello", new Date(222222222)}; jsonString = JSONUtilities.stringify(anObjectArray); System.out.println("Object[]: "+jsonString); Assert( jsonString.equals("[4,\"Hello\",\"1970-01-03 06:43:42.222\"]")); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing an array of ints. */ try { int[] anArray = {5, -2, 0,100000}; jsonString = JSONUtilities.stringify(anArray); //System.out.println("int[]: "+jsonString); Assert( jsonString.equals("[5,-2,0,100000]")); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing an array of doubles. */ try { double[] anArray = {5.03, -2015.009999999999, 0.0,0.999999999999}; jsonString = JSONUtilities.stringify(anArray); Assert( jsonString.equals("[5.03,-2015.009999999999,0.0,0.999999999999]")); //System.out.println("double[]: "+jsonString); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing an array of bytes. */ try { byte[] anArray = "This is an array of bytes".getBytes(); jsonString = JSONUtilities.stringify(anArray); Assert( jsonString != null); Assert( jsonString.equals("[\"84\",\"104\",\"105\",\"115\",\"32\",\"105\",\"115\",\"32\",\"97\",\"110\",\"32\",\"97\",\"114\",\"114\",\"97\",\"121\",\"32\",\"111\",\"102\",\"32\",\"98\",\"121\",\"116\",\"101\",\"115\"]")); //System.out.println("byte[]: "+jsonString); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing an array of chars. */ try { char[] anArray = "This is an array of chars".toCharArray(); jsonString = JSONUtilities.stringify(anArray); Assert( jsonString != null); //System.out.println("char[]: "+jsonString); Assert( jsonString.equals("[\"T\",\"h\",\"i\",\"s\",\" \",\"i\",\"s\",\" \",\"a\",\"n\",\" \",\"a\",\"r\",\"r\",\"a\",\"y\",\" \",\"o\",\"f\",\" \",\"c\",\"h\",\"a\",\"r\",\"s\"]")); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing an array with nulls in it */ Object[] objArr = new Object[5]; objArr[0] = null; objArr[1] = new Integer(7); objArr[2] = new Double(8.3); objArr[3] = null; objArr[4] = null; try { jsonString = JSONUtilities.stringify(objArr); String testString = "[null,7,8.3,null,null]"; System.out.println(jsonString); System.out.println(testString); Assert(jsonString.equals(testString)); } catch (Exception e) { e.printStackTrace(); return; } System.out.println("Passed testStringifySerializable"); } public static void testStringifyCollections(){ Date testDate = new Date(1067899); String jsonString = null; ArrayList testListHappyPath = new ArrayList(); testListHappyPath.add(9L); testListHappyPath.add(8L); testListHappyPath.add(7L); try { jsonString = JSONUtilities.stringify(testListHappyPath); Assert( jsonString.equals("[9,8,7]")); //System.out.println("ArrayList: "+testString); } catch (Exception e) { e.printStackTrace(); return; } /* * happy path map test */ HashMap testMapHappyPath = new HashMap(); testMapHappyPath.put("theDate", testDate); testMapHappyPath.put("some string", "hello \"bob\" \t"); testMapHappyPath.put("someDouble", 87.3); try { jsonString = JSONUtilities.stringify(testMapHappyPath); String testString = "{\"someDouble\":87.3,\"some string\":\"hello \\\"bob\\\" \\t\",\"theDate\":\"1969-12-31 17:17:47.899\"}"; System.out.println(jsonString); Assert(jsonString.equals(testString)); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing happy path HashMap with Booleans */ HashMap testMap = new HashMap(); Boolean first = new Boolean(true); Boolean second = new Boolean(true); testMap.put("config_App_6237", first); testMap.put("Init_LoadResourceLastCacheDate", second); try { jsonString = JSONUtilities.stringify(testMap); Assert(jsonString.equals("{\"config_App_6237\":true,\"Init_LoadResourceLastCacheDate\":true}")); //System.out.println("map: "+jsonString); } catch (Exception e1) { e1.printStackTrace(); return; } HashMap mapWithNullValue = new HashMap(); long bigNumber = Long.MAX_VALUE; mapWithNullValue.put("real value", bigNumber); mapWithNullValue.put("null value", null); try { jsonString = JSONUtilities.stringify(mapWithNullValue); System.out.println("null: "+jsonString); Assert(jsonString.equals("{\"real value\":9223372036854775807}")); } catch (Exception e) { e.printStackTrace(); return; } ArrayList arrayWithNullValues = new ArrayList(); arrayWithNullValues.add(null); arrayWithNullValues.add(17); arrayWithNullValues.add(null); arrayWithNullValues.add(null); try { jsonString = JSONUtilities.stringify(arrayWithNullValues); System.out.println(jsonString); Assert(jsonString.equals("[null,17,null,null]")); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("Passed testStringifyCollections"); } public static void testStringifySerializableEncoding() { /* * Testing a valid 'happy path' scenario */ TestObject anObject = new TestObject("Hello there.", 7, new Date(1067899)); try { String jsonString = JSONUtilities.stringify(anObject, JSONUtilities.encoding.UNICODE); String testString = "{\"theDate\":\"1969-12-31 17:17:47.889\",\"theString\":\"Hello there.\",\"theInt\":7}"; System.out.println(jsonString); System.out.println(testString); //System.out.println("equal? "+jsonString.equals(testString)); //Assert( jsonString.equals(testString)); } catch (Exception e) { e.printStackTrace(); return; } try { String jsonString = JSONUtilities.stringify(anObject, JSONUtilities.encoding.UTF8); //System.out.println("happy path object UTF8: "+jsonString); Assert( jsonString.equals("{\"theDate\":\"1969-12-31 17:17:47.899\",\"theString\":\"Hello there.\",\"theInt\":7}")); } catch (Exception e) { e.printStackTrace(); //fail("Should not have thrown exception"); } /* * Testing a null parameter */ try { String jsonString = JSONUtilities.stringify((Serializable)null, JSONUtilities.encoding.UNICODE); Assert(jsonString == null); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing a null encoding or other invalid encoding */ try { String jsonString = JSONUtilities.stringify(anObject, (JSONUtilities.encoding)null); Assert( false); } catch (Exception e) {} /* * Testing an array of Objects. awt.Containters should be ignored. */ Object[] anObjectArray = {new Integer(4), "Hello", new Date(45879003)}; try { String jsonString = JSONUtilities.stringify(anObjectArray, JSONUtilities.encoding.UNICODE); Assert( jsonString != null); //Assert( jsonString.equals("[4,\"Hello\",\"Thu Jan 01 05:44:39 MST 1970\"]")); //System.out.println("object array UNICODE: "+jsonString); } catch (Exception e) { e.printStackTrace(); return; } try { String jsonString = JSONUtilities.stringify(anObjectArray, JSONUtilities.encoding.UTF8); Assert( jsonString != null); //Assert( jsonString.equals("[4,\"Hello\",\"Thu Jan 01 05:44:39 MST 1970\"]")); //System.out.println("object array UTF8: "+jsonString); } catch (Exception e) { e.printStackTrace(); return; } char[] someChars = {'a','b','c'}; Object[] annotherObjectArray = {new Integer(4), "Hello", someChars}; try { String jsonString = JSONUtilities.stringify(annotherObjectArray, JSONUtilities.encoding.UNICODE); Assert( jsonString !=null); Assert( jsonString.equals("[4,\"Hello\",[\"a\",\"b\",\"c\"]]")); //System.out.println("Unicode string: "+jsonString); } catch (Exception e) { e.printStackTrace(); return; } try { String jsonString = JSONUtilities.stringify(annotherObjectArray, JSONUtilities.encoding.UTF8); Assert( jsonString != null); //System.out.println("happy path UTF8: "+jsonString); Assert( jsonString.equals("[4,\"Hello\",[\"a\",\"b\",\"c\"]]")); } catch (Exception e) { e.printStackTrace(); return; } System.out.println("Passed testStringifySerializableEncoding"); } public static void testParseString() { try{ //test the happy path with a well formed JSON string. HashMap testMap = (HashMap)JSONUtilities.parse("{\"aNumber\":16.5,\"stringOne\":\"Some sort of string\",\"20\":\"some other stuff\",\"aTester\":{\"stringAtt\":\"hello\",\"doubleAtt\":-4.5,\"doubleObjAtt\":1000.567789,\"listAtt\":[7,\"hello there from list\"],\"parentString\":\"In The Parent\"}}"); Assert( testMap != null); Number aNumber = (Double)testMap.get("aNumber"); Assert( aNumber != null); Assert( aNumber.doubleValue() == 16.5); String aString = (String)testMap.get("stringOne"); Assert( aString != null); Assert( aString.equals("Some sort of string")); aString = (String)testMap.get("20"); Assert( aString != null); Assert( aString.equals("some other stuff")); HashMap anObjectRepresentation = (HashMap)testMap.get("aTester"); Assert( anObjectRepresentation != null); //check the attributes of the object embedded as an attribute of the outer object aString = (String)anObjectRepresentation.get("stringAtt"); Assert( aString != null); Assert( aString.equals("hello")); aNumber = (Double)anObjectRepresentation.get("doubleAtt"); Assert( aNumber != null); Assert( aNumber.doubleValue() == -4.5); //System.out.println("doubleAtt: "+anObjectRepresentation.get("doubleAtt")); aNumber = (Double)anObjectRepresentation.get("doubleObjAtt"); Assert( aNumber != null); Assert( aNumber.doubleValue() == 1000.567789); ArrayList aList = (ArrayList)anObjectRepresentation.get("listAtt"); Assert( aList != null); //check the values of the items in the list Long longNumber = (Long)aList.get(0); Assert( longNumber != null); Assert( longNumber.longValue() == 7); aString = (String)aList.get(1); Assert( aString != null); Assert( aString.equals("hello there from list")); //Check the last attribute of the object embedded as an attribute of the outer object aString = (String)anObjectRepresentation.get("parentString"); Assert( aString != null); Assert( aString.equals("In The Parent")); } catch(Exception e){ e.printStackTrace(); return; } /* * Testing passing a null string parameter. */ try { Object nullObject = JSONUtilities.parse(null); Assert( nullObject == null); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing malformed JSON object. */ try { Object someObject = JSONUtilities.parse("{\"key\": \"anotherKey\":\"a value\"}"); Assert( false); } catch (Exception e) {} /* * Testing malformed JSON array. */ try { Object someObject = JSONUtilities.parse("[90, some stuff, \"other stuff\"]"); Assert( false); } catch (Exception e) {} System.out.println("Passed testParseString"); } public static void testParseStringEncoding() { try{ //test the happy path with a well formed JSON string. /* * UNICODE */ HashMap testMap = (HashMap)JSONUtilities.parse("{\"aNumber\":16.5,\"stringOne\":\"Some sort of string\",\"20\":\"some other stuff\",\"aTester\":{\"stringAtt\":\"hello\",\"doubleAtt\":-4.5,\"doubleObjAtt\":1000.567789,\"listAtt\":[7,\"hello there from list\"],\"parentString\":\"In The Parent\"}}",JSONUtilities.encoding.UNICODE); Number aNumber = (Number)testMap.get("aNumber"); Assert( aNumber != null); Assert( aNumber.doubleValue() == 16.5); String aString = (String)testMap.get("stringOne"); Assert( aString != null); Assert( aString.equals("Some sort of string")); aString = (String)testMap.get("20"); Assert( aString != null); Assert( aString.equals("some other stuff")); HashMap anObjectRepresentation = (HashMap)testMap.get("aTester"); //check the attributes of the object embedded as an attribute of the outer object aString = (String)anObjectRepresentation.get("stringAtt"); Assert( aString != null); Assert( aString.equals("hello")); aNumber = (Number)anObjectRepresentation.get("doubleAtt"); Assert( aNumber != null); Assert( aNumber.doubleValue() == -4.5); aNumber = (Number)anObjectRepresentation.get("doubleObjAtt"); Assert( aNumber != null); Assert( aNumber.doubleValue() == 1000.567789); ArrayList aList = (ArrayList)anObjectRepresentation.get("listAtt"); Assert( aList != null); Assert( aList.size() == 2); //check the values of the items in the list aNumber = (Number)aList.get(0); Assert( aNumber !=null); Assert( aNumber.intValue() == 7); aString = (String)aList.get(1); Assert( aString != null); Assert( aString.equals("hello there from list")); //Check the last attribute of the object embedded as an attribute of the outer object aString = (String)anObjectRepresentation.get("parentString"); Assert( aString != null); Assert( aString.equals("In The Parent")); /* * UTF-8 */ //test the happy path with a well formed JSON string. testMap = (HashMap)JSONUtilities.parse("{\"aNumber\":16.5,\"stringOne\":\"Some sort of string\",\"20\":\"some other stuff\",\"aTester\":{\"stringAtt\":\"hello\",\"doubleAtt\":-4.5,\"doubleObjAtt\":1000.567789,\"listAtt\":[7,\"hello there from list\"],\"parentString\":\"In The Parent\"}}",JSONUtilities.encoding.UTF8); Assert( testMap != null); aNumber = (Number)testMap.get("aNumber"); Assert( aNumber != null); Assert( aNumber.doubleValue() == 16.5); aString = (String)testMap.get("stringOne"); Assert( aString != null); Assert( aString.equals("Some sort of string")); aString = (String)testMap.get("20"); Assert( aString != null); Assert( aString.equals("some other stuff")); anObjectRepresentation = (HashMap)testMap.get("aTester"); Assert( anObjectRepresentation != null); //check the attributes of the object embedded as an attribute of the outer object aString = (String)anObjectRepresentation.get("stringAtt"); Assert( aString != null); Assert( aString.equals("hello")); aNumber = (Number)anObjectRepresentation.get("doubleAtt"); Assert( aNumber != null); Assert( aNumber.doubleValue() == -4.5); aNumber = (Number)anObjectRepresentation.get("doubleObjAtt"); Assert( aNumber != null); //System.out.println("aNumber: "+aNumber.doubleValue()); Assert( aNumber.doubleValue() == 1000.567789); aList = (ArrayList)anObjectRepresentation.get("listAtt"); Assert( aList != null); Assert( aList.size() == 2); //check the values of the items in the list aNumber = (Number)aList.get(0); Assert( aNumber != null); Assert( aNumber.intValue() == 7); aString = (String)aList.get(1); Assert( aString != null); Assert( aString.equals("hello there from list")); //Check the last attribute of the object embedded as an attribute of the outer object aString = (String)anObjectRepresentation.get("parentString"); Assert( aString != null); Assert( aString.equals("In The Parent")); } catch(Exception e){ e.printStackTrace(); return; } /* * Testing passing a null string parameter. */ try { /* * UNICODE */ Object nullObject = JSONUtilities.parse(null, JSONUtilities.encoding.UNICODE); Assert(nullObject == null); /* * UTF-8 */ nullObject = JSONUtilities.parse(null, JSONUtilities.encoding.UTF8); Assert(nullObject == null); } catch (Exception e) { e.printStackTrace(); return; } /* * Testing malformed JSON object. */ try { /* * UNICODE */ Object someObject = JSONUtilities.parse("{\"key\": \"anotherKey\":\"a value\"}", JSONUtilities.encoding.UNICODE); Assert( false); } catch (Exception e) { } try{ /* * UTF-8 */ Object someObject = JSONUtilities.parse("{\"key\": \"anotherKey\":\"a value\"}", JSONUtilities.encoding.UTF8); Assert( false); } catch (Exception e) { } /* * Testing malformed JSON array. */ try { /* * UNICODE */ Object someObject = JSONUtilities.parse("[90, some stuff, \"other stuff\"]", JSONUtilities.encoding.UNICODE); Assert( false); } catch (Exception e) { } try{ /* * UTF8 */ Object someObject = JSONUtilities.parse("[90, some stuff, \"other stuff\"]", JSONUtilities.encoding.UTF8); Assert( false); } catch (Exception e){ } System.out.println("Passed testParseStringEncoding"); } public static void testStringifyParse(){ Date testDate = new Date(1067899); TestObject anObject = new TestObject("Hello there.", 7, testDate); try { String jsonString = JSONUtilities.stringify(anObject); Assert( jsonString != null); HashMap parsedMap = (HashMap)JSONUtilities.parse(jsonString); Assert( parsedMap != null); Assert( ((String)parsedMap.get("theString")).equals("Hello there.")); Assert( ((Long)parsedMap.get("theInt")).intValue() == 7); System.out.println("parsed date: "+parsedMap.get("theDate")); //Assert( ((Date)parsedMap.get("theDate")).compareTo(testDate) == 0); Assert(((String)parsedMap.get("theDate")).equals("1969-12-31 17:17:47.899")); } catch (Exception e) { e.printStackTrace(); return; } System.out.println("Passed testStringifyParse"); } public static void testParseStringify(){ try{ HashMap testMap = (HashMap)JSONUtilities.parse("{\"aNumber\":16.5,\"stringOne\":\"Some sort of string\",\"20\":\"some other stuff\",\"aTester\":{\"stringAtt\":\"hello\",\"doubleAtt\":-4.5,\"doubleObjAtt\":1000.567789,\"listAtt\":[7,\"hello there from list\"],\"parentString\":\"In The Parent\"}}"); Assert( testMap != null); String jsonString = JSONUtilities.stringify(testMap); Assert( jsonString != null); Assert( jsonString.equals("{\"stringOne\":\"Some sort of string\",\"20\":\"some other stuff\",\"aNumber\":16.5,\"aTester\":{\"stringAtt\":\"hello\",\"listAtt\":[7,\"hello there from list\"],\"doubleAtt\":-4.5,\"doubleObjAtt\":1000.567789,\"parentString\":\"In The Parent\"}}")); } catch(Exception e){ e.printStackTrace(); return; } System.out.println("Passed testParseStringify"); } }
[ "chad@Chads-rMBP.local" ]
chad@Chads-rMBP.local
cc1e770f82239a8d8f180f2365f5dbad1ef8e1b0
898d9f46b8a36c692c7d70fcd37b9cf22ae8be4e
/src/LikesPanel.java
8995bab7f9edd486e709d3f3943e663d6eb41360
[]
no_license
rreinke/GUIEx1
c3954a9a0188617c6b7061491187439d36a5eb50
12dbd77b7c48182a72b43a9e6959c39df318e1e5
refs/heads/master
2021-01-23T14:50:38.414965
2012-11-05T02:35:44
2012-11-05T02:35:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,057
java
import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JCheckBox; import javax.swing.JLabel; import javax.swing.JPanel; public class LikesPanel extends JPanel { private JCheckBox water, soda, tea, energyDrink, gatorade, basketball, videoGames, skiing, hiking, running, couchPotato; private JPanel one; FeedbackPanel fp = new FeedbackPanel(); public LikesPanel(FeedbackPanel fp) { this.fp = fp; one = new JPanel(); add(one); JLabel label1 = new JLabel("Select your preferred beverages:"); JLabel label2 = new JLabel("Select your favorite activities:"); one.add(label1); water = new JCheckBox("Water"); water.addActionListener(new JCheckBoxListener()); soda = new JCheckBox("Soda"); soda.addActionListener(new JCheckBoxListener()); tea = new JCheckBox("Tea"); tea.addActionListener(new JCheckBoxListener()); energyDrink = new JCheckBox("Energy Drink"); energyDrink.addActionListener(new JCheckBoxListener()); gatorade = new JCheckBox("Gatorade"); gatorade.addActionListener(new JCheckBoxListener()); basketball = new JCheckBox("Basketball"); basketball.addActionListener(new JCheckBoxListener()); videoGames = new JCheckBox("Video Games"); videoGames.addActionListener(new JCheckBoxListener()); skiing = new JCheckBox("Skiing"); skiing.addActionListener(new JCheckBoxListener()); hiking = new JCheckBox("Hiking"); hiking.addActionListener(new JCheckBoxListener()); running = new JCheckBox("Running"); running.addActionListener(new JCheckBoxListener()); couchPotato = new JCheckBox("Couch Potato"); couchPotato.addActionListener(new JCheckBoxListener()); one.add(water); one.add(soda); one.add(tea); one.add(energyDrink); one.add(gatorade); one.add(label2); one.add(basketball); one.add(videoGames); one.add(skiing); one.add(hiking); one.add(running); one.add(couchPotato); } private class JCheckBoxListener implements ActionListener { public void actionPerformed(ActionEvent e) { if(e.getSource() == water) { fp.setWater("Good choice"); } else if(e.getSource() == soda) { fp.setSoda("Enter a burp contest"); } else if(e.getSource() == tea) { fp.setTea("Would you like some crumpets?"); } else if(e.getSource() == energyDrink) { fp.setEnergyDrink("Can you see noises?"); } else if(e.getSource() == gatorade) { fp.setGatorade("You're famous!"); } else if(e.getSource() == basketball) { fp.setBasketball("He shoots...he scores!!"); } else if(e.getSource() == videoGames) { fp.setVideoGames("You should click couch potato!"); } else if(e.getSource() == skiing) { fp.setSkiing("Brrr..."); } else if(e.getSource() == tea) { fp.setTea("Would you like some crumpets?"); } else if(e.getSource() == hiking) { fp.setHiking("Watch out for bears!"); } else if(e.getSource() == running) { fp.setRunning("Flash Gordon!"); } else if(e.getSource() == couchPotato) { fp.setCouchPotato("Get up lazy bones!"); } } } }
[ "rreinke@mymail.mines.edu" ]
rreinke@mymail.mines.edu
2522e9fe4136c6362561b4eedf9ecfb4070b7403
36cdefd3c8a75e0123674fd95196edabfcbfca2d
/library/src/jp/co/cyberagent/android/gpuimage/filter/IFInkwellFilter.java
58fbf20eb62e1d061667497e7f543e4220e0984b
[ "Apache-2.0" ]
permissive
east11210/android-gpuimage
4b81c5e77a3f0df65d3478545e513bfa792bd116
e54df2d3173c56c5ff8e06761fd0edd1810dce40
refs/heads/master
2020-12-26T02:20:35.253915
2016-10-02T10:52:29
2016-10-02T10:52:29
56,369,729
0
0
null
2016-04-16T06:43:19
2016-04-16T06:43:19
null
UTF-8
Java
false
false
1,097
java
package jp.co.cyberagent.android.gpuimage.filter; import android.content.Context; import jp.co.cyberagent.android.gpuimage.R; /** * Created by sam on 14-8-9. */ public class IFInkwellFilter extends IFImageFilter { private static final String SHADER = "precision lowp float;\n" + " \n" + " varying highp vec2 textureCoordinate;\n" + " \n" + " uniform sampler2D inputImageTexture;\n" + " uniform sampler2D inputImageTexture2;\n" + " \n" + " void main()\n" + " {\n" + " vec3 texel = texture2D(inputImageTexture, textureCoordinate).rgb;\n" + " texel = vec3(dot(vec3(0.3, 0.6, 0.1), texel));\n" + " texel = vec3(texture2D(inputImageTexture2, vec2(texel.r, .16666)).r);\n" + " gl_FragColor = vec4(texel, 1.0);\n" + " }\n"; public IFInkwellFilter(Context paramContext) { super(paramContext, SHADER); setRes(); } private void setRes() { addInputTexture(R.drawable.inkwell_map); } }
[ "east11210@gmail.com" ]
east11210@gmail.com
3d0ea3be5a34397053bd1dfe5fb092b26f2c19d7
1542844e9aeb46668557b4124d5fc8c1fc8afb52
/com.krpc.server/src/test/java/com/krpc/server/netty/TimeClientHandler.java
02f45bef46cde36002d71c539191d41f7d86ac9a
[ "MIT" ]
permissive
henanren/krpc
6bf6892d27159e5fbe451485cc303cc1aacac4c5
35dc9ceafd016b9e9ffd9cda57be14648b52d0bc
refs/heads/master
2020-12-13T16:12:55.799615
2020-01-18T06:42:34
2020-01-18T06:42:34
234,466,898
1
0
MIT
2020-01-17T03:59:15
2020-01-17T03:59:14
null
UTF-8
Java
false
false
1,206
java
package com.krpc.server.netty; import java.text.SimpleDateFormat; import java.util.Date; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; public class TimeClientHandler extends ChannelInboundHandlerAdapter { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) { ByteBuf m = (ByteBuf) msg; // (1) try { long currentTimeMillis = (m.readUnsignedInt() - 2208988800L) * 1000L; Date currentTime = new Date(currentTimeMillis); System.out.println("Default Date Format:" + currentTime.toString()); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String dateString = formatter.format(currentTime); // 转换一下成中国人的时间格式 System.out.println("Date Format:" + dateString); ctx.close(); } finally { m.release(); } } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { cause.printStackTrace(); ctx.close(); } }
[ "1334036616@qq.com" ]
1334036616@qq.com
0f1d086cec4790fcabd6230e15893162fc108758
f9317668c5352c1c1ca2d428fd80eef2933aa4a0
/src/main/java/guru/springframework/spring5webapp/domain/Book.java
dae42b03282ca7a8fdb52c146dd9668d32b702c7
[]
no_license
ranjansrivastava11/spring5webapp
6fd150e7fb5e5f1adf73293b460e8a50bc1c29d0
c14aea9d9da9c3d4d6f63dfa1a271ccd904b9e23
refs/heads/master
2022-12-13T03:37:08.136001
2020-09-16T06:00:41
2020-09-16T06:00:41
295,351,247
0
0
null
2020-09-14T08:22:22
2020-09-14T08:22:21
null
UTF-8
Java
false
false
1,958
java
package guru.springframework.spring5webapp.domain; import javax.persistence.*; import java.util.HashSet; import java.util.Set; @Entity public class Book { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String title; private String isbn; @ManyToOne private Publisher publisher; @ManyToMany @JoinTable(name = "author_book",joinColumns = @JoinColumn(name="book_id"), inverseJoinColumns = @JoinColumn(name="author_id")) private Set<Author> authors = new HashSet(); public Book() { } public Publisher getPublisher() { return publisher; } public void setPublisher(Publisher publisher) { this.publisher = publisher; } public Book(String title, String isbn) { this.title = title; this.isbn = isbn; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getIsbn() { return isbn; } public void setIsbn(String isbn) { this.isbn = isbn; } public Set<Author> getAuthors() { return authors; } public void setAuthors(Set<Author> authors) { this.authors = authors; } @Override public String toString() { return "Book{" + "id=" + id + ", title='" + title + '\'' + ", isbn='" + isbn + '\'' + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Book book = (Book) o; return id != null ? id.equals(book.id) : book.id == null; } @Override public int hashCode() { return id != null ? id.hashCode() : 0; } }
[ "srivastavar@ap.teo.earth" ]
srivastavar@ap.teo.earth
fdd1971629c51cd1682399ba17dba7ad866add76
a30b7feaac08e35a63ab2a17adce6c578ff8b9eb
/aebiz-b2b2c/aebiz-app/aebiz-web/src/main/java/com/aebiz/app/sales/modules/models/Sales_gift_class.java
53d8edf9da0b607dcf328ffb4bee0f89137d6048
[]
no_license
zenghaorong/ntgcb2b2cJar
15ef95dfe87b5b483f63510e7a87bf73f7fa7c4e
ff360606816a9a76e3cccef0d821bb3a4fa24e88
refs/heads/master
2020-05-14T23:27:53.764175
2019-04-18T02:26:43
2019-04-18T02:28:22
181,997,233
1
1
null
null
null
null
UTF-8
Java
false
false
1,183
java
package com.aebiz.app.sales.modules.models; import com.aebiz.baseframework.base.model.BaseModel; import org.nutz.dao.entity.annotation.*; import java.io.Serializable; /** * 赠品分类表 * Created by wizzer on 2017/6/7. */ @Table("sales_gift_class") public class Sales_gift_class extends BaseModel implements Serializable { private static final long serialVersionUID = 1L; @Column @Name @Comment("ID") @ColDefine(type = ColType.VARCHAR, width = 32) @Prev(els = {@EL("ig(view.tableName,'')")}) private String id; @Column @Comment("商城ID") @ColDefine(type = ColType.VARCHAR, width = 32) private String storeId; @Column @Comment("分类名称") @ColDefine(type = ColType.VARCHAR, width = 255) private String name; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getStoreId() { return storeId; } public void setStoreId(String storeId) { this.storeId = storeId; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "2861574504@qq.com" ]
2861574504@qq.com
aa38f3b95018e60f0126fd6be7b6daa5f555cf74
513b786124c45ca60062f4502400c2c1454fc253
/ShoppingMart/app/src/main/java/com/example/sumitbobade/shoppingmart/model/ProductList.java
456745254f9fbb36de267192ff827c98f4fa6aca
[]
no_license
sumitbob22/android-demo.-projects
22be8bac77143c32c78efb2b99dab784b2378365
1f51a6200bae6d449ca384844cb9a65052979680
refs/heads/master
2020-03-20T08:55:29.333810
2018-06-14T08:15:34
2018-06-14T08:15:34
137,322,733
0
0
null
null
null
null
UTF-8
Java
false
false
1,707
java
package com.example.sumitbobade.shoppingmart.model; /** * Created by sumitbobade on 21/04/18. */ public class ProductList { private String productname; private Double price; private String vendorname; private String vendoraddress; private String productImg; private String [] productGallery; private String phoneNumber; private int count=1; public void setProductname(String productname) { this.productname = productname; } public void setPrice(Double price) { this.price = price; } public void setVendorname(String vendorname) { this.vendorname = vendorname; } public void setVendoraddress(String vendoraddress) { this.vendoraddress = vendoraddress; } public void setProductImg(String productImg) { this.productImg = productImg; } public void setProductGallery(String[] productGallery) { this.productGallery = productGallery; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public String getProductname() { return productname; } public Double getPrice() { return price; } public void setCount(int count) { this.count = count; } public int getCount() { return count; } public String getVendorname() { return vendorname; } public String getVendoraddress() { return vendoraddress; } public String getProductImg() { return productImg; } public String[] getProductGallery() { return productGallery; } public String getPhoneNumber() { return phoneNumber; } }
[ "sumitbobade@Sumits-Mac-mini.local" ]
sumitbobade@Sumits-Mac-mini.local
e5141e8759e227d634fcb3aab12b0db85c2cb64a
d765d62ee0376f36876ecb0c3bf6677215374918
/IntentActivityForResultCalculator/app/src/main/java/com/anukul/intentactivityforresultcalculator/SecondActivity.java
de2fca994ac5d6d8b00504b72029ac8736dd01e2
[]
no_license
MehtaAnukul/Android-Learn-Tasks
6ecad36313f59c736930c733bfdd933c768c5853
0585aca08a73d01f91615db15df2e5bf392138bd
refs/heads/master
2020-03-27T11:13:00.562876
2019-06-07T06:42:00
2019-06-07T06:42:00
146,472,580
0
0
null
null
null
null
UTF-8
Java
false
false
2,858
java
package com.anukul.intentactivityforresultcalculator; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; public class SecondActivity extends AppCompatActivity implements View.OnClickListener { private EditText valueOneEd; private EditText valueSecEd; private Button okBtn; private Button cancelBtn; private int value1; private int value2; private int operationCode; private int ans; private Intent intent; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_second); initView(); } private void initView() { valueOneEd = findViewById(R.id.activity_second_valueOneEd); valueSecEd = findViewById(R.id.activity_second_valueSecEd); okBtn = findViewById(R.id.activity_second_okBtn); cancelBtn = findViewById(R.id.activity_second_cencalBtn); intent = getIntent(); operationCode = intent.getIntExtra("KEY_CODE", 0); okBtn.setOnClickListener(this); cancelBtn.setOnClickListener(this); } @Override public void onClick(View v) { value1 = Integer.parseInt(valueOneEd.getText().toString().trim()); value2 = Integer.parseInt(valueSecEd.getText().toString().trim()); switch (v.getId()) { case R.id.activity_second_okBtn: performTask(); break; case R.id.activity_second_cencalBtn: setResult(RESULT_CANCELED); finish(); break; } } private void performTask() { switch (operationCode) { case 1: ans = value1 + value2; intent.putExtra("ADD", ans); intent.putExtra("KEY_CODE_RETURN_ADD", 1); setResult(RESULT_OK, intent); finish(); break; case 2: ans = value1 - value2; intent.putExtra("SUB", ans); intent.putExtra("KEY_CODE_RETURN_SUB", 2); setResult(RESULT_OK, intent); finish(); break; case 3: ans = value1 * value2; intent.putExtra("MUL", ans); intent.putExtra("KEY_CODE_RETURN_MUL", 3); setResult(RESULT_OK, intent); finish(); break; case 4: ans = value1 / value2; intent.putExtra("DIV", ans); intent.putExtra("KEY_CODE_RETURN_DIV", 4); setResult(RESULT_OK, intent); finish(); break; } } }
[ "mehtaanukul@gmail.com" ]
mehtaanukul@gmail.com
8efce7190b167ab776cd83d10d0902161f547a25
ffd4a68d8687a0cc11f9d0c8e06f1ed64dc737ab
/src/main/java/com/codegym/project/repository/ICategoryRepository.java
2516a14e21dc56d6248e50621873c9effbccd691
[]
no_license
longle2812/project-Module4-group1
9ceba8cc223eda8deec2bfae1cb0f42efa9ea1d3
ce6be847234ae308807eac64706f6a714ea0ee72
refs/heads/master
2023-06-18T23:54:33.299938
2021-07-05T06:33:20
2021-07-05T06:33:20
383,038,297
0
0
null
null
null
null
UTF-8
Java
false
false
288
java
package com.codegym.project.repository; import com.codegym.project.model.Category; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface ICategoryRepository extends JpaRepository<Category, Long> { }
[ "lehailong2812@gmail.com" ]
lehailong2812@gmail.com
05cb1aa402d4d81368058300fc8fcc93819b6a59
6c5a7c47dc912d5462989a5a1e52f88a0a9a43da
/app/src/main/java/org/gmplib/test/Jacobi_Task.java
779299ea03f3321985ee3727abe897d05c05d568
[]
no_license
aquick/astudio-gmptest
5b637f2e2a8cd8970ac6bc806d6a3968bd48fda3
ef0191f6ac2d944484892dabf86272b855e0f9a2
refs/heads/master
2021-01-01T19:43:52.487656
2018-01-15T20:35:34
2018-01-15T20:35:34
98,659,677
0
0
null
null
null
null
UTF-8
Java
false
false
30,717
java
package org.gmplib.test; import android.util.Log; import org.gmplib.gmpjni.GMP; import org.gmplib.gmpjni.GMP.mpz_t; import org.gmplib.gmpjni.GMP.randstate_t; import org.gmplib.gmpjni.GMP.GMPException; public class Jacobi_Task extends TaskBase implements Runnable { private static final String TAG = "Jacobi_Task"; public Jacobi_Task(UI ui) { super(ui, TAG); } private long mpz_mod4 (mpz_t z) throws GMPException { mpz_t m; long ret; m = new mpz_t(); GMP.mpz_fdiv_r_2exp (m, z, 2); ret = GMP.mpz_get_ui (m); return ret; } private boolean mpz_fits_ulimb_p (mpz_t z) throws GMPException { return (GMP.mpz_internal_SIZ(z) == 1 || GMP.mpz_internal_SIZ(z) == 0); } private void try_base (long a, long b, int answer) throws Exception { int got; if ((b & 1) == 0 || b == 1 || a > b) return; got = TestUtil.jacobi (a, b); if (got != answer) { /*** printf (LL("mpn_jacobi_base (%lu, %lu) is %d should be %d\n", "mpn_jacobi_base (%llu, %llu) is %d should be %d\n"), a, b, got, answer); abort (); ***/ throw new Exception("jacobi_base (" + a + ", " + b + ") is " + got + " should be " + answer); } } private void try_zi_ui (mpz_t a, long b, int answer) throws Exception { int got; got = GMP.mpz_kronecker_ui (a, b); if (got != answer) { /*** printf ("mpz_kronecker_ui ("); mpz_out_str (stdout, 10, a); printf (", %lu) is %d should be %d\n", b, got, answer); abort (); ***/ dump_abort ("mpz_kronecker_ui", a, b, got, answer); } } private void try_zi_si (mpz_t a, int b, int answer) throws Exception { int got; got = GMP.mpz_kronecker_si (a, b); if (got != answer) { /*** printf ("mpz_kronecker_si ("); mpz_out_str (stdout, 10, a); printf (", %ld) is %d should be %d\n", b, got, answer); abort (); ***/ dump_abort ("mpz_kronecker_si", a, (long)b, got, answer); } } private void try_ui_zi (long a, mpz_t b, int answer) throws Exception { int got; got = GMP.mpz_ui_kronecker (a, b); if (got != answer) { /*** printf ("mpz_ui_kronecker (%lu, ", a); mpz_out_str (stdout, 10, b); printf (") is %d should be %d\n", got, answer); abort (); ***/ dump_abort2 ("mpz_ui_kronecker", a, b, got, answer); } } private void try_si_zi (int a, mpz_t b, int answer) throws Exception { int got; got = GMP.mpz_si_kronecker (a, b); if (got != answer) { /*** printf ("mpz_si_kronecker (%ld, ", a); mpz_out_str (stdout, 10, b); printf (") is %d should be %d\n", got, answer); abort (); ***/ dump_abort2 ("mpz_si_kronecker", (long)a, b, got, answer); } } /* Don't bother checking mpz_jacobi, since it only differs for b even, and we don't have an actual expected answer for it. tests/devel/try.c does some checks though. */ private void try_zi_zi (mpz_t a, mpz_t b, int answer) throws Exception { int got; got = GMP.mpz_kronecker (a, b); if (got != answer) { /*** printf ("mpz_kronecker ("); mpz_out_str (stdout, 10, a); printf (", "); mpz_out_str (stdout, 10, b); printf (") is %d should be %d\n", got, answer); abort (); ***/ dump_abort3 ("mpz_kronecker", a, b, got, answer); } } private void try_each (mpz_t a, mpz_t b, int answer) throws Exception { if (mpz_fits_ulimb_p (a) && mpz_fits_ulimb_p (b)) { try_base (GMP.mpz_internal_get_ulimb (a, 0), GMP.mpz_internal_get_ulimb (b, 0), answer); } if (GMP.mpz_fits_ulong_p (b) != 0) { try_zi_ui (a, GMP.mpz_get_ui (b), answer); } if (GMP.mpz_fits_slong_p (b) != 0) { try_zi_si (a, GMP.mpz_get_si (b), answer); } if (GMP.mpz_fits_ulong_p (a) != 0) { try_ui_zi (GMP.mpz_get_ui (a), b, answer); } if (GMP.mpz_fits_sint_p (a) != 0) { try_si_zi (GMP.mpz_get_si (a), b, answer); } try_zi_zi (a, b, answer); } /* Try (a/b) and (a/-b). */ private void try_pn (mpz_t a, mpz_t b_orig, int answer) throws Exception { mpz_t b = new mpz_t(); GMP.mpz_set (b, b_orig); try_each (a, b, answer); GMP.mpz_neg (b, b); if (GMP.mpz_sgn (a) < 0) { answer = -answer; } try_each (a, b, answer); } /* Try (a+k*p/b) for various k, using the fact (a/b) is periodic in a with period p. For b>0, p=b if b!=2mod4 or p=4*b if b==2mod4. */ private void try_periodic_num (mpz_t a_orig, mpz_t b, int answer) throws Exception { mpz_t a = new mpz_t(); mpz_t a_period = new mpz_t(); int i; if (GMP.mpz_sgn (b) <= 0) return; GMP.mpz_set (a, a_orig); GMP.mpz_set (a_period, b); if (mpz_mod4 (b) == 2) { GMP.mpz_mul_ui (a_period, a_period, 4L); } /* don't bother with these tests if they're only going to produce even/even */ if (GMP.mpz_even_p (a) != 0 && GMP.mpz_even_p (b) != 0 && GMP.mpz_even_p (a_period) != 0) return; for (i = 0; i < 6; i++) { GMP.mpz_add (a, a, a_period); try_pn (a, b, answer); } GMP.mpz_set (a, a_orig); for (i = 0; i < 6; i++) { GMP.mpz_sub (a, a, a_period); try_pn (a, b, answer); } } /* Try (a/b+k*p) for various k, using the fact (a/b) is periodic in b of period p. period p a==0,1mod4 a a==2mod4 4*a a==3mod4 and b odd 4*a a==3mod4 and b even 8*a In Henri Cohen's book the period is given as 4*a for all a==2,3mod4, but a counterexample would seem to be (3/2)=-1 which with (3/14)=+1 doesn't have period 4*a (but rather 8*a with (3/26)=-1). Maybe the plain 4*a is to be read as applying to a plain Jacobi symbol with b odd, rather than the Kronecker extension to b even. */ private void try_periodic_den (mpz_t a, mpz_t b_orig, int answer) throws Exception { mpz_t b = new mpz_t(); mpz_t b_period = new mpz_t(); int i; if (GMP.mpz_sgn (a) == 0 || GMP.mpz_sgn (b_orig) == 0) return; GMP.mpz_set (b, b_orig); GMP.mpz_set (b_period, a); if (mpz_mod4 (a) == 3 && GMP.mpz_even_p (b) != 0) { GMP.mpz_mul_ui (b_period, b_period, 8L); } else if (mpz_mod4 (a) >= 2) { GMP.mpz_mul_ui (b_period, b_period, 4L); } /* don't bother with these tests if they're only going to produce even/even */ if (GMP.mpz_even_p (a) != 0 && GMP.mpz_even_p (b) != 0 && GMP.mpz_even_p (b_period) != 0) return; for (i = 0; i < 6; i++) { GMP.mpz_add (b, b, b_period); try_pn (a, b, answer); } GMP.mpz_set (b, b_orig); for (i = 0; i < 6; i++) { GMP.mpz_sub (b, b, b_period); try_pn (a, b, answer); } } private static final long[] ktable = new long[] { 0, 1, 2, 3, 4, 5, 6, 7, GMP.GMP_NUMB_BITS()-1, GMP.GMP_NUMB_BITS(), GMP.GMP_NUMB_BITS()+1, 2*GMP.GMP_NUMB_BITS()-1, 2*GMP.GMP_NUMB_BITS(), 2*GMP.GMP_NUMB_BITS()+1, 3*GMP.GMP_NUMB_BITS()-1, 3*GMP.GMP_NUMB_BITS(), 3*GMP.GMP_NUMB_BITS()+1 }; /* Try (a/b*2^k) for various k. */ private void try_2den (mpz_t a, mpz_t b_orig, int answer) throws Exception { mpz_t b = new mpz_t(); int kindex; int answer_a2; int answer_k; long k; /* don't bother when b==0 */ if (GMP.mpz_sgn (b_orig) == 0) return; GMP.mpz_set (b, b_orig); /* (a/2) is 0 if a even, 1 if a==1 or 7 mod 8, -1 if a==3 or 5 mod 8 */ answer_a2 = (GMP.mpz_even_p (a) != 0 ? 0 : (((GMP.mpz_internal_SIZ(a) >= 0 ? GMP.mpz_internal_get_ulimb(a, 0) : -GMP.mpz_internal_get_ulimb(a, 0)) + 2) & 7) < 4 ? 1 : -1); for (kindex = 0; kindex < ktable.length; kindex++) { k = ktable[kindex]; /* answer_k = answer*(answer_a2^k) */ answer_k = (answer_a2 == 0 && k != 0 ? 0 : (k & 1) == 1 && answer_a2 == -1 ? -answer : answer); GMP.mpz_mul_2exp (b, b_orig, k); try_pn (a, b, answer_k); } } /* Try (a*2^k/b) for various k. If it happens mpz_ui_kronecker() gets (2/b) wrong it will show up as wrong answers demanded. */ private void try_2num (mpz_t a_orig, mpz_t b, int answer) throws Exception { mpz_t a = new mpz_t(); int kindex; int answer_2b; int answer_k; long k; /* don't bother when a==0 */ if (GMP.mpz_sgn (a_orig) == 0) return; /* (2/b) is 0 if b even, 1 if b==1 or 7 mod 8, -1 if b==3 or 5 mod 8 */ answer_2b = (GMP.mpz_even_p (b) != 0 ? 0 : (((GMP.mpz_internal_SIZ(b) >= 0 ? GMP.mpz_internal_get_ulimb(b, 0) : -GMP.mpz_internal_get_ulimb(b, 0)) + 2) & 7) < 4 ? 1 : -1); for (kindex = 0; kindex < ktable.length; kindex++) { k = ktable[kindex]; /* answer_k = answer*(answer_2b^k) */ answer_k = (answer_2b == 0 && k != 0 ? 0 : (k & 1) == 1 && answer_2b == -1 ? -answer : answer); GMP.mpz_mul_2exp (a, a_orig, k); try_pn (a, b, answer_k); } } /* The try_2num() and try_2den() routines don't in turn call try_periodic_num() and try_periodic_den() because it hugely increases the number of tests performed, without obviously increasing coverage. Useful extra derived cases can be added here. */ private void try_all (mpz_t a, mpz_t b, int answer) throws Exception { try_pn (a, b, answer); try_periodic_num (a, b, answer); try_periodic_den (a, b, answer); try_2num (a, b, answer); try_2den (a, b, answer); } private static final class CheckData { public String a; public String b; public int answer; public CheckData(String a, String b, int answer) { this.a = a; this.b = b; this.answer = answer; } } private static final CheckData[] data = new CheckData[] { /* Note that the various derived checks in try_all() reduce the cases that need to be given here. */ /* some zeros */ new CheckData( "0", "0", 0 ), new CheckData( "0", "2", 0 ), new CheckData( "0", "6", 0 ), new CheckData( "5", "0", 0 ), new CheckData( "24", "60", 0 ), /* (a/1) = 1, any a In particular note (0/1)=1 so that (a/b)=(a mod b/b). */ new CheckData( "0", "1", 1 ), new CheckData( "1", "1", 1 ), new CheckData( "2", "1", 1 ), new CheckData( "3", "1", 1 ), new CheckData( "4", "1", 1 ), new CheckData( "5", "1", 1 ), /* (0/b) = 0, b != 1 */ new CheckData( "0", "3", 0 ), new CheckData( "0", "5", 0 ), new CheckData( "0", "7", 0 ), new CheckData( "0", "9", 0 ), new CheckData( "0", "11", 0 ), new CheckData( "0", "13", 0 ), new CheckData( "0", "15", 0 ), /* (1/b) = 1 */ new CheckData( "1", "1", 1 ), new CheckData( "1", "3", 1 ), new CheckData( "1", "5", 1 ), new CheckData( "1", "7", 1 ), new CheckData( "1", "9", 1 ), new CheckData( "1", "11", 1 ), /* (-1/b) = (-1)^((b-1)/2) which is -1 for b==3 mod 4 */ new CheckData( "-1", "1", 1 ), new CheckData( "-1", "3", -1 ), new CheckData( "-1", "5", 1 ), new CheckData( "-1", "7", -1 ), new CheckData( "-1", "9", 1 ), new CheckData( "-1", "11", -1 ), new CheckData( "-1", "13", 1 ), new CheckData( "-1", "15", -1 ), new CheckData( "-1", "17", 1 ), new CheckData( "-1", "19", -1 ), /* (2/b) = (-1)^((b^2-1)/8) which is -1 for b==3,5 mod 8. try_2num() will exercise multiple powers of 2 in the numerator. */ new CheckData( "2", "1", 1 ), new CheckData( "2", "3", -1 ), new CheckData( "2", "5", -1 ), new CheckData( "2", "7", 1 ), new CheckData( "2", "9", 1 ), new CheckData( "2", "11", -1 ), new CheckData( "2", "13", -1 ), new CheckData( "2", "15", 1 ), new CheckData( "2", "17", 1 ), /* (-2/b) = (-1)^((b^2-1)/8)*(-1)^((b-1)/2) which is -1 for b==5,7mod8. try_2num() will exercise multiple powers of 2 in the numerator, which will test that the shift in mpz_si_kronecker() uses unsigned not signed. */ new CheckData( "-2", "1", 1 ), new CheckData( "-2", "3", 1 ), new CheckData( "-2", "5", -1 ), new CheckData( "-2", "7", -1 ), new CheckData( "-2", "9", 1 ), new CheckData( "-2", "11", 1 ), new CheckData( "-2", "13", -1 ), new CheckData( "-2", "15", -1 ), new CheckData( "-2", "17", 1 ), /* (a/2)=(2/a). try_2den() will exercise multiple powers of 2 in the denominator. */ new CheckData( "3", "2", -1 ), new CheckData( "5", "2", -1 ), new CheckData( "7", "2", 1 ), new CheckData( "9", "2", 1 ), new CheckData( "11", "2", -1 ), /* Harriet Griffin, "Elementary Theory of Numbers", page 155, various examples. */ new CheckData( "2", "135", 1 ), new CheckData( "135", "19", -1 ), new CheckData( "2", "19", -1 ), new CheckData( "19", "135", 1 ), new CheckData( "173", "135", 1 ), new CheckData( "38", "135", 1 ), new CheckData( "135", "173", 1 ), new CheckData( "173", "5", -1 ), new CheckData( "3", "5", -1 ), new CheckData( "5", "173", -1 ), new CheckData( "173", "3", -1 ), new CheckData( "2", "3", -1 ), new CheckData( "3", "173", -1 ), new CheckData( "253", "21", 1 ), new CheckData( "1", "21", 1 ), new CheckData( "21", "253", 1 ), new CheckData( "21", "11", -1 ), new CheckData( "-1", "11", -1 ), /* Griffin page 147 */ new CheckData( "-1", "17", 1 ), new CheckData( "2", "17", 1 ), new CheckData( "-2", "17", 1 ), new CheckData( "-1", "89", 1 ), new CheckData( "2", "89", 1 ), /* Griffin page 148 */ new CheckData( "89", "11", 1 ), new CheckData( "1", "11", 1 ), new CheckData( "89", "3", -1 ), new CheckData( "2", "3", -1 ), new CheckData( "3", "89", -1 ), new CheckData( "11", "89", 1 ), new CheckData( "33", "89", -1 ), /* H. Davenport, "The Higher Arithmetic", page 65, the quadratic residues and non-residues mod 19. */ new CheckData( "1", "19", 1 ), new CheckData( "4", "19", 1 ), new CheckData( "5", "19", 1 ), new CheckData( "6", "19", 1 ), new CheckData( "7", "19", 1 ), new CheckData( "9", "19", 1 ), new CheckData( "11", "19", 1 ), new CheckData( "16", "19", 1 ), new CheckData( "17", "19", 1 ), new CheckData( "2", "19", -1 ), new CheckData( "3", "19", -1 ), new CheckData( "8", "19", -1 ), new CheckData( "10", "19", -1 ), new CheckData( "12", "19", -1 ), new CheckData( "13", "19", -1 ), new CheckData( "14", "19", -1 ), new CheckData( "15", "19", -1 ), new CheckData( "18", "19", -1 ), /* Residues and non-residues mod 13 */ new CheckData( "0", "13", 0 ), new CheckData( "1", "13", 1 ), new CheckData( "2", "13", -1 ), new CheckData( "3", "13", 1 ), new CheckData( "4", "13", 1 ), new CheckData( "5", "13", -1 ), new CheckData( "6", "13", -1 ), new CheckData( "7", "13", -1 ), new CheckData( "8", "13", -1 ), new CheckData( "9", "13", 1 ), new CheckData( "10", "13", 1 ), new CheckData( "11", "13", -1 ), new CheckData( "12", "13", 1 ), /* various */ new CheckData( "5", "7", -1 ), new CheckData( "15", "17", 1 ), new CheckData( "67", "89", 1 ), /* special values inducing a==b==1 at the end of jac_or_kron() */ new CheckData( "0x10000000000000000000000000000000000000000000000001", "0x10000000000000000000000000000000000000000000000003", 1 ), /* Test for previous bugs in jacobi_2. */ new CheckData( "0x43900000000", "0x42400000439", -1 ), /* 32-bit limbs */ new CheckData( "0x4390000000000000000", "0x4240000000000000439", -1 ), /* 64-bit limbs */ new CheckData( "198158408161039063", "198158360916398807", -1 ), /* Some tests involving large quotients in the continued fraction expansion. */ new CheckData( "37200210845139167613356125645445281805", "451716845976689892447895811408978421929", -1 ), new CheckData( "67674091930576781943923596701346271058970643542491743605048620644676477275152701774960868941561652032482173612421015", "4902678867794567120224500687210807069172039735", 0 ), new CheckData( "2666617146103764067061017961903284334497474492754652499788571378062969111250584288683585223600172138551198546085281683283672592", "2666617146103764067061017961903284334497474492754652499788571378062969111250584288683585223600172138551198546085281683290481773", 1 ), /* Exersizes the case asize == 1, btwos > 0 in mpz_jacobi. */ new CheckData( "804609", "421248363205206617296534688032638102314410556521742428832362659824", 1 ) , new CheckData( "4190209", "2239744742177804210557442048984321017460028974602978995388383905961079286530650825925074203175536427000", 1 ), /* Exersizes the case asize == 1, btwos = 63 in mpz_jacobi (relevant when GMP_LIMB_BITS == 64). */ new CheckData( "17311973299000934401", "1675975991242824637446753124775689449936871337036614677577044717424700351103148799107651171694863695242089956242888229458836426332300124417011114380886016", 1 ), new CheckData( "3220569220116583677", "41859917623035396746", -1 ), /* Other test cases that triggered bugs during development. */ new CheckData( "37200210845139167613356125645445281805", "340116213441272389607827434472642576514", -1 ), new CheckData( "74400421690278335226712251290890563610", "451716845976689892447895811408978421929", -1 ) }; private void check_data () throws Exception { int i; mpz_t a = new mpz_t(); mpz_t b = new mpz_t(); for (i = 0; i < data.length; i++) { GMP.mpz_set_str (a, data[i].a, 0); GMP.mpz_set_str (b, data[i].b, 0); try_all (a, b, data[i].answer); } } /* (a^2/b)=1 if gcd(a,b)=1, or (a^2/b)=0 if gcd(a,b)!=1. This includes when a=0 or b=0. */ private void check_squares_zi (randstate_t rands) throws Exception { mpz_t a = new mpz_t(); mpz_t b = new mpz_t(); mpz_t g = new mpz_t(); int i; int answer; long size_range; long an; long bn; mpz_t bs = new mpz_t(); for (i = 0; i < 50; i++) { GMP.mpz_urandomb (bs, rands, 32); size_range = GMP.mpz_get_ui (bs) % 10 + i/8 + 2; GMP.mpz_urandomb (bs, rands, size_range); an = GMP.mpz_get_ui (bs); GMP.mpz_rrandomb (a, rands, an); GMP.mpz_urandomb (bs, rands, size_range); bn = GMP.mpz_get_ui (bs); GMP.mpz_rrandomb (b, rands, bn); GMP.mpz_gcd (g, a, b); if (GMP.mpz_cmp_ui (g, 1L) == 0) { answer = 1; } else { answer = 0; } GMP.mpz_mul (a, a, a); try_all (a, b, answer); } } /* Check the handling of asize==0, make sure it isn't affected by the low limb. */ private void check_a_zero () throws Exception { mpz_t a = new mpz_t(); mpz_t b = new mpz_t(); GMP.mpz_set_ui (a, 0); GMP.mpz_set_ui (b, 1L); GMP.mpz_internal_set_ulimb(a, 0, 0); try_all (a, b, 1); /* (0/1)=1 */ GMP.mpz_internal_set_ulimb(a, 0, 1); try_all (a, b, 1); /* (0/1)=1 */ GMP.mpz_set_si (b, -1); GMP.mpz_internal_set_ulimb(a, 0, 0); try_all (a, b, 1); /* (0/-1)=1 */ GMP.mpz_internal_set_ulimb(a, 0, 1); try_all (a, b, 1); /* (0/-1)=1 */ GMP.mpz_set_ui (b, 0); GMP.mpz_internal_set_ulimb(a, 0, 0); try_all (a, b, 0); /* (0/0)=0 */ GMP.mpz_internal_set_ulimb(a, 0, 1); try_all (a, b, 0); /* (0/0)=0 */ GMP.mpz_set_ui (b, 2); GMP.mpz_internal_set_ulimb(a, 0, 0); try_all (a, b, 0); /* (0/2)=0 */ GMP.mpz_internal_set_ulimb(a, 0, 1); try_all (a, b, 0); /* (0/2)=0 */ } private static final int PRIME_N = 10; private static final long PRIME_MAX_SIZE = 50; private static final int PRIME_MAX_EXP = 4; private static final int PRIME_A_COUNT = 10; private static final int PRIME_B_COUNT = 5; private static final long PRIME_MAX_B_SIZE = 2000; private void check_jacobi_factored (randstate_t rands) throws Exception { mpz_t[] prime = new mpz_t[PRIME_N]; int[] exp = new int[PRIME_N]; mpz_t a = new mpz_t(); mpz_t b = new mpz_t(); mpz_t t = new mpz_t(); mpz_t bs = new mpz_t(); int i; /* Generate primes */ for (i = 0; i < PRIME_N; i++) { long size; prime[i] = new mpz_t(); GMP.mpz_urandomb (bs, rands, 32); size = GMP.mpz_get_ui (bs) % PRIME_MAX_SIZE + 2; GMP.mpz_rrandomb (prime[i], rands, size); if (GMP.mpz_cmp_ui (prime[i], 3) <= 0) { GMP.mpz_set_ui (prime[i], 3); } else { GMP.mpz_nextprime (prime[i], prime[i]); } } for (i = 0; i < PRIME_B_COUNT; i++) { int j, k; long bsize; GMP.mpz_set_ui (b, 1L); bsize = 1; for (j = 0; j < PRIME_N && bsize < PRIME_MAX_B_SIZE; j++) { GMP.mpz_urandomb (bs, rands, 32); exp[j] = (int)(GMP.mpz_get_ui (bs) % PRIME_MAX_EXP); GMP.mpz_pow_ui (t, prime[j], (long)exp[j]); GMP.mpz_mul (b, b, t); bsize = GMP.mpz_sizeinbase (b, 2); } for (k = 0; k < PRIME_A_COUNT; k++) { int answer; GMP.mpz_rrandomb (a, rands, bsize + 2); answer = TestUtil.jacobi (a, j, prime, exp); try_all (a, b, answer); } } } /* These tests compute (a|n), where the quotient sequence includes large quotients, and n has a known factorization. Such inputs are generated as follows. First, construct a large n, as a power of a prime p of moderate size. Next, compute a matrix from factors (q,1;1,0), with q chosen with uniformly distributed size. We must stop with matrix elements of roughly half the size of n. Denote elements of M as M = (m00, m01; m10, m11). We now look for solutions to n = m00 x + m01 y a = m10 x + m11 y with x,y > 0. Since n >= m00 * m01, there exists a positive solution to the first equation. Find those x, y, and substitute in the second equation to get a. Then the quotient sequence for (a|n) is precisely the quotients used when constructing M, followed by the quotient sequence for (x|y). Numbers should also be large enough that we exercise hgcd_jacobi, which means that they should be larger than max (GCD_DC_THRESHOLD, 3 * HGCD_THRESHOLD) With an n of roughly 40000 bits, this should hold on most machines. */ private static final int COUNT = 50; private static final int PBITS = 200; private static final int PPOWER = 201; private static final int MAX_QBITS = 500; private void check_large_quotients (randstate_t rands) throws Exception { mpz_t p; mpz_t n; mpz_t q; mpz_t g; mpz_t s; mpz_t t; mpz_t x; mpz_t y; mpz_t bs; mpz_t[][] M = new mpz_t[2][2]; long nsize; int i; p = new mpz_t(); n = new mpz_t(); q = new mpz_t(); g = new mpz_t(); s = new mpz_t(); t = new mpz_t(); x = new mpz_t(); y = new mpz_t(); bs = new mpz_t(); M[0][0] = new mpz_t(); M[0][1] = new mpz_t(); M[1][0] = new mpz_t(); M[1][1] = new mpz_t(); /* First generate a number with known factorization, as a random smallish prime raised to an odd power. Then (a|n) = (a|p). */ GMP.mpz_rrandomb (p, rands, PBITS); GMP.mpz_nextprime (p, p); GMP.mpz_pow_ui (n, p, PPOWER); nsize = GMP.mpz_sizeinbase (n, 2); for (i = 0; i < COUNT; i++) { //int j; //int chain_len; int answer; long msize; GMP.mpz_set_ui (M[0][0], 1L); GMP.mpz_set_ui (M[0][1], 0); GMP.mpz_set_ui (M[1][0], 0); GMP.mpz_set_ui (M[1][1], 1L); for (msize = 1; 2*(msize + MAX_QBITS) + 1 < nsize ;) { int ii; GMP.mpz_rrandomb (bs, rands, 32); GMP.mpz_rrandomb (q, rands, 1 + GMP.mpz_get_ui (bs) % MAX_QBITS); /* Multiply by (q, 1; 1,0) from the right */ for (ii = 0; ii < 2; ii++) { long size; GMP.mpz_swap (M[ii][0], M[ii][1]); GMP.mpz_addmul (M[ii][0], M[ii][1], q); size = GMP.mpz_sizeinbase (M[ii][0], 2); if (size > msize) msize = size; } } GMP.mpz_gcdext (g, s, t, M[0][0], M[0][1]); if (GMP.mpz_cmp_ui (g, 1L) != 0) { throw new Exception("Assertion failure: mpz_cmp_ui(g, 1) == 0"); } /* Solve n = M[0][0] * x + M[0][1] * y */ if (GMP.mpz_sgn (s) > 0) { GMP.mpz_mul (x, n, s); GMP.mpz_fdiv_qr (q, x, x, M[0][1]); GMP.mpz_mul (y, q, M[0][0]); GMP.mpz_addmul (y, t, n); if (GMP.mpz_sgn (y) <= 0) { throw new Exception("Assertion failure: mpz_sgn(y) > 0"); } } else { GMP.mpz_mul (y, n, t); GMP.mpz_fdiv_qr (q, y, y, M[0][0]); GMP.mpz_mul (x, q, M[0][1]); GMP.mpz_addmul (x, s, n); if (GMP.mpz_sgn (x) <= 0) { throw new Exception("Assertion failure: mpz_sgn(x) > 0"); } } GMP.mpz_mul (x, x, M[1][0]); GMP.mpz_addmul (x, y, M[1][1]); /* Now (x|n) has the selected large quotients */ answer = TestUtil.legendre (x, p); try_zi_zi (x, n, answer); } } public void run() { int ret = 0; randstate_t rands; long seed; if (!isActive()) { return; } onPreExecute(); try { //tests_start (); seed = uinterface.getSeed(); if (seed < 0) { seed = 0x100000000L + seed; } String s = "seed=" + seed; Log.d(TAG, s); uinterface.display(s); rands = new randstate_t(seed); check_data (); check_squares_zi (rands); check_a_zero (); check_jacobi_factored (rands); check_large_quotients (rands); } catch (GMPException e) { failmsg = "GMPException [" + e.getCode() + "] " + e.getMessage(); ret = -1; } catch (Exception e) { failmsg = e.getMessage(); ret = -1; } onPostExecute(Integer.valueOf(ret)); } private void dump_abort(String msg, mpz_t x, long y, int got, int answer ) throws Exception { String x_str = ""; String emsg; try { x_str = GMP.mpz_get_str(x, 10); } catch (GMPException e) { x_str = "GMPException [" + e.getCode() + "] " + e.getMessage(); } emsg = msg + "(" + x_str + ", " + y + ") is " + got + " should be " + answer; throw new Exception(emsg); } private void dump_abort2(String msg, long y, mpz_t x, int got, int answer ) throws Exception { String x_str = ""; String emsg; try { x_str = GMP.mpz_get_str(x, 10); } catch (GMPException e) { x_str = "GMPException [" + e.getCode() + "] " + e.getMessage(); } emsg = msg + "(" + y + ", " + x_str + ") is " + got + " should be " + answer; throw new Exception(emsg); } private void dump_abort3(String msg, mpz_t x, mpz_t y, int got, int answer ) throws Exception { String x_str = ""; String y_str = ""; String emsg; try { x_str = GMP.mpz_get_str(x, 10); } catch (GMPException e) { x_str = "GMPException [" + e.getCode() + "] " + e.getMessage(); } try { y_str = GMP.mpz_get_str(y, 10); } catch (GMPException e) { y_str = "GMPException [" + e.getCode() + "] " + e.getMessage(); } emsg = msg + "(" + x_str + ", " + y_str + ") is " + got + " should be " + answer; throw new Exception(emsg); } }
[ "aquick@alumni.uwaterloo.ca" ]
aquick@alumni.uwaterloo.ca
163f87f70a4b4456ea9a0dbf99cc3e78469f7ad4
1c24fbd7079e25452dab5a13dd20af8ca11cd889
/app/src/main/java/com/example/swimtracker/coach/workout_manage/Record.java
bd75bc31aaf67a4f3e193f5a1131be2731679de3
[]
no_license
trihung282/SwimmingGo
b26a92e780620d5c37174541f6d1c6c330c34a10
36a8ee76d937b6c76e4051fbfd41ae0cea9e14aa
refs/heads/master
2020-07-20T22:26:10.344436
2019-09-06T05:26:36
2019-09-06T05:26:36
206,695,904
0
0
null
null
null
null
UTF-8
Java
false
false
1,359
java
package com.example.swimtracker.coach.workout_manage; import com.example.swimtracker.user_manage.Swimmer; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; public class Record { private Swimmer swimmer; private int minute, sec, millisec; public Record(){ millisec = minute = sec = 0; } public Swimmer getSwimmer() { return swimmer; } public int getMinute() { return minute; } public void setMinute(int minute) { this.minute = minute; } public int getSec() { return sec; } public void setSec(int sec) { this.sec = sec; } public int getMillisec() { return millisec; } public void setMillisec(int millisec) { this.millisec = millisec; } public void setSwimmer(Swimmer swimmer) { this.swimmer = swimmer; } public JSONObject addToJSONObject(){ JSONObject jsonObject = new JSONObject(); try { jsonObject.put("user_id", swimmer.getId()); jsonObject.put("millisec", millisec); jsonObject.put("min", minute); jsonObject.put("sec", sec); jsonObject.put("heart_beat_id",1); } catch (JSONException e) { e.printStackTrace(); } return jsonObject; } }
[ "nthung282@gmail.com" ]
nthung282@gmail.com
8efb901d40a1bdd2e6ce299434fd859c28b42967
62422c8833e01d8d9500e6582325d689da3c24a5
/src/com/software/servlet/PostponeExamapplyServlet.java
0cdad3a561583422fda3fba6dfca10acfa4d1305
[]
no_license
123332344/javaweb
cd636c327ba6728c23a20fc5566f4ed69e5d3032
55c625e62a8578a1fbdff15906167c3194683fd9
refs/heads/master
2023-03-22T00:43:00.347653
2018-12-15T13:20:27
2018-12-15T13:20:27
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,358
java
package com.software.servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.software.entity.User; import com.software.impl.PostponeExamApplyDAOImpl; @WebServlet("/postponeExamapplyServlet") public class PostponeExamapplyServlet extends HttpServlet { private static final long serialVersionUID = 1L; PostponeExamApplyDAO pea = new PostponeExamApplyDAOImpl(); protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); User user = (User) session.getAttribute("user"); String yearTerm = request.getParameter("yearTerm"); String courseName = request.getParameter("courseName"); String applyReason = request.getParameter("applyReason"); PostponeExamApply postponeExamApply = new PostponeExamApply(yearTerm, user.getUsername(), courseName, applyReason); pea.insert(postponeExamApply); String message = "Ìá½»³É¹¦"; session.setAttribute("message", message); response.sendRedirect(request.getContextPath() + "/student/businessmanagement/postponeExamapply.jsp"); } }
[ "liqkjm@foxmail.com" ]
liqkjm@foxmail.com
523444542c30f363ca87f166c71126f546a47629
01e1f97b812f4e9fd982c9a81c22d5f0b651d897
/src/InterfaceTest/TestInterface.java
1a053a2b727fa7c2f4da22b3e4554ba90c8e356a
[]
no_license
Ritu541/AutomationT
81d15e5ec3da7643e414c7f9391093b2250946a2
c1fd9324fa8762979a07f28f4ea2fc36fe51889b
refs/heads/master
2020-08-04T05:50:34.566497
2019-10-01T11:01:58
2019-10-01T11:01:58
212,028,578
0
0
null
2019-10-03T18:45:47
2019-10-01T06:38:28
Java
UTF-8
Java
false
false
425
java
package InterfaceTest; public class TestInterface { static WebDriver driver, driver1, driver2; public static void main(String[] args) { driver = new ChromeDriver(); driver1 = new FirefoxDriver(); driver2 = new InternetExplorerDriver(); // calling directly all defined signature of method in webdriver driver1.get("www.gmail.com"); driver.gettitle(); driver.click(); driver.sendkeys("Rahul"); } }
[ "ritutiwari917.rt@gmail.com" ]
ritutiwari917.rt@gmail.com
f1e5ac33230a5b91b57e9d1940ed4e138cbdcc18
df4d0fb1848774a960ef857bea2f0afd8df20ff3
/gmall-chart/src/main/java/com/demo/controller/IndexController.java
39b3a853f8d73c0f2413843bd6cf77884050e57a
[]
no_license
LyfsGithud/spark-gmall-parent
da2888f43bc20461766b7eba4d979c1c03c54291
2024cf68b209c09aa562349928257f9d5c59d8d4
refs/heads/master
2022-11-11T11:05:27.229034
2020-03-13T02:53:55
2020-03-13T02:53:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,705
java
package com.demo.controller; import javax.servlet.http.HttpServletRequest; import com.demo.utils.GetDate; import com.demo.utils.HttpClientUtil; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.PropertySource; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; /** * <p> * description * </p> * * @author isacc 2020/2/23 5:08 * @since 1.0 */ @Controller @RequestMapping(value = "/") @PropertySource({"classpath:config/config.properties"}) public class IndexController { @Value("${my.totalUrl}") private String totalUrl; @Value("${my.hourUrl}") private String hourUrl; @Value("${my.esDataUrl}") private String esDataUrl; @Value("${my.sexUrl}") private String sexUrl; @GetMapping(value = "index1") public String index1() { return "index1"; } @GetMapping(value = "index") public String index() { return "index"; } @GetMapping(value = "table") public String table() { return "table"; } @GetMapping(value = "map") public String map() { return "map"; } @GetMapping(value = "getTotal") @ResponseBody public String getTotal() { String sysDate = GetDate.getSysDate(); return HttpClientUtil.doGet(totalUrl + "?date=" + sysDate); // String s = "[{'id':'l0','name':'每日统计','yesData':100,'toData':50},{'id':'l1','name':'每日日活','yesData':500,'toData':50},{'id':'l2','name':'活跃度','yesData':100,'toData':50},{'id':'l3','name':'啊啊啊','yesData':100,'toData':50}]"; // return s; } /** * 获取统计数据 */ @GetMapping(value = "getAnalysisData") @ResponseBody public String getList(String tag) { // hourUrl // System.out.println(tag); // String s = "{'yesterday':{'00':110,'01':110,'02':25,'03':40,'07':87,'08':65,'09':32,'10':45,'11':35,'12':87,'13':34,'14':78,'15':54,'16':110,'17':100,'18':100,'19':56,'20':89,'21':88,'22':87,'23':86},'today':{'00':122,'01':122,'02':110,'03':105,'04':100,'05':46,'06':24,'07':24,'08':123,'09':221,'10':222,'11':100,'12':100,'13':78,'14':87,'15':67,'16':44,'17':77,'18':120,'19':100,'20':100,'21':108,'22':80,'23':55}}"; String sysDate = GetDate.getSysDate(); return HttpClientUtil.doGet(hourUrl + "?id=" + tag + "&&date=" + sysDate); // return s; } @GetMapping(value = "getData") @ResponseBody public String getData(HttpServletRequest req) { String level = req.getParameter("level"); String draw = req.getParameter("draw"); String start = req.getParameter("start"); String length = req.getParameter("length"); // System.out.println(time+level+text); String time = req.getParameter("time"); String text = req.getParameter("text"); int d = Integer.parseInt(draw); int s = Integer.parseInt(start) + 1; int l = Integer.parseInt(level); int size = Integer.parseInt(length); String sysDate = GetDate.getSysDate(); String url = esDataUrl + "?startpage=" + s + "&&size=" + size; if (time != null && !"".equals(time)) { url = url + "&&date=" + time; } else { url = url + "&&date=" + "2019-03-04"; } if (text != null && !"".equals(text)) { url = url + "&&keyword=" + text; } else { url = url + "&&keyword=" + ""; } /*//获取前台额外传递过来的查询条件 String extra_search = req.getParameter("extra_search");*/ String json = HttpClientUtil.doGet(url); return "{'draw':" + draw + ",'data':" + json + "}"; /*return "{'data':{'draw':"+draw+",'total':20,'rows':[{'user_id':'123'," + "'sku_id':'123'," + "'user_gender':'M'," + "'user_age':12," + "'user_level':1," + "'order_price':123.2," + "'sku_name':'asd'," + "'sku_tm_id':'234'," + "'sku_category1_id':'435'," + "'sku_category2_id':'3465'," + "'sku_category3_id':'56'," + "'sku_category1_name':'dfg'," + "'sku_category2_name':'hg'," + "'sku_category3_name':'bc'," + "'spu_id':'876'," + "'sku_num':234," + "'order_count':234," + "'order_amount':654," + "'dt':'hgdff'},{'user_id':'123'," + "'sku_id':'123'," + "'user_gender':'M'," + "'user_age':12," + "'user_level':1," + "'order_price':123.2," + "'sku_name':'asd'," + "'sku_tm_id':'234'," + "'sku_category1_id':'435'," + "'sku_category2_id':'3465'," + "'sku_category3_id':'56'," + "'sku_category1_name':'dfg'," + "'sku_category2_name':'hg'," + "'sku_category3_name':'bc'," + "'spu_id':'876'," + "'sku_num':234," + "'order_count':234," + "'order_amount':654," + "'dt':'hgdff'},{'user_id':'123'," + "'sku_id':'123'," + "'user_gender':'M'," + "'user_age':12," + "'user_level':1," + "'order_price':123.2," + "'sku_name':'asd'," + "'sku_tm_id':'234'," + "'sku_category1_id':'435'," + "'sku_category2_id':'3465'," + "'sku_category3_id':'56'," + "'sku_category1_name':'dfg'," + "'sku_category2_name':'hg'," + "'sku_category3_name':'bc'," + "'spu_id':'876'," + "'sku_num':234," + "'order_count':234," + "'order_amount':654," + "'dt':'hgdff'}," + "{'user_id':'123'," + "'sku_id':'123'," + "'user_gender':'M'," + "'user_age':12," + "'user_level':1," + "'order_price':123.2," + "'sku_name':'asd'," + "'sku_tm_id':'234'," + "'sku_category1_id':'435'," + "'sku_category2_id':'3465'," + "'sku_category3_id':'56'," + "'sku_category1_name':'dfg'," + "'sku_category2_name':'hg'," + "'sku_category3_name':'bc'," + "'spu_id':'876'," + "'sku_num':234," + "'order_count':234," + "'order_amount':654," + "'dt':'hgdff'}" + "]}}";*/ } @GetMapping(value = "getSexData") @ResponseBody public String getSexData(String time, Integer level, String text) { // System.out.println(time+level+text); /*String json = HttpClientUtil.doGet(sexUrl + "?from=" + s + "&&time=" + time + "&&text=" + text + "&&level=" + l + "&&size=" + size);*/ return "{'stat':[{'group':[{'name':'20岁以下','value':300},{'name':'20-30岁','value':200},{'name':'30岁以上','value':100}]},{'group':[{'name':'男','value':200},{'name':'女','value':200}]}]}"; } /** * 获取地图数据 */ @GetMapping(value = "getChinaOrderData") @ResponseBody public String getChinaOrderData() { return ""; } }
[ "codingdebugallday@163.com" ]
codingdebugallday@163.com
e1bc774c6aee1850f75ca72b790955ab3d7775d3
7caa8f633bc84503353db798cc9021a8714f8919
/aula17/Exercicio23.java
24bf61942ce9286e73777f5ae70e8c3319a210e2
[]
no_license
BrunoReisOliveira/curso_java_basico
2352f9bebf644424a8d7b0535b73f436d4b991ed
37f5c2809a01aed7933928cecbbeaa8f25fcabf6
refs/heads/master
2022-12-05T04:24:29.299395
2020-08-30T02:41:32
2020-08-30T02:41:32
290,366,332
0
0
null
null
null
null
UTF-8
Java
false
false
604
java
package com.bruno.cursojava.aula17; public class Exercicio23 { public static void main(String[] args) { /* * você foi contratado para desenvolver o programa que monta esta tabela de preços, que conterá os preços de 1 até 50 produtos, conforme o exemplo abaixo: Lojas Quase Dois - Tabela de preços *1- R$ 1.99 *2- R$ 3.98 *... *50- R$ 99.50 */ int i=0; double basepreco =1.99; System.out.println("Lojas Quase Dois - Tabela de preços"); for(i=1; i<=50; i++) { System.out.println(i+"-R$"+basepreco); basepreco +=1.99; } } }
[ "brureisoliveira@gmail.com" ]
brureisoliveira@gmail.com
7b9f1d0765bac15f44a7489d55caacb7cd75832c
7747e6914a9f5e753effaaa4378b3751f9aefe6d
/src/main/java/construccion/singleton/InnerStaticSingletonDemo.java
7761e24375443de8cc2c895022380f42a3907cbe
[]
no_license
luiggi1803/Patrones-Udemy
d785584bf63b91a2a2fdf9cb9c5903ecfc92b1dc
90e2d9b660e70f54646a5974f205de30dd38f6a9
refs/heads/master
2022-12-09T06:36:34.600241
2020-09-20T03:29:52
2020-09-20T03:29:52
286,634,064
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
package construccion.singleton; class InnerStaticSingleton{ //Evita Hacer sincronizacion en hilos public InnerStaticSingleton() { } private static class Impl { private static final InnerStaticSingleton INSTANCE= new InnerStaticSingleton(); } public InnerStaticSingleton getInstance(){ return Impl.INSTANCE; } } public class InnerStaticSingletonDemo { }
[ "luiggi.huaman.18@gmail.com" ]
luiggi.huaman.18@gmail.com
766ea68adc594a51aea74019b2ced256e8420336
0c7c50cb6d26fe76457dadb4f911c437d72a23c3
/MeTube-war/src/java/servlets/commands/DeleteVideoCommand.java
82e59c33a90f67391ca901aacc7d5396f762260b
[]
no_license
vidaxd/MeTube
f59d0a5d9d22f791ac4435395d5d76fd2f3e569d
7353d5e8c225fbb34d60b52d47414b3907f6db0f
refs/heads/master
2020-05-22T08:38:57.997947
2019-05-12T17:18:09
2019-05-12T17:18:09
186,282,966
0
0
null
null
null
null
UTF-8
Java
false
false
1,714
java
package servlets.commands; import control.VideoFacade; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.servlet.ServletException; import javax.servlet.http.HttpSession; import singleton.LogRegistrer; import stateful.User; public class DeleteVideoCommand extends FrontCommand{ @Override public void process() { VideoFacade video = null; try { video = (VideoFacade) InitialContext.doLookup("java:global/MeTube/MeTube-ejb/VideoFacade!control.VideoFacade"); } catch (NamingException ex) { Logger.getLogger(DeleteVideoCommand.class.getName()).log(Level.SEVERE, null, ex); } HttpSession session = request.getSession(true); String videoName = request.getParameter("videoName"); video.deleteVideo(videoName); try { User u = (User) session.getAttribute("user"); LogRegistrer lg = (LogRegistrer) InitialContext.doLookup("java:global/MeTube/MeTube-ejb/LogRegistrer!singleton.LogRegistrer"); lg.log(this.getClass().getSimpleName()+"::"+Thread.currentThread().getStackTrace()[1].getMethodName()+"::"+u.getUsername()); } catch (NamingException ex) { Logger.getLogger(DeleteVideoCommand.class.getName()).log(Level.SEVERE, null, ex); } try { forward("/index.jsp"); } catch (ServletException | IOException ex) { Logger.getLogger(DeleteVideoCommand.class.getName()).log(Level.SEVERE, null, ex); } } }
[ "Usuario@DESKTOP-MAOPI2H" ]
Usuario@DESKTOP-MAOPI2H
a3ce389215c306e0e11ff4eee94f19bbcd23c0c4
86f77a31857271b11f244193500aa9210331d7a7
/src/application/Main.java
99cb9ac8ad2618dfa2181cce259d09d86986ebc4
[]
no_license
MichalTrojek/Vratkovac
52b1aa915f83a8c7e4ebc5a04059199f9b1e7e5b
34f19c4f85e2f1a240714162be29d270f688b920
refs/heads/master
2020-03-22T14:36:55.953031
2018-07-21T19:02:44
2018-07-21T19:02:44
140,192,415
0
0
null
null
null
null
UTF-8
Java
false
false
1,071
java
package application; import java.io.IOException; import application.server.Server; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.stage.Stage; public class Main extends Application { @Override public void start(Stage primaryStage) { try { Parent root = FXMLLoader.load(getClass().getResource("/application/ui/Main.fxml")); Scene scene = new Scene(root); scene.getStylesheets().add("application.css"); primaryStage.getIcons().add(new Image("/images/icons8_Return_Book_48px.png")); primaryStage.setScene(scene); primaryStage.setTitle("Vratkovač"); primaryStage.setResizable(false); primaryStage.setOnCloseRequest(e -> { try { Server.closeAll(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } }); primaryStage.show(); } catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args) { launch(args); } }
[ "MichalTrojek1@gmail.com" ]
MichalTrojek1@gmail.com
0e032bc41466768035edd9ccb0b1aef2933a9db6
aae49c4e518bb8cb342044758c205a3e456f2729
/GeogebraiOS/javasources/org/geogebra/common/awt/Component.java
7838e1fec54ebb1a7af66e039a20eb333eaae44c
[]
no_license
kwangkim/GeogebraiOS
00919813240555d1f2da9831de4544f8c2d9776d
ca3b9801dd79a889da6cb2fdf24b761841fd3f05
refs/heads/master
2021-01-18T05:29:52.050694
2015-10-04T02:29:03
2015-10-04T02:29:03
45,118,575
4
2
null
2015-10-28T14:36:32
2015-10-28T14:36:31
null
UTF-8
Java
false
false
66
java
package org.geogebra.common.awt; public interface Component { }
[ "kuoyichun1102@gmail.com" ]
kuoyichun1102@gmail.com
43a4eb65e304dc77364d183bf5dd8a89f79cd40a
d2b3c551db6bc7192551d61c0a65b91153d605c8
/app/src/main/java/com/example/awesomecatapp/GifFragment.java
96a90aaf1fc31cdc627a868fa124a734c7e6b53a
[]
no_license
rennehir/awesomecatapp
d7701bd9448cb22df31a5a07743d90f8581b879a
afcaf340e8dd2b283b1e0e23a485dfde2e060424
refs/heads/master
2020-04-06T04:24:34.330875
2017-05-28T10:33:44
2017-05-28T10:33:44
82,942,429
0
1
null
null
null
null
UTF-8
Java
false
false
1,441
java
package com.example.awesomecatapp; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; /** * A simple {@link Fragment} subclass. */ public class GifFragment extends Fragment { public GifFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_gif, container, false); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); // Set text Bundle bundle = getArguments(); if (bundle != null) { setGif(bundle.getString("url")); } } public void setGif(String url) { try { ImageView iv = (ImageView) getView().findViewById(R.id.imageViewGif); Glide .with(getContext()) .load(url) .asGif() .placeholder(R.mipmap.kisse) .error(R.mipmap.kisse) .into(iv); TextView tv = (TextView) getView().findViewById(R.id.viewGifUrl); String text = "Gif source: " + url; tv.setText(text); } catch (NullPointerException e) { e.printStackTrace(); } } }
[ "git@rennehir.fi" ]
git@rennehir.fi
b1a0c2b5c66c5393e3435aeb094617ae1805280a
0b0d470c2f5800f61f6f67ec3a30dc376187a9e2
/deeplearning4j-scaleout/deeplearning4j-scaleout-akka-word2vec/src/main/java/org/deeplearning4j/text/sentenceiterator/UimaSentenceIterator.java
365dc6e121454e8340ad71d9e0a3938dafbc1932
[ "Apache-2.0" ]
permissive
lipengyu/java-deeplearning
1311942415cd6489b6cbec00ef2a71ab0c813e11
82d55aeecec08798d7ce48d017f7c282cc0f3ef2
refs/heads/master
2021-01-21T03:59:30.360076
2014-08-30T16:59:55
2014-08-30T16:59:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,787
java
package org.deeplearning4j.text.sentenceiterator; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.uima.analysis_engine.AnalysisEngine; import org.apache.uima.cas.CAS; import org.apache.uima.collection.CollectionReader; import org.apache.uima.fit.factory.AnalysisEngineFactory; import org.apache.uima.fit.util.JCasUtil; import org.apache.uima.resource.ResourceInitializationException; import org.cleartk.token.type.Sentence; import org.cleartk.util.cr.FilesCollectionReader; import org.deeplearning4j.text.annotator.SentenceAnnotator; import org.deeplearning4j.text.annotator.TokenizerAnnotator; import org.deeplearning4j.word2vec.sentenceiterator.BaseSentenceIterator; import org.deeplearning4j.word2vec.sentenceiterator.SentenceIterator; import org.deeplearning4j.word2vec.sentenceiterator.SentencePreProcessor; /** * Iterates over and returns sentences * based on the passed in analysis engine * @author Adam Gibson * */ public class UimaSentenceIterator extends BaseSentenceIterator { protected CAS cas; protected CollectionReader reader; protected AnalysisEngine engine; protected Iterator<String> sentences; protected String path; public UimaSentenceIterator(SentencePreProcessor preProcessor,String path, AnalysisEngine engine) { super(preProcessor); this.path = path; try { this.reader = FilesCollectionReader.getCollectionReader(path); } catch (ResourceInitializationException e) { throw new RuntimeException(e); } this.engine = engine; } public UimaSentenceIterator(String path, AnalysisEngine engine) { this(null,path,engine); } @Override public String nextSentence() { if(sentences == null || !sentences.hasNext()) { try { if(cas == null) cas = engine.newCAS(); cas.reset(); reader.getNext(cas); engine.process(cas); List<String> list = new ArrayList<String>(); for(Sentence sentence : JCasUtil.select(cas.getJCas(), Sentence.class)) { list.add(sentence.getCoveredText()); } sentences = list.iterator(); //needs to be next cas while(!sentences.hasNext()) { //sentence is empty; go to another cas if(reader.hasNext()) { cas.reset(); reader.getNext(cas); engine.process(cas); for(Sentence sentence : JCasUtil.select(cas.getJCas(), Sentence.class)) { list.add(sentence.getCoveredText()); } sentences = list.iterator(); } else return null; } String ret = sentences.next(); if(this.getPreProcessor() != null) ret = this.getPreProcessor().preProcess(ret); return ret; } catch (Exception e) { throw new RuntimeException(e); } } else { String ret = sentences.next(); if(this.getPreProcessor() != null) ret = this.getPreProcessor().preProcess(ret); return ret; } } /** * Creates a uima sentence iterator with the given path * @param path the path to the root directory or file to read from * @return the uima sentence iterator for the given root dir or file * @throws Exception */ public static SentenceIterator createWithPath(String path) throws Exception { return new UimaSentenceIterator(path,AnalysisEngineFactory.createEngine(AnalysisEngineFactory.createEngineDescription(TokenizerAnnotator.getDescription(), SentenceAnnotator.getDescription()))); } @Override public boolean hasNext() { try { return reader.hasNext() || sentences != null && sentences.hasNext(); } catch (Exception e) { throw new RuntimeException(e); } } @Override public void reset() { try { this.reader = FilesCollectionReader.getCollectionReader(path); } catch (ResourceInitializationException e) { throw new RuntimeException(e); } } }
[ "agibson@clevercloudcomputing.com" ]
agibson@clevercloudcomputing.com
7b6249b9c1e852980f48f35fff4f67d661ebff15
355c45768aa08d4b37a06dc2da1bb6271e4d3b6e
/src/main/java/spring/lifeCycle/designMode/Test.java
0fb225c7da043aba1c2f7808f5292fd17d2b2f70
[]
no_license
silcat/java-base-demo
684af1a8e2206fc6d7d634a2efe54a2cf46a1751
8dab4c3d5c52a7b8db63bb9008c0e94d07dd85f0
refs/heads/master
2022-10-06T00:26:05.684348
2021-03-31T08:12:44
2021-03-31T08:12:44
106,670,524
0
0
null
2020-12-06T14:27:01
2017-10-12T09:10:57
Java
UTF-8
Java
false
false
319
java
package spring.lifeCycle.designMode; import java.io.IOException; public class Test { public static void main(String[] args) throws IOException { Factory aFactory = new AFactory(); Factory bFactory = new BFactory(); aFactory.getProduct("A"); bFactory.getProduct("B"); } }
[ "yangtianfeng@youxin.com" ]
yangtianfeng@youxin.com
2de31189c9bf06c119ba95dbc52b08d6b72bb049
aeb6379830aebc29670d0427be4eb2f537c773d3
/src/main/java/com/hgcode/wtboot/config/GlobalExceptionHandler.java
0c2cda977c2fc9eef5972b4c9b4f219e85d3113e
[]
no_license
wentaotang/wtboot
0d5bddced4f30852bb37b0d3e2bee02d4957d90c
4e2a847d1dbd1e7c5b39db31e4a396ac523074f9
refs/heads/master
2022-05-02T07:08:34.635896
2022-03-27T15:12:49
2022-03-27T15:12:49
222,349,467
0
0
null
null
null
null
UTF-8
Java
false
false
1,465
java
package com.hgcode.wtboot.config; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.BindingResult; import org.springframework.validation.FieldError; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import javax.validation.ConstraintViolationException; @ControllerAdvice public class GlobalExceptionHandler { @ExceptionHandler({MethodArgumentNotValidException.class}) public ResponseEntity handleMethodArgumentNotValidException(MethodArgumentNotValidException ex) { BindingResult bindingResult = ex.getBindingResult(); String msg = ""; for (FieldError fieldError : bindingResult.getFieldErrors()) { msg = fieldError.getDefaultMessage(); break; } return ResponseEntity.status(HttpStatus.BAD_REQUEST) .contentType(MediaType.APPLICATION_JSON) .body(msg); } @ExceptionHandler({ConstraintViolationException.class}) public ResponseEntity handleMethodArgumentNotValidException(ConstraintViolationException ex) { return ResponseEntity.status(HttpStatus.BAD_REQUEST) .contentType(MediaType.APPLICATION_JSON) .body(ex.getMessage()); } }
[ "wentao_tang@126.com" ]
wentao_tang@126.com
abfb041e4c39c948e81b53f68c96bcd7551996e6
5f889ef76c02fb43048b9037ea18169130747613
/beehive-design/src/main/java/top/aprilyolies/curator/framework/TransactionExample.java
761ce05e56b8a8996d68ec1f5275efcbb1f66481
[ "MIT", "Apache-2.0" ]
permissive
AprilYoLies/beehive
e3b2728accf57098a372894613d9ded040d5c028
507ede3ace163e1c420aa12755466b96d5699b65
refs/heads/master
2022-12-20T22:57:32.923900
2019-09-16T11:43:32
2019-09-16T11:43:32
190,317,990
0
0
Apache-2.0
2022-12-16T03:20:29
2019-06-05T03:14:42
Java
UTF-8
Java
false
false
2,303
java
package top.aprilyolies.curator.framework; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.api.transaction.CuratorTransaction; import org.apache.curator.framework.api.transaction.CuratorTransactionFinal; import org.apache.curator.framework.api.transaction.CuratorTransactionResult; import java.util.Collection; /** * @Author EvaJohnson * @Date 2019-06-06 * @Email g863821569@gmail.com */ public class TransactionExample { public static void main(String[] args) throws Exception { CuratorFramework client = CreateClientExample.createSimple("127.0.0.1:2181"); client.start(); transaction(client); } public static Collection<CuratorTransactionResult> transaction(CuratorFramework client) throws Exception { // this example shows how to use ZooKeeper's new transactions Collection<CuratorTransactionResult> results = client.inTransaction().create().forPath("/path", "some data".getBytes()) .and().setData().forPath("/path", "other data".getBytes()) .and().delete().forPath("/path") .and().commit(); // IMPORTANT! // called for (CuratorTransactionResult result : results) { System.out.println(result.getForPath() + " - " + result.getType()); } return results; } /* * These next four methods show how to use Curator's transaction APIs in a * more traditional - one-at-a-time - manner */ public static CuratorTransaction startTransaction(CuratorFramework client) { // start the transaction builder return client.inTransaction(); } public static CuratorTransactionFinal addCreateToTransaction(CuratorTransaction transaction) throws Exception { // add a create operation return transaction.create().forPath("/a/path", "some data".getBytes()).and(); } public static CuratorTransactionFinal addDeleteToTransaction(CuratorTransaction transaction) throws Exception { // add a delete operation return transaction.delete().forPath("/another/path").and(); } public static void commitTransaction(CuratorTransactionFinal transaction) throws Exception { // commit the transaction transaction.commit(); } }
[ "863821569@qq.com" ]
863821569@qq.com
4a7d5eb39d027499389197442691938a4ecad767
9c0caed0a336c2cf84bb158cd1a33447a9cd6014
/src/main/java/plan3/statics/exceptions/AbstractHttpException.java
e9e64fce001e437ecee62c5aa87a8c9bd312c669
[]
no_license
chids/statics-prototype
4b7f12bd73c883d79c403831e6a05466693c7b56
f11f8f7a58555aa7733b8de929d2ba20d59d871f
refs/heads/master
2020-03-28T07:53:37.903028
2018-09-08T12:30:00
2018-09-08T12:30:00
147,930,860
0
0
null
null
null
null
UTF-8
Java
false
false
696
java
package plan3.statics.exceptions; import static javax.ws.rs.core.HttpHeaders.ETAG; import plan3.statics.model.Located; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; abstract class AbstractHttpException extends WebApplicationException { private static final long serialVersionUID = 3814795729581246178L; protected AbstractHttpException(final Status status, final Located entity) { super(Response .status(status) .location(entity.where().toURI()) .header(ETAG, entity.where().revision()) .entity(entity) .build()); } }
[ "marten.gustafson@schibsted.com" ]
marten.gustafson@schibsted.com
3b69b94bb931658cbc555ef616f8b7aeacf388d7
e0ca578937214636305b8453bc932a69308d007e
/interview-question/src/singleton/Singleton_save_two.java
2d8a07af7570c7575ad740483389e98318159e05
[]
no_license
zongdj001/interview-question
286f10c569ff193f3662c3b34dec2adc89de8782
3c9fcb9bde8250344a48347e45119030bd6ee2b6
refs/heads/master
2020-12-02T20:54:58.408611
2017-07-16T13:10:40
2017-07-16T13:10:40
96,227,580
0
1
null
2017-07-16T13:10:41
2017-07-04T14:40:06
Java
GB18030
Java
false
false
320
java
package singleton; /** * 多线程同步单例模式 * @author 丁鹏 * */ public class Singleton_save_two { private static Singleton_save_two instance; private Singleton_save_two(){} public static synchronized Singleton_save_two getInstance(){ instance = new Singleton_save_two(); return instance; } }
[ "zongdj@9.76.181.120" ]
zongdj@9.76.181.120
f925f7fe6cb5516f24d5b923e98d42011f51b06f
6f1d9c8ae1a170e8989c636259f9bd8a8c3ea55e
/hilos/src/org/nestorbardel/hilos/ejemplos/EjemploInterfaceRunnableFuncional.java
d38a1eabab690b538f7742fd27da93a69ae4113a
[]
no_license
soycolgado/cursoJava
ebaaa1270adac9b55655320ed355d1a7a044f577
0c9cd77c52a1308e56878c34e48c86711d50c85f
refs/heads/main
2023-07-15T16:30:10.834089
2021-08-29T15:11:24
2021-08-29T15:11:24
359,062,289
0
0
null
null
null
null
UTF-8
Java
false
false
1,281
java
package org.nestorbardel.hilos.ejemplos; import org.nestorbardel.hilos.ejemplos.runnable.ViajeTarea; public class EjemploInterfaceRunnableFuncional { public static void main(String[] args) throws InterruptedException { Thread main = Thread.currentThread(); Runnable viaje = () ->{ for(int i = 0; i < 10; i++){ System.out.println(i + " - " + Thread.currentThread().getName()); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } System.out.println("Finalmente me voy de viaje a: " + Thread.currentThread().getName()); System.out.println(main.getState()); }; Thread v1 = new Thread(viaje, "Isla de pascua"); Thread v2 = new Thread(viaje, "Robinson Crusoe"); Thread v3 = new Thread(viaje, "Juan Fernandez"); Thread v4 = new Thread(viaje, "Isla de Chiloe"); v1.start(); v2.start(); v3.start(); v4.start(); v1.join(); v2.join(); v3.join(); v4.join(); // Thread.sleep(1000); System.out.println("Continuando con la ejecucion del metodo main"); } }
[ "soycolgado@gmail.com" ]
soycolgado@gmail.com
9afec2f9a81b2194059a76139cc0388ebf1826a9
e64333b42ec2c4aa57ea4bbbc33d1bc0ffe51b93
/java/gulava/processor/MakePredicatesMetadata.java
5196deeec787693cb58385c522d7013a07ecc47b
[ "MIT" ]
permissive
isabella232/gulava
c1dde98f41caf7c9f6ae57f70a324f41c435c512
419e75e3c72ca5ae13b5b73c7d71b8617d3522e0
refs/heads/master
2023-01-20T09:40:49.632160
2020-11-27T09:50:21
2020-11-30T16:40:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,340
java
/* * Copyright (c) 2015 The Gulava Authors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package gulava.processor; import gulava.annotation.MakePredicates; import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.annotation.processing.Messager; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.Modifier; import javax.lang.model.element.TypeElement; import javax.lang.model.util.ElementFilter; /** * Metadata necessary to generate a predicates subclass. This contains information obtained from the * class annotated with @{@link MakePredicates}. */ public final class MakePredicatesMetadata { private final String name; private final List<Predicate> predicates; private final TypeElement annotatedType; private final List<ExecutableElement> constructors; private MakePredicatesMetadata( String name, List<Predicate> predicates, TypeElement annotatedType, List<ExecutableElement> constructors) { this.name = name; this.predicates = Collections.unmodifiableList(new ArrayList<>(predicates)); this.annotatedType = annotatedType; this.constructors = Collections.unmodifiableList(new ArrayList<>(constructors)); } /** The name of the generated implementation class. */ public String getName() { return name; } public List<Predicate> getPredicates() { return predicates; } public TypeElement getAnnotatedType() { return annotatedType; } /** * The constructors in the annotated type that are not private. For each such constructor, the * generated class creates another constructor with the same arguments that delegates to the * superclass' one. */ public List<ExecutableElement> getConstructors() { return constructors; } /** * Returns the metadata stored in a type annotated with @{@link MakePredicates}. */ public static MakePredicatesMetadata of(TypeElement annotatedType, Messager messager) { String name = "MakePredicates_" + Processors.generatedClassName(annotatedType); List<ExecutableElement> predicateMethods = new ArrayList<>(); List<? extends ExecutableElement> allMethods = ElementFilter.methodsIn(annotatedType.getEnclosedElements()); for (ExecutableElement method : allMethods) { if (!method.getModifiers().contains(Modifier.PRIVATE) && !method.getModifiers().contains(Modifier.STATIC) && method.getModifiers().contains(Modifier.ABSTRACT)) { predicateMethods.add(method); } } ClauseMethods clauseMethods = ClauseMethods.withPredicates(predicateMethods, messager); for (ExecutableElement method : allMethods) { if (method.getSimpleName().toString().indexOf('_') != -1) { clauseMethods.addClause(method); } } List<ExecutableElement> constructors = new ArrayList<>(); List<ExecutableElement> allConstructors = ElementFilter.constructorsIn(annotatedType.getEnclosedElements()); for (ExecutableElement constructor : allConstructors) { if (!constructor.getModifiers().contains(Modifier.PRIVATE)) { constructors.add(constructor); } } return new MakePredicatesMetadata( name, clauseMethods.predicateMetadata(), annotatedType, constructors); } }
[ "matvore@google.com" ]
matvore@google.com
00329bc9dbfc02bd1769aebf713d7d3502a3d0e6
a742f95eac27c11cb39b5a5110a49d4fcf37beff
/src/test/java/tk/mybatis/mapper/mapper/CountryUMapper.java
4744beb5a129c39133bc91c76e5417b68ed80973
[ "MIT" ]
permissive
zhkm4321/common-mapper
f6470314e8a1bb909314a9a0a7fc19f4ec6d2c15
1c9c99cec62b09fd301aad8688005d52e5256aee
refs/heads/master
2021-01-09T06:39:57.763873
2017-02-06T03:53:19
2017-02-06T03:53:19
81,042,984
0
0
null
null
null
null
UTF-8
Java
false
false
1,411
java
/* * The MIT License (MIT) * * Copyright (c) 2014-2016 abel533@gmail.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package tk.mybatis.mapper.mapper; import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.model.CountryU; /** * Created by liuzh on 2014/11/19. */ public interface CountryUMapper extends Mapper<CountryU> { }
[ "zhenghang@472ff716-d417-4740-995e-e19741987fae" ]
zhenghang@472ff716-d417-4740-995e-e19741987fae
9a0566e2507a3f7f65c8850d0f370a080b92a8a9
0e24e892d70777791624268d44c6caf447a63c75
/cms/src/main/java/com/eallard/cms/dao/impl/RoleDaoImpl.java
ca6cf246b47fd09f73966f230c13cca43d6ec3d2
[]
no_license
cms-dev-org/cms
c228dd035e380054eb54d295e18efc7c63b467e4
b37ffdb05c45ae36cc0270b08b259b1e3dc0c8b8
refs/heads/master
2021-01-13T02:37:41.874890
2014-09-10T08:46:25
2014-09-10T09:18:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
541
java
package com.eallard.cms.dao.impl; import java.util.List; import org.springframework.stereotype.Repository; import com.eallard.basic.dao.impl.BaseDaoImpl; import com.eallard.cms.dao.IRoleDao; import com.eallard.cms.model.Role; @Repository public class RoleDaoImpl extends BaseDaoImpl<Role> implements IRoleDao{ @Override public List<Role> listRole() { return this.list("from Role"); } @Override public void deleteRoleUsers(int rid) { this.updateByHql("delete UserRole ur where ur.role.id=?", rid); } }
[ "renzw@asiainfo-linkage.com" ]
renzw@asiainfo-linkage.com
18d44595a20123d4ccd6241607cbba6ed63b5b48
d65811c874b7712af445382c96299a4d54d975f1
/com/sonycsl/echo/eoj/device/cookinghousehold/Refrigerator.java
204f36958e0f485a85a849eef481700b1ff9c1f5
[]
no_license
YutaEmura/echonet
6bdba2393dbd238d73d6441a1bd3161a64180673
9672bd6dc1892c3853c0a92239569fab9cf7b547
refs/heads/master
2020-04-14T13:53:06.906749
2015-06-26T05:14:21
2015-06-26T05:14:21
38,088,742
0
0
null
null
null
null
UTF-8
Java
false
false
194,650
java
/* * Copyright 2012 Sony Computer Science Laboratories, Inc. <info@kadecot.net> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.sonycsl.echo.eoj.device.cookinghousehold; import com.sonycsl.echo.Echo; import com.sonycsl.echo.EchoFrame; import com.sonycsl.echo.EchoProperty; import com.sonycsl.echo.eoj.EchoObject; import com.sonycsl.echo.eoj.device.DeviceObject; import com.sonycsl.echo.node.EchoNode; public abstract class Refrigerator extends DeviceObject { public static final short ECHO_CLASS_CODE = (short)0x03B7; public static final byte EPC_DOOR_OPEN_CLOSE_STATUS = (byte)0xB0; public static final byte EPC_DOOR_OPEN_WARNING = (byte)0xB1; public static final byte EPC_REFRIGERATOR_COMPARTMENT_DOOR_STATUS = (byte)0xB2; public static final byte EPC_FREEZER_COMPARTMENT_DOOR_STATUS = (byte)0xB3; public static final byte EPC_ICE_COMPARTMENT_DOOR_STATUS = (byte)0xB4; public static final byte EPC_VEGETABLE_COMPARTMENT_DOOR_STATUS = (byte)0xB5; public static final byte EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_DOOR = (byte)0xB6; public static final byte EPC_MAXIMUM_ALLOWABLE_TEMPERATURE_SETTING_LEVEL = (byte)0xE0; public static final byte EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_SETTING = (byte)0xE2; public static final byte EPC_FREEZER_COMPARTMENT_TEMPERATURE_SETTING = (byte)0xE3; public static final byte EPC_ICE_TEMPERATURE_SETTING = (byte)0xE4; public static final byte EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_SETTING = (byte)0xE5; public static final byte EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_SETTING = (byte)0xE6; public static final byte EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_LEVEL_SETTING = (byte)0xE9; public static final byte EPC_FREEZER_COMPARTMENT_TEMPERATURE_LEVEL_SETTING = (byte)0xEA; public static final byte EPC_ICE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING = (byte)0xEB; public static final byte EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING = (byte)0xEC; public static final byte EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING = (byte)0xED; public static final byte EPC_MEASURED_REFRIGERATOR_COMPARTMENT_TEMPERATURE = (byte)0xD1; public static final byte EPC_MEASURED_FREEZER_COMPARTMENT_TEMPERATURE = (byte)0xD2; public static final byte EPC_MEASURED_SUBZERO_FRESH_COMPARTMENT_TEMPERATURE = (byte)0xD3; public static final byte EPC_MEASURED_VEGETABLE_COMPARTMENT_TEMPERATURE = (byte)0xD4; public static final byte EPC_MEASURED_MULTI_REFRIGERATIN_G_MODE_COMPARTMENT_TEMPERATURE = (byte)0xD5; public static final byte EPC_COMPRESSOR_ROTATION_SPEED = (byte)0xD8; public static final byte EPC_MEASURED_ELECTRIC_CURRENT_CONSUMPTION = (byte)0xDA; public static final byte EPC_RATED_POWER_CONSUMPTION = (byte)0xDC; public static final byte EPC_QUICK_FREEZE_FUNCTION_SETTING = (byte)0xA0; public static final byte EPC_QUICK_REFRIGERATION_FUNCTION_SETTING = (byte)0xA1; public static final byte EPC_ICEMAKER_SETTING = (byte)0xA4; public static final byte EPC_ICEMAKER_OPERATION_STATUS = (byte)0xA5; public static final byte EPC_ICEMAKER_TANK_STATUS = (byte)0xA6; public static final byte EPC_REFRIGERATOR_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING = (byte)0xA8; public static final byte EPC_VEGETABLE_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING = (byte)0xA9; public static final byte EPC_DEODORIZATION_FUNCTION_SETTING = (byte)0xAD; @Override protected void setupPropertyMaps() { super.setupPropertyMaps(); addStatusChangeAnnouncementProperty(EPC_OPERATION_STATUS); removeSetProperty(EPC_OPERATION_STATUS); addGetProperty(EPC_OPERATION_STATUS); addGetProperty(EPC_DOOR_OPEN_CLOSE_STATUS); addStatusChangeAnnouncementProperty(EPC_DOOR_OPEN_WARNING); } @Override public void initialize(EchoNode node) { super.initialize(node); Echo.EventListener listener = Echo.getEventListener(); if(listener != null) listener.onNewRefrigerator(this); } @Override public short getEchoClassCode() { return ECHO_CLASS_CODE; } /** * Property name : Operation status<br> * <br> * EPC : 0x80<br> * <br> * Contents of property :<br> * This property indicates the ON/OFF<br> * status.<br> * <br> * Value range (decimal notation) :<br> * ON=0x30, OFF=0x31<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 bytes<br> * <br> * Unit : �\<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - mandatory<br> * <br> * <b>Announcement at status change</b><br> */ protected boolean setOperationStatus(byte[] edt) {return false;} /** * Property name : Operation status<br> * <br> * EPC : 0x80<br> * <br> * Contents of property :<br> * This property indicates the ON/OFF<br> * status.<br> * <br> * Value range (decimal notation) :<br> * ON=0x30, OFF=0x31<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 bytes<br> * <br> * Unit : �\<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - mandatory<br> * <br> * <b>Announcement at status change</b><br> */ protected abstract byte[] getOperationStatus(); /** * Property name : Door open/close status<br> * <br> * EPC : 0xB0<br> * <br> * Contents of property :<br> * Door open/close status<br> * <br> * Value range (decimal notation) :<br> * Door open = 0x41, Door close = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - mandatory<br> */ protected abstract byte[] getDoorOpenCloseStatus(); /** * Property name : Door open/close status<br> * <br> * EPC : 0xB0<br> * <br> * Contents of property :<br> * Door open/close status<br> * <br> * Value range (decimal notation) :<br> * Door open = 0x41, Door close = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - mandatory<br> */ protected boolean isValidDoorOpenCloseStatus(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Door open warning<br> * <br> * EPC : 0xB1<br> * <br> * Contents of property :<br> * Door open warning status<br> * <br> * Value range (decimal notation) :<br> * Door open warning found = 0x41<br> * Door open warning not found = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> * <br> * <b>Announcement at status change</b><br> */ protected byte[] getDoorOpenWarning() {return null;} /** * Property name : Door open warning<br> * <br> * EPC : 0xB1<br> * <br> * Contents of property :<br> * Door open warning status<br> * <br> * Value range (decimal notation) :<br> * Door open warning found = 0x41<br> * Door open warning not found = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> * <br> * <b>Announcement at status change</b><br> */ protected boolean isValidDoorOpenWarning(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Refrigerator compartment door status<br> * <br> * EPC : 0xB2<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the refrigerator<br> * compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getRefrigeratorCompartmentDoorStatus() {return null;} /** * Property name : Refrigerator compartment door status<br> * <br> * EPC : 0xB2<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the refrigerator<br> * compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidRefrigeratorCompartmentDoorStatus(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Freezer compartment door status<br> * <br> * EPC : 0xB3<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the freezer compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getFreezerCompartmentDoorStatus() {return null;} /** * Property name : Freezer compartment door status<br> * <br> * EPC : 0xB3<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the freezer compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidFreezerCompartmentDoorStatus(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Ice compartment door status<br> * <br> * EPC : 0xB4<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the ice compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getIceCompartmentDoorStatus() {return null;} /** * Property name : Ice compartment door status<br> * <br> * EPC : 0xB4<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the ice compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidIceCompartmentDoorStatus(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Vegetable compartment door status<br> * <br> * EPC : 0xB5<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the vegetable compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getVegetableCompartmentDoorStatus() {return null;} /** * Property name : Vegetable compartment door status<br> * <br> * EPC : 0xB5<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the vegetable compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidVegetableCompartmentDoorStatus(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Multi-refrigera- ting mode compartment door<br> * <br> * EPC : 0xB6<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the multi-refrigerating mode compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getMultiRefrigeraTingModeCompartmentDoor() {return null;} /** * Property name : Multi-refrigera- ting mode compartment door<br> * <br> * EPC : 0xB6<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the multi-refrigerating mode compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidMultiRefrigeraTingModeCompartmentDoor(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Maximum allowable temperature setting level<br> * <br> * EPC : 0xE0<br> * <br> * Contents of property :<br> * Used to acquire the maximum allowable temperature setting levels<br> * for the individual compartments of the refrigerator.<br> * <br> * Value range (decimal notation) :<br> * First byte: Refrigerator compartment<br> * Second byte: Freezer compartment<br> * Third byte:subzero-fresh compartment<br> * Fourth byte: Vegetable compartment<br> * Fifth byte: Multi-refrigerating mode compartment<br> * Sixth to eighth bytes: Reserved for future use.<br> * 0x01 to 0xFF (Level 1 to 255)<br> * 0x00 = no compartment<br> * <br> * Data type : unsigned char x 8<br> * <br> * Data size : 8 bytes<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getMaximumAllowableTemperatureSettingLevel() {return null;} /** * Property name : Maximum allowable temperature setting level<br> * <br> * EPC : 0xE0<br> * <br> * Contents of property :<br> * Used to acquire the maximum allowable temperature setting levels<br> * for the individual compartments of the refrigerator.<br> * <br> * Value range (decimal notation) :<br> * First byte: Refrigerator compartment<br> * Second byte: Freezer compartment<br> * Third byte:subzero-fresh compartment<br> * Fourth byte: Vegetable compartment<br> * Fifth byte: Multi-refrigerating mode compartment<br> * Sixth to eighth bytes: Reserved for future use.<br> * 0x01 to 0xFF (Level 1 to 255)<br> * 0x00 = no compartment<br> * <br> * Data type : unsigned char x 8<br> * <br> * Data size : 8 bytes<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidMaximumAllowableTemperatureSettingLevel(byte[] edt) { if(edt == null || !(edt.length == 8)) return false; return true; } /** * Property name : Refrigerator compartment temperature setting<br> * <br> * EPC : 0xE2<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setRefrigeratorCompartmentTemperatureSetting(byte[] edt) {return false;} /** * Property name : Refrigerator compartment temperature setting<br> * <br> * EPC : 0xE2<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getRefrigeratorCompartmentTemperatureSetting() {return null;} /** * Property name : Refrigerator compartment temperature setting<br> * <br> * EPC : 0xE2<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidRefrigeratorCompartmentTemperatureSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Freezer compartment temperature setting<br> * <br> * EPC : 0xE3<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setFreezerCompartmentTemperatureSetting(byte[] edt) {return false;} /** * Property name : Freezer compartment temperature setting<br> * <br> * EPC : 0xE3<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getFreezerCompartmentTemperatureSetting() {return null;} /** * Property name : Freezer compartment temperature setting<br> * <br> * EPC : 0xE3<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidFreezerCompartmentTemperatureSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Ice temperature setting<br> * <br> * EPC : 0xE4<br> * <br> * Contents of property :<br> * Used to specify the ice compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 bytes<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setIceTemperatureSetting(byte[] edt) {return false;} /** * Property name : Ice temperature setting<br> * <br> * EPC : 0xE4<br> * <br> * Contents of property :<br> * Used to specify the ice compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 bytes<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getIceTemperatureSetting() {return null;} /** * Property name : Ice temperature setting<br> * <br> * EPC : 0xE4<br> * <br> * Contents of property :<br> * Used to specify the ice compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 bytes<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidIceTemperatureSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Vegetable compartment temperature setting<br> * <br> * EPC : 0xE5<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setVegetableCompartmentTemperatureSetting(byte[] edt) {return false;} /** * Property name : Vegetable compartment temperature setting<br> * <br> * EPC : 0xE5<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getVegetableCompartmentTemperatureSetting() {return null;} /** * Property name : Vegetable compartment temperature setting<br> * <br> * EPC : 0xE5<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidVegetableCompartmentTemperatureSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Multi-refrigera- ting mode compartment temperature setting<br> * <br> * EPC : 0xE6<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setMultiRefrigeraTingModeCompartmentTemperatureSetting(byte[] edt) {return false;} /** * Property name : Multi-refrigera- ting mode compartment temperature setting<br> * <br> * EPC : 0xE6<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getMultiRefrigeraTingModeCompartmentTemperatureSetting() {return null;} /** * Property name : Multi-refrigera- ting mode compartment temperature setting<br> * <br> * EPC : 0xE6<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidMultiRefrigeraTingModeCompartmentTemperatureSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Refrigerator compartment temperature level setting<br> * <br> * EPC : 0xE9<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setRefrigeratorCompartmentTemperatureLevelSetting(byte[] edt) {return false;} /** * Property name : Refrigerator compartment temperature level setting<br> * <br> * EPC : 0xE9<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getRefrigeratorCompartmentTemperatureLevelSetting() {return null;} /** * Property name : Refrigerator compartment temperature level setting<br> * <br> * EPC : 0xE9<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidRefrigeratorCompartmentTemperatureLevelSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Freezer compartment temperature level setting<br> * <br> * EPC : 0xEA<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setFreezerCompartmentTemperatureLevelSetting(byte[] edt) {return false;} /** * Property name : Freezer compartment temperature level setting<br> * <br> * EPC : 0xEA<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getFreezerCompartmentTemperatureLevelSetting() {return null;} /** * Property name : Freezer compartment temperature level setting<br> * <br> * EPC : 0xEA<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidFreezerCompartmentTemperatureLevelSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : ice compartment temperature level setting<br> * <br> * EPC : 0xEB<br> * <br> * Contents of property :<br> * Used to specify ice compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setIceCompartmentTemperatureLevelSetting(byte[] edt) {return false;} /** * Property name : ice compartment temperature level setting<br> * <br> * EPC : 0xEB<br> * <br> * Contents of property :<br> * Used to specify ice compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getIceCompartmentTemperatureLevelSetting() {return null;} /** * Property name : ice compartment temperature level setting<br> * <br> * EPC : 0xEB<br> * <br> * Contents of property :<br> * Used to specify ice compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidIceCompartmentTemperatureLevelSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Vegetable compartment temperature level setting<br> * <br> * EPC : 0xEC<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setVegetableCompartmentTemperatureLevelSetting(byte[] edt) {return false;} /** * Property name : Vegetable compartment temperature level setting<br> * <br> * EPC : 0xEC<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getVegetableCompartmentTemperatureLevelSetting() {return null;} /** * Property name : Vegetable compartment temperature level setting<br> * <br> * EPC : 0xEC<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidVegetableCompartmentTemperatureLevelSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Multi-refrigera- ting mode compartment temperature level setting<br> * <br> * EPC : 0xED<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setMultiRefrigeraTingModeCompartmentTemperatureLevelSetting(byte[] edt) {return false;} /** * Property name : Multi-refrigera- ting mode compartment temperature level setting<br> * <br> * EPC : 0xED<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getMultiRefrigeraTingModeCompartmentTemperatureLevelSetting() {return null;} /** * Property name : Multi-refrigera- ting mode compartment temperature level setting<br> * <br> * EPC : 0xED<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidMultiRefrigeraTingModeCompartmentTemperatureLevelSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Measured refrigerator compartment temperature<br> * <br> * EPC : 0xD1<br> * <br> * Contents of property :<br> * Used to acquire the measured refrigerator compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getMeasuredRefrigeratorCompartmentTemperature() {return null;} /** * Property name : Measured refrigerator compartment temperature<br> * <br> * EPC : 0xD1<br> * <br> * Contents of property :<br> * Used to acquire the measured refrigerator compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidMeasuredRefrigeratorCompartmentTemperature(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Measured freezer compartment temperature<br> * <br> * EPC : 0xD2<br> * <br> * Contents of property :<br> * Used to acquire the measured freezer compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getMeasuredFreezerCompartmentTemperature() {return null;} /** * Property name : Measured freezer compartment temperature<br> * <br> * EPC : 0xD2<br> * <br> * Contents of property :<br> * Used to acquire the measured freezer compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidMeasuredFreezerCompartmentTemperature(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Measured subzero-fresh compartment temperature<br> * <br> * EPC : 0xD3<br> * <br> * Contents of property :<br> * Used to acquire the measured meat and fish compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getMeasuredSubzeroFreshCompartmentTemperature() {return null;} /** * Property name : Measured subzero-fresh compartment temperature<br> * <br> * EPC : 0xD3<br> * <br> * Contents of property :<br> * Used to acquire the measured meat and fish compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidMeasuredSubzeroFreshCompartmentTemperature(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Measured vegetable compartment temperature<br> * <br> * EPC : 0xD4<br> * <br> * Contents of property :<br> * Used to acquire the measured vegetable compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getMeasuredVegetableCompartmentTemperature() {return null;} /** * Property name : Measured vegetable compartment temperature<br> * <br> * EPC : 0xD4<br> * <br> * Contents of property :<br> * Used to acquire the measured vegetable compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidMeasuredVegetableCompartmentTemperature(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Measured multi-refrigeratin g mode compartment temperature<br> * <br> * EPC : 0xD5<br> * <br> * Contents of property :<br> * Used to acquire the measured<br> * multi-refrigerating mode compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getMeasuredMultiRefrigeratinGModeCompartmentTemperature() {return null;} /** * Property name : Measured multi-refrigeratin g mode compartment temperature<br> * <br> * EPC : 0xD5<br> * <br> * Contents of property :<br> * Used to acquire the measured<br> * multi-refrigerating mode compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidMeasuredMultiRefrigeratinGModeCompartmentTemperature(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Compressor rotation speed<br> * <br> * EPC : 0xD8<br> * <br> * Contents of property :<br> * Used to acquire the rotation speed of the compressor. The rotation speed is expressed in terms of a level.<br> * <br> * Value range (decimal notation) :<br> * First byte: Maximum rotation speed L (0x01 to 0xFF (1 to 255))<br> * Second byte: Rotation speed of the actual compressor:<br> * 0x00 to L (zero speed to highest speed)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getCompressorRotationSpeed() {return null;} /** * Property name : Compressor rotation speed<br> * <br> * EPC : 0xD8<br> * <br> * Contents of property :<br> * Used to acquire the rotation speed of the compressor. The rotation speed is expressed in terms of a level.<br> * <br> * Value range (decimal notation) :<br> * First byte: Maximum rotation speed L (0x01 to 0xFF (1 to 255))<br> * Second byte: Rotation speed of the actual compressor:<br> * 0x00 to L (zero speed to highest speed)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidCompressorRotationSpeed(byte[] edt) { if(edt == null || !(edt.length == 2)) return false; return true; } /** * Property name : Measured electric current consumption<br> * <br> * EPC : 0xDA<br> * <br> * Contents of property :<br> * Used to acquire the measured electric current consumption.<br> * <br> * Value range (decimal notation) :<br> * 0x0000 to 0xFFFD (0 to 6553.3A)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : 0.1A<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getMeasuredElectricCurrentConsumption() {return null;} /** * Property name : Measured electric current consumption<br> * <br> * EPC : 0xDA<br> * <br> * Contents of property :<br> * Used to acquire the measured electric current consumption.<br> * <br> * Value range (decimal notation) :<br> * 0x0000 to 0xFFFD (0 to 6553.3A)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : 0.1A<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidMeasuredElectricCurrentConsumption(byte[] edt) { if(edt == null || !(edt.length == 2)) return false; return true; } /** * Property name : Rated power consumption<br> * <br> * EPC : 0xDC<br> * <br> * Contents of property :<br> * Used to acquire the rated power consumption.<br> * <br> * Value range (decimal notation) :<br> * 0x0000 to 0xFFFD (0 to 65533W)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : W<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getRatedPowerConsumption() {return null;} /** * Property name : Rated power consumption<br> * <br> * EPC : 0xDC<br> * <br> * Contents of property :<br> * Used to acquire the rated power consumption.<br> * <br> * Value range (decimal notation) :<br> * 0x0000 to 0xFFFD (0 to 65533W)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : W<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidRatedPowerConsumption(byte[] edt) { if(edt == null || !(edt.length == 2)) return false; return true; } /** * Property name : Quick freeze function setting<br> * <br> * EPC : 0xA0<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gQuick freeze�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick freeze�h mode: 0x42 �gStandby for fast freezing�h mode:<br> * 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setQuickFreezeFunctionSetting(byte[] edt) {return false;} /** * Property name : Quick freeze function setting<br> * <br> * EPC : 0xA0<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gQuick freeze�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick freeze�h mode: 0x42 �gStandby for fast freezing�h mode:<br> * 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getQuickFreezeFunctionSetting() {return null;} /** * Property name : Quick freeze function setting<br> * <br> * EPC : 0xA0<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gQuick freeze�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick freeze�h mode: 0x42 �gStandby for fast freezing�h mode:<br> * 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidQuickFreezeFunctionSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Quick refrigeration function setting<br> * <br> * EPC : 0xA1<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gquick refrigeration�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick refrigeration�h mode: 0x42 �gStandby for quick refrigeration�h<br> * mode: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setQuickRefrigerationFunctionSetting(byte[] edt) {return false;} /** * Property name : Quick refrigeration function setting<br> * <br> * EPC : 0xA1<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gquick refrigeration�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick refrigeration�h mode: 0x42 �gStandby for quick refrigeration�h<br> * mode: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getQuickRefrigerationFunctionSetting() {return null;} /** * Property name : Quick refrigeration function setting<br> * <br> * EPC : 0xA1<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gquick refrigeration�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick refrigeration�h mode: 0x42 �gStandby for quick refrigeration�h<br> * mode: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidQuickRefrigerationFunctionSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Icemaker setting<br> * <br> * EPC : 0xA4<br> * <br> * Contents of property :<br> * Used to specify whether or not to enable the automatic icemaker of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gEnable icemaker�h option: 0x41 �gDisable icemaker�h option: 0x42 �gTemporarily disable icemaker�h<br> * option: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setIcemakerSetting(byte[] edt) {return false;} /** * Property name : Icemaker setting<br> * <br> * EPC : 0xA4<br> * <br> * Contents of property :<br> * Used to specify whether or not to enable the automatic icemaker of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gEnable icemaker�h option: 0x41 �gDisable icemaker�h option: 0x42 �gTemporarily disable icemaker�h<br> * option: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getIcemakerSetting() {return null;} /** * Property name : Icemaker setting<br> * <br> * EPC : 0xA4<br> * <br> * Contents of property :<br> * Used to specify whether or not to enable the automatic icemaker of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gEnable icemaker�h option: 0x41 �gDisable icemaker�h option: 0x42 �gTemporarily disable icemaker�h<br> * option: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidIcemakerSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Icemaker operation status<br> * <br> * EPC : 0xA5<br> * <br> * Contents of property :<br> * Used to acquire the status of the automatic icemaker of the refrigerator.<br> * <br> * Value range (decimal notation) :<br> * �gIce-making in progress�h state: 0x41<br> * �gIce-making stopped�h state: 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getIcemakerOperationStatus() {return null;} /** * Property name : Icemaker operation status<br> * <br> * EPC : 0xA5<br> * <br> * Contents of property :<br> * Used to acquire the status of the automatic icemaker of the refrigerator.<br> * <br> * Value range (decimal notation) :<br> * �gIce-making in progress�h state: 0x41<br> * �gIce-making stopped�h state: 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidIcemakerOperationStatus(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Icemaker tank status<br> * <br> * EPC : 0xA6<br> * <br> * Contents of property :<br> * Used to acquire the status of the tank of the automatic icemaker of the refrigerator in terms of whether it contains water or not.<br> * <br> * Value range (decimal notation) :<br> * Icemaker tank contains water: 0x41<br> * There is no water left in the icemaker tank or the icemaker tank has not been positioned correctly in the refrigerator:<br> * 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected byte[] getIcemakerTankStatus() {return null;} /** * Property name : Icemaker tank status<br> * <br> * EPC : 0xA6<br> * <br> * Contents of property :<br> * Used to acquire the status of the tank of the automatic icemaker of the refrigerator in terms of whether it contains water or not.<br> * <br> * Value range (decimal notation) :<br> * Icemaker tank contains water: 0x41<br> * There is no water left in the icemaker tank or the icemaker tank has not been positioned correctly in the refrigerator:<br> * 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected boolean isValidIcemakerTankStatus(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Refrigerator compartment humidification function setting<br> * <br> * EPC : 0xA8<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the refrigerator compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setRefrigeratorCompartmentHumidificationFunctionSetting(byte[] edt) {return false;} /** * Property name : Refrigerator compartment humidification function setting<br> * <br> * EPC : 0xA8<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the refrigerator compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getRefrigeratorCompartmentHumidificationFunctionSetting() {return null;} /** * Property name : Refrigerator compartment humidification function setting<br> * <br> * EPC : 0xA8<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the refrigerator compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidRefrigeratorCompartmentHumidificationFunctionSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Vegetable compartment humidification function setting<br> * <br> * EPC : 0xA9<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the vegetable compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setVegetableCompartmentHumidificationFunctionSetting(byte[] edt) {return false;} /** * Property name : Vegetable compartment humidification function setting<br> * <br> * EPC : 0xA9<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the vegetable compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getVegetableCompartmentHumidificationFunctionSetting() {return null;} /** * Property name : Vegetable compartment humidification function setting<br> * <br> * EPC : 0xA9<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the vegetable compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidVegetableCompartmentHumidificationFunctionSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } /** * Property name : Deodorization function setting<br> * <br> * EPC : 0xAD<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the deodorization function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean setDeodorizationFunctionSetting(byte[] edt) {return false;} /** * Property name : Deodorization function setting<br> * <br> * EPC : 0xAD<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the deodorization function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected byte[] getDeodorizationFunctionSetting() {return null;} /** * Property name : Deodorization function setting<br> * <br> * EPC : 0xAD<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the deodorization function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected boolean isValidDeodorizationFunctionSetting(byte[] edt) { if(edt == null || !(edt.length == 1)) return false; return true; } @Override protected synchronized boolean setProperty(EchoProperty property) { boolean success = super.setProperty(property); if(success) return success; switch(property.epc) { case EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_SETTING : return setRefrigeratorCompartmentTemperatureSetting(property.edt); case EPC_FREEZER_COMPARTMENT_TEMPERATURE_SETTING : return setFreezerCompartmentTemperatureSetting(property.edt); case EPC_ICE_TEMPERATURE_SETTING : return setIceTemperatureSetting(property.edt); case EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_SETTING : return setVegetableCompartmentTemperatureSetting(property.edt); case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_SETTING : return setMultiRefrigeraTingModeCompartmentTemperatureSetting(property.edt); case EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return setRefrigeratorCompartmentTemperatureLevelSetting(property.edt); case EPC_FREEZER_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return setFreezerCompartmentTemperatureLevelSetting(property.edt); case EPC_ICE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return setIceCompartmentTemperatureLevelSetting(property.edt); case EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return setVegetableCompartmentTemperatureLevelSetting(property.edt); case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return setMultiRefrigeraTingModeCompartmentTemperatureLevelSetting(property.edt); case EPC_QUICK_FREEZE_FUNCTION_SETTING : return setQuickFreezeFunctionSetting(property.edt); case EPC_QUICK_REFRIGERATION_FUNCTION_SETTING : return setQuickRefrigerationFunctionSetting(property.edt); case EPC_ICEMAKER_SETTING : return setIcemakerSetting(property.edt); case EPC_REFRIGERATOR_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING : return setRefrigeratorCompartmentHumidificationFunctionSetting(property.edt); case EPC_VEGETABLE_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING : return setVegetableCompartmentHumidificationFunctionSetting(property.edt); case EPC_DEODORIZATION_FUNCTION_SETTING : return setDeodorizationFunctionSetting(property.edt); default : return false; } } @Override protected synchronized byte[] getProperty(byte epc) { byte[] edt = super.getProperty(epc); if(edt != null) return edt; switch(epc) { case EPC_DOOR_OPEN_CLOSE_STATUS : return getDoorOpenCloseStatus(); case EPC_DOOR_OPEN_WARNING : return getDoorOpenWarning(); case EPC_REFRIGERATOR_COMPARTMENT_DOOR_STATUS : return getRefrigeratorCompartmentDoorStatus(); case EPC_FREEZER_COMPARTMENT_DOOR_STATUS : return getFreezerCompartmentDoorStatus(); case EPC_ICE_COMPARTMENT_DOOR_STATUS : return getIceCompartmentDoorStatus(); case EPC_VEGETABLE_COMPARTMENT_DOOR_STATUS : return getVegetableCompartmentDoorStatus(); case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_DOOR : return getMultiRefrigeraTingModeCompartmentDoor(); case EPC_MAXIMUM_ALLOWABLE_TEMPERATURE_SETTING_LEVEL : return getMaximumAllowableTemperatureSettingLevel(); case EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_SETTING : return getRefrigeratorCompartmentTemperatureSetting(); case EPC_FREEZER_COMPARTMENT_TEMPERATURE_SETTING : return getFreezerCompartmentTemperatureSetting(); case EPC_ICE_TEMPERATURE_SETTING : return getIceTemperatureSetting(); case EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_SETTING : return getVegetableCompartmentTemperatureSetting(); case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_SETTING : return getMultiRefrigeraTingModeCompartmentTemperatureSetting(); case EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return getRefrigeratorCompartmentTemperatureLevelSetting(); case EPC_FREEZER_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return getFreezerCompartmentTemperatureLevelSetting(); case EPC_ICE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return getIceCompartmentTemperatureLevelSetting(); case EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return getVegetableCompartmentTemperatureLevelSetting(); case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return getMultiRefrigeraTingModeCompartmentTemperatureLevelSetting(); case EPC_MEASURED_REFRIGERATOR_COMPARTMENT_TEMPERATURE : return getMeasuredRefrigeratorCompartmentTemperature(); case EPC_MEASURED_FREEZER_COMPARTMENT_TEMPERATURE : return getMeasuredFreezerCompartmentTemperature(); case EPC_MEASURED_SUBZERO_FRESH_COMPARTMENT_TEMPERATURE : return getMeasuredSubzeroFreshCompartmentTemperature(); case EPC_MEASURED_VEGETABLE_COMPARTMENT_TEMPERATURE : return getMeasuredVegetableCompartmentTemperature(); case EPC_MEASURED_MULTI_REFRIGERATIN_G_MODE_COMPARTMENT_TEMPERATURE : return getMeasuredMultiRefrigeratinGModeCompartmentTemperature(); case EPC_COMPRESSOR_ROTATION_SPEED : return getCompressorRotationSpeed(); case EPC_MEASURED_ELECTRIC_CURRENT_CONSUMPTION : return getMeasuredElectricCurrentConsumption(); case EPC_RATED_POWER_CONSUMPTION : return getRatedPowerConsumption(); case EPC_QUICK_FREEZE_FUNCTION_SETTING : return getQuickFreezeFunctionSetting(); case EPC_QUICK_REFRIGERATION_FUNCTION_SETTING : return getQuickRefrigerationFunctionSetting(); case EPC_ICEMAKER_SETTING : return getIcemakerSetting(); case EPC_ICEMAKER_OPERATION_STATUS : return getIcemakerOperationStatus(); case EPC_ICEMAKER_TANK_STATUS : return getIcemakerTankStatus(); case EPC_REFRIGERATOR_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING : return getRefrigeratorCompartmentHumidificationFunctionSetting(); case EPC_VEGETABLE_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING : return getVegetableCompartmentHumidificationFunctionSetting(); case EPC_DEODORIZATION_FUNCTION_SETTING : return getDeodorizationFunctionSetting(); default : return null; } } @Override protected synchronized boolean isValidProperty(EchoProperty property) { boolean valid = super.isValidProperty(property); if(valid) return valid; switch(property.epc) { case EPC_DOOR_OPEN_CLOSE_STATUS : return isValidDoorOpenCloseStatus(property.edt); case EPC_DOOR_OPEN_WARNING : return isValidDoorOpenWarning(property.edt); case EPC_REFRIGERATOR_COMPARTMENT_DOOR_STATUS : return isValidRefrigeratorCompartmentDoorStatus(property.edt); case EPC_FREEZER_COMPARTMENT_DOOR_STATUS : return isValidFreezerCompartmentDoorStatus(property.edt); case EPC_ICE_COMPARTMENT_DOOR_STATUS : return isValidIceCompartmentDoorStatus(property.edt); case EPC_VEGETABLE_COMPARTMENT_DOOR_STATUS : return isValidVegetableCompartmentDoorStatus(property.edt); case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_DOOR : return isValidMultiRefrigeraTingModeCompartmentDoor(property.edt); case EPC_MAXIMUM_ALLOWABLE_TEMPERATURE_SETTING_LEVEL : return isValidMaximumAllowableTemperatureSettingLevel(property.edt); case EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_SETTING : return isValidRefrigeratorCompartmentTemperatureSetting(property.edt); case EPC_FREEZER_COMPARTMENT_TEMPERATURE_SETTING : return isValidFreezerCompartmentTemperatureSetting(property.edt); case EPC_ICE_TEMPERATURE_SETTING : return isValidIceTemperatureSetting(property.edt); case EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_SETTING : return isValidVegetableCompartmentTemperatureSetting(property.edt); case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_SETTING : return isValidMultiRefrigeraTingModeCompartmentTemperatureSetting(property.edt); case EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return isValidRefrigeratorCompartmentTemperatureLevelSetting(property.edt); case EPC_FREEZER_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return isValidFreezerCompartmentTemperatureLevelSetting(property.edt); case EPC_ICE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return isValidIceCompartmentTemperatureLevelSetting(property.edt); case EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return isValidVegetableCompartmentTemperatureLevelSetting(property.edt); case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : return isValidMultiRefrigeraTingModeCompartmentTemperatureLevelSetting(property.edt); case EPC_MEASURED_REFRIGERATOR_COMPARTMENT_TEMPERATURE : return isValidMeasuredRefrigeratorCompartmentTemperature(property.edt); case EPC_MEASURED_FREEZER_COMPARTMENT_TEMPERATURE : return isValidMeasuredFreezerCompartmentTemperature(property.edt); case EPC_MEASURED_SUBZERO_FRESH_COMPARTMENT_TEMPERATURE : return isValidMeasuredSubzeroFreshCompartmentTemperature(property.edt); case EPC_MEASURED_VEGETABLE_COMPARTMENT_TEMPERATURE : return isValidMeasuredVegetableCompartmentTemperature(property.edt); case EPC_MEASURED_MULTI_REFRIGERATIN_G_MODE_COMPARTMENT_TEMPERATURE : return isValidMeasuredMultiRefrigeratinGModeCompartmentTemperature(property.edt); case EPC_COMPRESSOR_ROTATION_SPEED : return isValidCompressorRotationSpeed(property.edt); case EPC_MEASURED_ELECTRIC_CURRENT_CONSUMPTION : return isValidMeasuredElectricCurrentConsumption(property.edt); case EPC_RATED_POWER_CONSUMPTION : return isValidRatedPowerConsumption(property.edt); case EPC_QUICK_FREEZE_FUNCTION_SETTING : return isValidQuickFreezeFunctionSetting(property.edt); case EPC_QUICK_REFRIGERATION_FUNCTION_SETTING : return isValidQuickRefrigerationFunctionSetting(property.edt); case EPC_ICEMAKER_SETTING : return isValidIcemakerSetting(property.edt); case EPC_ICEMAKER_OPERATION_STATUS : return isValidIcemakerOperationStatus(property.edt); case EPC_ICEMAKER_TANK_STATUS : return isValidIcemakerTankStatus(property.edt); case EPC_REFRIGERATOR_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING : return isValidRefrigeratorCompartmentHumidificationFunctionSetting(property.edt); case EPC_VEGETABLE_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING : return isValidVegetableCompartmentHumidificationFunctionSetting(property.edt); case EPC_DEODORIZATION_FUNCTION_SETTING : return isValidDeodorizationFunctionSetting(property.edt); default : return false; } } @Override public Setter set() { return new Setter(this, true, false); } @Override public Setter set(boolean responseRequired) { return new Setter(this, responseRequired, false); } @Override public Getter get() { return new Getter(this, false); } @Override public Informer inform() { return new Informer(this, !isProxy()); } @Override protected Informer inform(boolean multicast) { return new Informer(this, multicast); } public static class Receiver extends DeviceObject.Receiver { @Override protected boolean onSetProperty(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) { boolean ret = super.onSetProperty(eoj, tid, esv, property, success); if(ret) return true; switch(property.epc) { case EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_SETTING : onSetRefrigeratorCompartmentTemperatureSetting(eoj, tid, esv, property, success); return true; case EPC_FREEZER_COMPARTMENT_TEMPERATURE_SETTING : onSetFreezerCompartmentTemperatureSetting(eoj, tid, esv, property, success); return true; case EPC_ICE_TEMPERATURE_SETTING : onSetIceTemperatureSetting(eoj, tid, esv, property, success); return true; case EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_SETTING : onSetVegetableCompartmentTemperatureSetting(eoj, tid, esv, property, success); return true; case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_SETTING : onSetMultiRefrigeraTingModeCompartmentTemperatureSetting(eoj, tid, esv, property, success); return true; case EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : onSetRefrigeratorCompartmentTemperatureLevelSetting(eoj, tid, esv, property, success); return true; case EPC_FREEZER_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : onSetFreezerCompartmentTemperatureLevelSetting(eoj, tid, esv, property, success); return true; case EPC_ICE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : onSetIceCompartmentTemperatureLevelSetting(eoj, tid, esv, property, success); return true; case EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : onSetVegetableCompartmentTemperatureLevelSetting(eoj, tid, esv, property, success); return true; case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : onSetMultiRefrigeraTingModeCompartmentTemperatureLevelSetting(eoj, tid, esv, property, success); return true; case EPC_QUICK_FREEZE_FUNCTION_SETTING : onSetQuickFreezeFunctionSetting(eoj, tid, esv, property, success); return true; case EPC_QUICK_REFRIGERATION_FUNCTION_SETTING : onSetQuickRefrigerationFunctionSetting(eoj, tid, esv, property, success); return true; case EPC_ICEMAKER_SETTING : onSetIcemakerSetting(eoj, tid, esv, property, success); return true; case EPC_REFRIGERATOR_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING : onSetRefrigeratorCompartmentHumidificationFunctionSetting(eoj, tid, esv, property, success); return true; case EPC_VEGETABLE_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING : onSetVegetableCompartmentHumidificationFunctionSetting(eoj, tid, esv, property, success); return true; case EPC_DEODORIZATION_FUNCTION_SETTING : onSetDeodorizationFunctionSetting(eoj, tid, esv, property, success); return true; default : return false; } } @Override protected boolean onGetProperty(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) { boolean ret = super.onGetProperty(eoj, tid, esv, property, success); if(ret) return true; switch(property.epc) { case EPC_DOOR_OPEN_CLOSE_STATUS : onGetDoorOpenCloseStatus(eoj, tid, esv, property, success); return true; case EPC_DOOR_OPEN_WARNING : onGetDoorOpenWarning(eoj, tid, esv, property, success); return true; case EPC_REFRIGERATOR_COMPARTMENT_DOOR_STATUS : onGetRefrigeratorCompartmentDoorStatus(eoj, tid, esv, property, success); return true; case EPC_FREEZER_COMPARTMENT_DOOR_STATUS : onGetFreezerCompartmentDoorStatus(eoj, tid, esv, property, success); return true; case EPC_ICE_COMPARTMENT_DOOR_STATUS : onGetIceCompartmentDoorStatus(eoj, tid, esv, property, success); return true; case EPC_VEGETABLE_COMPARTMENT_DOOR_STATUS : onGetVegetableCompartmentDoorStatus(eoj, tid, esv, property, success); return true; case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_DOOR : onGetMultiRefrigeraTingModeCompartmentDoor(eoj, tid, esv, property, success); return true; case EPC_MAXIMUM_ALLOWABLE_TEMPERATURE_SETTING_LEVEL : onGetMaximumAllowableTemperatureSettingLevel(eoj, tid, esv, property, success); return true; case EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_SETTING : onGetRefrigeratorCompartmentTemperatureSetting(eoj, tid, esv, property, success); return true; case EPC_FREEZER_COMPARTMENT_TEMPERATURE_SETTING : onGetFreezerCompartmentTemperatureSetting(eoj, tid, esv, property, success); return true; case EPC_ICE_TEMPERATURE_SETTING : onGetIceTemperatureSetting(eoj, tid, esv, property, success); return true; case EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_SETTING : onGetVegetableCompartmentTemperatureSetting(eoj, tid, esv, property, success); return true; case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_SETTING : onGetMultiRefrigeraTingModeCompartmentTemperatureSetting(eoj, tid, esv, property, success); return true; case EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : onGetRefrigeratorCompartmentTemperatureLevelSetting(eoj, tid, esv, property, success); return true; case EPC_FREEZER_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : onGetFreezerCompartmentTemperatureLevelSetting(eoj, tid, esv, property, success); return true; case EPC_ICE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : onGetIceCompartmentTemperatureLevelSetting(eoj, tid, esv, property, success); return true; case EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : onGetVegetableCompartmentTemperatureLevelSetting(eoj, tid, esv, property, success); return true; case EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING : onGetMultiRefrigeraTingModeCompartmentTemperatureLevelSetting(eoj, tid, esv, property, success); return true; case EPC_MEASURED_REFRIGERATOR_COMPARTMENT_TEMPERATURE : onGetMeasuredRefrigeratorCompartmentTemperature(eoj, tid, esv, property, success); return true; case EPC_MEASURED_FREEZER_COMPARTMENT_TEMPERATURE : onGetMeasuredFreezerCompartmentTemperature(eoj, tid, esv, property, success); return true; case EPC_MEASURED_SUBZERO_FRESH_COMPARTMENT_TEMPERATURE : onGetMeasuredSubzeroFreshCompartmentTemperature(eoj, tid, esv, property, success); return true; case EPC_MEASURED_VEGETABLE_COMPARTMENT_TEMPERATURE : onGetMeasuredVegetableCompartmentTemperature(eoj, tid, esv, property, success); return true; case EPC_MEASURED_MULTI_REFRIGERATIN_G_MODE_COMPARTMENT_TEMPERATURE : onGetMeasuredMultiRefrigeratinGModeCompartmentTemperature(eoj, tid, esv, property, success); return true; case EPC_COMPRESSOR_ROTATION_SPEED : onGetCompressorRotationSpeed(eoj, tid, esv, property, success); return true; case EPC_MEASURED_ELECTRIC_CURRENT_CONSUMPTION : onGetMeasuredElectricCurrentConsumption(eoj, tid, esv, property, success); return true; case EPC_RATED_POWER_CONSUMPTION : onGetRatedPowerConsumption(eoj, tid, esv, property, success); return true; case EPC_QUICK_FREEZE_FUNCTION_SETTING : onGetQuickFreezeFunctionSetting(eoj, tid, esv, property, success); return true; case EPC_QUICK_REFRIGERATION_FUNCTION_SETTING : onGetQuickRefrigerationFunctionSetting(eoj, tid, esv, property, success); return true; case EPC_ICEMAKER_SETTING : onGetIcemakerSetting(eoj, tid, esv, property, success); return true; case EPC_ICEMAKER_OPERATION_STATUS : onGetIcemakerOperationStatus(eoj, tid, esv, property, success); return true; case EPC_ICEMAKER_TANK_STATUS : onGetIcemakerTankStatus(eoj, tid, esv, property, success); return true; case EPC_REFRIGERATOR_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING : onGetRefrigeratorCompartmentHumidificationFunctionSetting(eoj, tid, esv, property, success); return true; case EPC_VEGETABLE_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING : onGetVegetableCompartmentHumidificationFunctionSetting(eoj, tid, esv, property, success); return true; case EPC_DEODORIZATION_FUNCTION_SETTING : onGetDeodorizationFunctionSetting(eoj, tid, esv, property, success); return true; default : return false; } } /** * Property name : Door open/close status<br> * <br> * EPC : 0xB0<br> * <br> * Contents of property :<br> * Door open/close status<br> * <br> * Value range (decimal notation) :<br> * Door open = 0x41, Door close = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - mandatory<br> */ protected void onGetDoorOpenCloseStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Door open warning<br> * <br> * EPC : 0xB1<br> * <br> * Contents of property :<br> * Door open warning status<br> * <br> * Value range (decimal notation) :<br> * Door open warning found = 0x41<br> * Door open warning not found = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> * <br> * <b>Announcement at status change</b><br> */ protected void onGetDoorOpenWarning(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Refrigerator compartment door status<br> * <br> * EPC : 0xB2<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the refrigerator<br> * compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetRefrigeratorCompartmentDoorStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Freezer compartment door status<br> * <br> * EPC : 0xB3<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the freezer compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetFreezerCompartmentDoorStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Ice compartment door status<br> * <br> * EPC : 0xB4<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the ice compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetIceCompartmentDoorStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Vegetable compartment door status<br> * <br> * EPC : 0xB5<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the vegetable compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetVegetableCompartmentDoorStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Multi-refrigera- ting mode compartment door<br> * <br> * EPC : 0xB6<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the multi-refrigerating mode compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetMultiRefrigeraTingModeCompartmentDoor(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Maximum allowable temperature setting level<br> * <br> * EPC : 0xE0<br> * <br> * Contents of property :<br> * Used to acquire the maximum allowable temperature setting levels<br> * for the individual compartments of the refrigerator.<br> * <br> * Value range (decimal notation) :<br> * First byte: Refrigerator compartment<br> * Second byte: Freezer compartment<br> * Third byte:subzero-fresh compartment<br> * Fourth byte: Vegetable compartment<br> * Fifth byte: Multi-refrigerating mode compartment<br> * Sixth to eighth bytes: Reserved for future use.<br> * 0x01 to 0xFF (Level 1 to 255)<br> * 0x00 = no compartment<br> * <br> * Data type : unsigned char x 8<br> * <br> * Data size : 8 bytes<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetMaximumAllowableTemperatureSettingLevel(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Refrigerator compartment temperature setting<br> * <br> * EPC : 0xE2<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetRefrigeratorCompartmentTemperatureSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Refrigerator compartment temperature setting<br> * <br> * EPC : 0xE2<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetRefrigeratorCompartmentTemperatureSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Freezer compartment temperature setting<br> * <br> * EPC : 0xE3<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetFreezerCompartmentTemperatureSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Freezer compartment temperature setting<br> * <br> * EPC : 0xE3<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetFreezerCompartmentTemperatureSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Ice temperature setting<br> * <br> * EPC : 0xE4<br> * <br> * Contents of property :<br> * Used to specify the ice compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 bytes<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetIceTemperatureSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Ice temperature setting<br> * <br> * EPC : 0xE4<br> * <br> * Contents of property :<br> * Used to specify the ice compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 bytes<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetIceTemperatureSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Vegetable compartment temperature setting<br> * <br> * EPC : 0xE5<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetVegetableCompartmentTemperatureSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Vegetable compartment temperature setting<br> * <br> * EPC : 0xE5<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetVegetableCompartmentTemperatureSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Multi-refrigera- ting mode compartment temperature setting<br> * <br> * EPC : 0xE6<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetMultiRefrigeraTingModeCompartmentTemperatureSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Multi-refrigera- ting mode compartment temperature setting<br> * <br> * EPC : 0xE6<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetMultiRefrigeraTingModeCompartmentTemperatureSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Refrigerator compartment temperature level setting<br> * <br> * EPC : 0xE9<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetRefrigeratorCompartmentTemperatureLevelSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Refrigerator compartment temperature level setting<br> * <br> * EPC : 0xE9<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetRefrigeratorCompartmentTemperatureLevelSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Freezer compartment temperature level setting<br> * <br> * EPC : 0xEA<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetFreezerCompartmentTemperatureLevelSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Freezer compartment temperature level setting<br> * <br> * EPC : 0xEA<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetFreezerCompartmentTemperatureLevelSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : ice compartment temperature level setting<br> * <br> * EPC : 0xEB<br> * <br> * Contents of property :<br> * Used to specify ice compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetIceCompartmentTemperatureLevelSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : ice compartment temperature level setting<br> * <br> * EPC : 0xEB<br> * <br> * Contents of property :<br> * Used to specify ice compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetIceCompartmentTemperatureLevelSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Vegetable compartment temperature level setting<br> * <br> * EPC : 0xEC<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetVegetableCompartmentTemperatureLevelSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Vegetable compartment temperature level setting<br> * <br> * EPC : 0xEC<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetVegetableCompartmentTemperatureLevelSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Multi-refrigera- ting mode compartment temperature level setting<br> * <br> * EPC : 0xED<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetMultiRefrigeraTingModeCompartmentTemperatureLevelSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Multi-refrigera- ting mode compartment temperature level setting<br> * <br> * EPC : 0xED<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetMultiRefrigeraTingModeCompartmentTemperatureLevelSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Measured refrigerator compartment temperature<br> * <br> * EPC : 0xD1<br> * <br> * Contents of property :<br> * Used to acquire the measured refrigerator compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetMeasuredRefrigeratorCompartmentTemperature(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Measured freezer compartment temperature<br> * <br> * EPC : 0xD2<br> * <br> * Contents of property :<br> * Used to acquire the measured freezer compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetMeasuredFreezerCompartmentTemperature(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Measured subzero-fresh compartment temperature<br> * <br> * EPC : 0xD3<br> * <br> * Contents of property :<br> * Used to acquire the measured meat and fish compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetMeasuredSubzeroFreshCompartmentTemperature(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Measured vegetable compartment temperature<br> * <br> * EPC : 0xD4<br> * <br> * Contents of property :<br> * Used to acquire the measured vegetable compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetMeasuredVegetableCompartmentTemperature(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Measured multi-refrigeratin g mode compartment temperature<br> * <br> * EPC : 0xD5<br> * <br> * Contents of property :<br> * Used to acquire the measured<br> * multi-refrigerating mode compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetMeasuredMultiRefrigeratinGModeCompartmentTemperature(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Compressor rotation speed<br> * <br> * EPC : 0xD8<br> * <br> * Contents of property :<br> * Used to acquire the rotation speed of the compressor. The rotation speed is expressed in terms of a level.<br> * <br> * Value range (decimal notation) :<br> * First byte: Maximum rotation speed L (0x01 to 0xFF (1 to 255))<br> * Second byte: Rotation speed of the actual compressor:<br> * 0x00 to L (zero speed to highest speed)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetCompressorRotationSpeed(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Measured electric current consumption<br> * <br> * EPC : 0xDA<br> * <br> * Contents of property :<br> * Used to acquire the measured electric current consumption.<br> * <br> * Value range (decimal notation) :<br> * 0x0000 to 0xFFFD (0 to 6553.3A)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : 0.1A<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetMeasuredElectricCurrentConsumption(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Rated power consumption<br> * <br> * EPC : 0xDC<br> * <br> * Contents of property :<br> * Used to acquire the rated power consumption.<br> * <br> * Value range (decimal notation) :<br> * 0x0000 to 0xFFFD (0 to 65533W)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : W<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetRatedPowerConsumption(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Quick freeze function setting<br> * <br> * EPC : 0xA0<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gQuick freeze�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick freeze�h mode: 0x42 �gStandby for fast freezing�h mode:<br> * 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetQuickFreezeFunctionSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Quick freeze function setting<br> * <br> * EPC : 0xA0<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gQuick freeze�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick freeze�h mode: 0x42 �gStandby for fast freezing�h mode:<br> * 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetQuickFreezeFunctionSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Quick refrigeration function setting<br> * <br> * EPC : 0xA1<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gquick refrigeration�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick refrigeration�h mode: 0x42 �gStandby for quick refrigeration�h<br> * mode: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetQuickRefrigerationFunctionSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Quick refrigeration function setting<br> * <br> * EPC : 0xA1<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gquick refrigeration�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick refrigeration�h mode: 0x42 �gStandby for quick refrigeration�h<br> * mode: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetQuickRefrigerationFunctionSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Icemaker setting<br> * <br> * EPC : 0xA4<br> * <br> * Contents of property :<br> * Used to specify whether or not to enable the automatic icemaker of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gEnable icemaker�h option: 0x41 �gDisable icemaker�h option: 0x42 �gTemporarily disable icemaker�h<br> * option: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetIcemakerSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Icemaker setting<br> * <br> * EPC : 0xA4<br> * <br> * Contents of property :<br> * Used to specify whether or not to enable the automatic icemaker of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gEnable icemaker�h option: 0x41 �gDisable icemaker�h option: 0x42 �gTemporarily disable icemaker�h<br> * option: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetIcemakerSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Icemaker operation status<br> * <br> * EPC : 0xA5<br> * <br> * Contents of property :<br> * Used to acquire the status of the automatic icemaker of the refrigerator.<br> * <br> * Value range (decimal notation) :<br> * �gIce-making in progress�h state: 0x41<br> * �gIce-making stopped�h state: 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetIcemakerOperationStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Icemaker tank status<br> * <br> * EPC : 0xA6<br> * <br> * Contents of property :<br> * Used to acquire the status of the tank of the automatic icemaker of the refrigerator in terms of whether it contains water or not.<br> * <br> * Value range (decimal notation) :<br> * Icemaker tank contains water: 0x41<br> * There is no water left in the icemaker tank or the icemaker tank has not been positioned correctly in the refrigerator:<br> * 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ protected void onGetIcemakerTankStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Refrigerator compartment humidification function setting<br> * <br> * EPC : 0xA8<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the refrigerator compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetRefrigeratorCompartmentHumidificationFunctionSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Refrigerator compartment humidification function setting<br> * <br> * EPC : 0xA8<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the refrigerator compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetRefrigeratorCompartmentHumidificationFunctionSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Vegetable compartment humidification function setting<br> * <br> * EPC : 0xA9<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the vegetable compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetVegetableCompartmentHumidificationFunctionSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Vegetable compartment humidification function setting<br> * <br> * EPC : 0xA9<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the vegetable compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetVegetableCompartmentHumidificationFunctionSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Deodorization function setting<br> * <br> * EPC : 0xAD<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the deodorization function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onSetDeodorizationFunctionSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} /** * Property name : Deodorization function setting<br> * <br> * EPC : 0xAD<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the deodorization function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ protected void onGetDeodorizationFunctionSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} } public static class Setter extends DeviceObject.Setter { public Setter(EchoObject eoj, boolean responseRequired, boolean multicast) { super(eoj, responseRequired, multicast); } @Override public Setter reqSetProperty(byte epc, byte[] edt) { return (Setter)super.reqSetProperty(epc, edt); } @Override public Setter reqSetOperationStatus(byte[] edt) { return (Setter)super.reqSetOperationStatus(edt); } @Override public Setter reqSetInstallationLocation(byte[] edt) { return (Setter)super.reqSetInstallationLocation(edt); } @Override public Setter reqSetCurrentLimitSetting(byte[] edt) { return (Setter)super.reqSetCurrentLimitSetting(edt); } @Override public Setter reqSetPowerSavingOperationSetting(byte[] edt) { return (Setter)super.reqSetPowerSavingOperationSetting(edt); } @Override public Setter reqSetPositionInformation(byte[] edt) { return (Setter)super.reqSetPositionInformation(edt); } @Override public Setter reqSetCurrentTimeSetting(byte[] edt) { return (Setter)super.reqSetCurrentTimeSetting(edt); } @Override public Setter reqSetCurrentDateSetting(byte[] edt) { return (Setter)super.reqSetCurrentDateSetting(edt); } @Override public Setter reqSetPowerLimitSetting(byte[] edt) { return (Setter)super.reqSetPowerLimitSetting(edt); } /** * Property name : Refrigerator compartment temperature setting<br> * <br> * EPC : 0xE2<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetRefrigeratorCompartmentTemperatureSetting(byte[] edt) { addProperty(EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_SETTING, edt); return this; } /** * Property name : Freezer compartment temperature setting<br> * <br> * EPC : 0xE3<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetFreezerCompartmentTemperatureSetting(byte[] edt) { addProperty(EPC_FREEZER_COMPARTMENT_TEMPERATURE_SETTING, edt); return this; } /** * Property name : Ice temperature setting<br> * <br> * EPC : 0xE4<br> * <br> * Contents of property :<br> * Used to specify the ice compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 bytes<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetIceTemperatureSetting(byte[] edt) { addProperty(EPC_ICE_TEMPERATURE_SETTING, edt); return this; } /** * Property name : Vegetable compartment temperature setting<br> * <br> * EPC : 0xE5<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetVegetableCompartmentTemperatureSetting(byte[] edt) { addProperty(EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_SETTING, edt); return this; } /** * Property name : Multi-refrigera- ting mode compartment temperature setting<br> * <br> * EPC : 0xE6<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetMultiRefrigeraTingModeCompartmentTemperatureSetting(byte[] edt) { addProperty(EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_SETTING, edt); return this; } /** * Property name : Refrigerator compartment temperature level setting<br> * <br> * EPC : 0xE9<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetRefrigeratorCompartmentTemperatureLevelSetting(byte[] edt) { addProperty(EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_LEVEL_SETTING, edt); return this; } /** * Property name : Freezer compartment temperature level setting<br> * <br> * EPC : 0xEA<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetFreezerCompartmentTemperatureLevelSetting(byte[] edt) { addProperty(EPC_FREEZER_COMPARTMENT_TEMPERATURE_LEVEL_SETTING, edt); return this; } /** * Property name : ice compartment temperature level setting<br> * <br> * EPC : 0xEB<br> * <br> * Contents of property :<br> * Used to specify ice compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetIceCompartmentTemperatureLevelSetting(byte[] edt) { addProperty(EPC_ICE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING, edt); return this; } /** * Property name : Vegetable compartment temperature level setting<br> * <br> * EPC : 0xEC<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetVegetableCompartmentTemperatureLevelSetting(byte[] edt) { addProperty(EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING, edt); return this; } /** * Property name : Multi-refrigera- ting mode compartment temperature level setting<br> * <br> * EPC : 0xED<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetMultiRefrigeraTingModeCompartmentTemperatureLevelSetting(byte[] edt) { addProperty(EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING, edt); return this; } /** * Property name : Quick freeze function setting<br> * <br> * EPC : 0xA0<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gQuick freeze�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick freeze�h mode: 0x42 �gStandby for fast freezing�h mode:<br> * 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetQuickFreezeFunctionSetting(byte[] edt) { addProperty(EPC_QUICK_FREEZE_FUNCTION_SETTING, edt); return this; } /** * Property name : Quick refrigeration function setting<br> * <br> * EPC : 0xA1<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gquick refrigeration�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick refrigeration�h mode: 0x42 �gStandby for quick refrigeration�h<br> * mode: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetQuickRefrigerationFunctionSetting(byte[] edt) { addProperty(EPC_QUICK_REFRIGERATION_FUNCTION_SETTING, edt); return this; } /** * Property name : Icemaker setting<br> * <br> * EPC : 0xA4<br> * <br> * Contents of property :<br> * Used to specify whether or not to enable the automatic icemaker of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gEnable icemaker�h option: 0x41 �gDisable icemaker�h option: 0x42 �gTemporarily disable icemaker�h<br> * option: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetIcemakerSetting(byte[] edt) { addProperty(EPC_ICEMAKER_SETTING, edt); return this; } /** * Property name : Refrigerator compartment humidification function setting<br> * <br> * EPC : 0xA8<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the refrigerator compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetRefrigeratorCompartmentHumidificationFunctionSetting(byte[] edt) { addProperty(EPC_REFRIGERATOR_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING, edt); return this; } /** * Property name : Vegetable compartment humidification function setting<br> * <br> * EPC : 0xA9<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the vegetable compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetVegetableCompartmentHumidificationFunctionSetting(byte[] edt) { addProperty(EPC_VEGETABLE_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING, edt); return this; } /** * Property name : Deodorization function setting<br> * <br> * EPC : 0xAD<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the deodorization function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Setter reqSetDeodorizationFunctionSetting(byte[] edt) { addProperty(EPC_DEODORIZATION_FUNCTION_SETTING, edt); return this; } } public static class Getter extends DeviceObject.Getter { public Getter(EchoObject eoj, boolean multicast) { super(eoj, multicast); } @Override public Getter reqGetProperty(byte epc) { return (Getter)super.reqGetProperty(epc); } @Override public Getter reqGetOperationStatus() { return (Getter)super.reqGetOperationStatus(); } @Override public Getter reqGetInstallationLocation() { return (Getter)super.reqGetInstallationLocation(); } @Override public Getter reqGetStandardVersionInformation() { return (Getter)super.reqGetStandardVersionInformation(); } @Override public Getter reqGetIdentificationNumber() { return (Getter)super.reqGetIdentificationNumber(); } @Override public Getter reqGetMeasuredInstantaneousPowerConsumption() { return (Getter)super.reqGetMeasuredInstantaneousPowerConsumption(); } @Override public Getter reqGetMeasuredCumulativePowerConsumption() { return (Getter)super.reqGetMeasuredCumulativePowerConsumption(); } @Override public Getter reqGetManufacturersFaultCode() { return (Getter)super.reqGetManufacturersFaultCode(); } @Override public Getter reqGetCurrentLimitSetting() { return (Getter)super.reqGetCurrentLimitSetting(); } @Override public Getter reqGetFaultStatus() { return (Getter)super.reqGetFaultStatus(); } @Override public Getter reqGetFaultDescription() { return (Getter)super.reqGetFaultDescription(); } @Override public Getter reqGetManufacturerCode() { return (Getter)super.reqGetManufacturerCode(); } @Override public Getter reqGetBusinessFacilityCode() { return (Getter)super.reqGetBusinessFacilityCode(); } @Override public Getter reqGetProductCode() { return (Getter)super.reqGetProductCode(); } @Override public Getter reqGetProductionNumber() { return (Getter)super.reqGetProductionNumber(); } @Override public Getter reqGetProductionDate() { return (Getter)super.reqGetProductionDate(); } @Override public Getter reqGetPowerSavingOperationSetting() { return (Getter)super.reqGetPowerSavingOperationSetting(); } @Override public Getter reqGetPositionInformation() { return (Getter)super.reqGetPositionInformation(); } @Override public Getter reqGetCurrentTimeSetting() { return (Getter)super.reqGetCurrentTimeSetting(); } @Override public Getter reqGetCurrentDateSetting() { return (Getter)super.reqGetCurrentDateSetting(); } @Override public Getter reqGetPowerLimitSetting() { return (Getter)super.reqGetPowerLimitSetting(); } @Override public Getter reqGetCumulativeOperatingTime() { return (Getter)super.reqGetCumulativeOperatingTime(); } @Override public Getter reqGetStatusChangeAnnouncementPropertyMap() { return (Getter)super.reqGetStatusChangeAnnouncementPropertyMap(); } @Override public Getter reqGetSetPropertyMap() { return (Getter)super.reqGetSetPropertyMap(); } @Override public Getter reqGetGetPropertyMap() { return (Getter)super.reqGetGetPropertyMap(); } /** * Property name : Door open/close status<br> * <br> * EPC : 0xB0<br> * <br> * Contents of property :<br> * Door open/close status<br> * <br> * Value range (decimal notation) :<br> * Door open = 0x41, Door close = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - mandatory<br> */ public Getter reqGetDoorOpenCloseStatus() { addProperty(EPC_DOOR_OPEN_CLOSE_STATUS); return this; } /** * Property name : Door open warning<br> * <br> * EPC : 0xB1<br> * <br> * Contents of property :<br> * Door open warning status<br> * <br> * Value range (decimal notation) :<br> * Door open warning found = 0x41<br> * Door open warning not found = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> * <br> * <b>Announcement at status change</b><br> */ public Getter reqGetDoorOpenWarning() { addProperty(EPC_DOOR_OPEN_WARNING); return this; } /** * Property name : Refrigerator compartment door status<br> * <br> * EPC : 0xB2<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the refrigerator<br> * compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetRefrigeratorCompartmentDoorStatus() { addProperty(EPC_REFRIGERATOR_COMPARTMENT_DOOR_STATUS); return this; } /** * Property name : Freezer compartment door status<br> * <br> * EPC : 0xB3<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the freezer compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetFreezerCompartmentDoorStatus() { addProperty(EPC_FREEZER_COMPARTMENT_DOOR_STATUS); return this; } /** * Property name : Ice compartment door status<br> * <br> * EPC : 0xB4<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the ice compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetIceCompartmentDoorStatus() { addProperty(EPC_ICE_COMPARTMENT_DOOR_STATUS); return this; } /** * Property name : Vegetable compartment door status<br> * <br> * EPC : 0xB5<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the vegetable compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetVegetableCompartmentDoorStatus() { addProperty(EPC_VEGETABLE_COMPARTMENT_DOOR_STATUS); return this; } /** * Property name : Multi-refrigera- ting mode compartment door<br> * <br> * EPC : 0xB6<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the multi-refrigerating mode compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetMultiRefrigeraTingModeCompartmentDoor() { addProperty(EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_DOOR); return this; } /** * Property name : Maximum allowable temperature setting level<br> * <br> * EPC : 0xE0<br> * <br> * Contents of property :<br> * Used to acquire the maximum allowable temperature setting levels<br> * for the individual compartments of the refrigerator.<br> * <br> * Value range (decimal notation) :<br> * First byte: Refrigerator compartment<br> * Second byte: Freezer compartment<br> * Third byte:subzero-fresh compartment<br> * Fourth byte: Vegetable compartment<br> * Fifth byte: Multi-refrigerating mode compartment<br> * Sixth to eighth bytes: Reserved for future use.<br> * 0x01 to 0xFF (Level 1 to 255)<br> * 0x00 = no compartment<br> * <br> * Data type : unsigned char x 8<br> * <br> * Data size : 8 bytes<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetMaximumAllowableTemperatureSettingLevel() { addProperty(EPC_MAXIMUM_ALLOWABLE_TEMPERATURE_SETTING_LEVEL); return this; } /** * Property name : Refrigerator compartment temperature setting<br> * <br> * EPC : 0xE2<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetRefrigeratorCompartmentTemperatureSetting() { addProperty(EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_SETTING); return this; } /** * Property name : Freezer compartment temperature setting<br> * <br> * EPC : 0xE3<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetFreezerCompartmentTemperatureSetting() { addProperty(EPC_FREEZER_COMPARTMENT_TEMPERATURE_SETTING); return this; } /** * Property name : Ice temperature setting<br> * <br> * EPC : 0xE4<br> * <br> * Contents of property :<br> * Used to specify the ice compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 bytes<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetIceTemperatureSetting() { addProperty(EPC_ICE_TEMPERATURE_SETTING); return this; } /** * Property name : Vegetable compartment temperature setting<br> * <br> * EPC : 0xE5<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetVegetableCompartmentTemperatureSetting() { addProperty(EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_SETTING); return this; } /** * Property name : Multi-refrigera- ting mode compartment temperature setting<br> * <br> * EPC : 0xE6<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetMultiRefrigeraTingModeCompartmentTemperatureSetting() { addProperty(EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_SETTING); return this; } /** * Property name : Refrigerator compartment temperature level setting<br> * <br> * EPC : 0xE9<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetRefrigeratorCompartmentTemperatureLevelSetting() { addProperty(EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_LEVEL_SETTING); return this; } /** * Property name : Freezer compartment temperature level setting<br> * <br> * EPC : 0xEA<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetFreezerCompartmentTemperatureLevelSetting() { addProperty(EPC_FREEZER_COMPARTMENT_TEMPERATURE_LEVEL_SETTING); return this; } /** * Property name : ice compartment temperature level setting<br> * <br> * EPC : 0xEB<br> * <br> * Contents of property :<br> * Used to specify ice compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetIceCompartmentTemperatureLevelSetting() { addProperty(EPC_ICE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING); return this; } /** * Property name : Vegetable compartment temperature level setting<br> * <br> * EPC : 0xEC<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetVegetableCompartmentTemperatureLevelSetting() { addProperty(EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING); return this; } /** * Property name : Multi-refrigera- ting mode compartment temperature level setting<br> * <br> * EPC : 0xED<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetMultiRefrigeraTingModeCompartmentTemperatureLevelSetting() { addProperty(EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING); return this; } /** * Property name : Measured refrigerator compartment temperature<br> * <br> * EPC : 0xD1<br> * <br> * Contents of property :<br> * Used to acquire the measured refrigerator compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetMeasuredRefrigeratorCompartmentTemperature() { addProperty(EPC_MEASURED_REFRIGERATOR_COMPARTMENT_TEMPERATURE); return this; } /** * Property name : Measured freezer compartment temperature<br> * <br> * EPC : 0xD2<br> * <br> * Contents of property :<br> * Used to acquire the measured freezer compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetMeasuredFreezerCompartmentTemperature() { addProperty(EPC_MEASURED_FREEZER_COMPARTMENT_TEMPERATURE); return this; } /** * Property name : Measured subzero-fresh compartment temperature<br> * <br> * EPC : 0xD3<br> * <br> * Contents of property :<br> * Used to acquire the measured meat and fish compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetMeasuredSubzeroFreshCompartmentTemperature() { addProperty(EPC_MEASURED_SUBZERO_FRESH_COMPARTMENT_TEMPERATURE); return this; } /** * Property name : Measured vegetable compartment temperature<br> * <br> * EPC : 0xD4<br> * <br> * Contents of property :<br> * Used to acquire the measured vegetable compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetMeasuredVegetableCompartmentTemperature() { addProperty(EPC_MEASURED_VEGETABLE_COMPARTMENT_TEMPERATURE); return this; } /** * Property name : Measured multi-refrigeratin g mode compartment temperature<br> * <br> * EPC : 0xD5<br> * <br> * Contents of property :<br> * Used to acquire the measured<br> * multi-refrigerating mode compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetMeasuredMultiRefrigeratinGModeCompartmentTemperature() { addProperty(EPC_MEASURED_MULTI_REFRIGERATIN_G_MODE_COMPARTMENT_TEMPERATURE); return this; } /** * Property name : Compressor rotation speed<br> * <br> * EPC : 0xD8<br> * <br> * Contents of property :<br> * Used to acquire the rotation speed of the compressor. The rotation speed is expressed in terms of a level.<br> * <br> * Value range (decimal notation) :<br> * First byte: Maximum rotation speed L (0x01 to 0xFF (1 to 255))<br> * Second byte: Rotation speed of the actual compressor:<br> * 0x00 to L (zero speed to highest speed)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetCompressorRotationSpeed() { addProperty(EPC_COMPRESSOR_ROTATION_SPEED); return this; } /** * Property name : Measured electric current consumption<br> * <br> * EPC : 0xDA<br> * <br> * Contents of property :<br> * Used to acquire the measured electric current consumption.<br> * <br> * Value range (decimal notation) :<br> * 0x0000 to 0xFFFD (0 to 6553.3A)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : 0.1A<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetMeasuredElectricCurrentConsumption() { addProperty(EPC_MEASURED_ELECTRIC_CURRENT_CONSUMPTION); return this; } /** * Property name : Rated power consumption<br> * <br> * EPC : 0xDC<br> * <br> * Contents of property :<br> * Used to acquire the rated power consumption.<br> * <br> * Value range (decimal notation) :<br> * 0x0000 to 0xFFFD (0 to 65533W)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : W<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetRatedPowerConsumption() { addProperty(EPC_RATED_POWER_CONSUMPTION); return this; } /** * Property name : Quick freeze function setting<br> * <br> * EPC : 0xA0<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gQuick freeze�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick freeze�h mode: 0x42 �gStandby for fast freezing�h mode:<br> * 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetQuickFreezeFunctionSetting() { addProperty(EPC_QUICK_FREEZE_FUNCTION_SETTING); return this; } /** * Property name : Quick refrigeration function setting<br> * <br> * EPC : 0xA1<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gquick refrigeration�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick refrigeration�h mode: 0x42 �gStandby for quick refrigeration�h<br> * mode: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetQuickRefrigerationFunctionSetting() { addProperty(EPC_QUICK_REFRIGERATION_FUNCTION_SETTING); return this; } /** * Property name : Icemaker setting<br> * <br> * EPC : 0xA4<br> * <br> * Contents of property :<br> * Used to specify whether or not to enable the automatic icemaker of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gEnable icemaker�h option: 0x41 �gDisable icemaker�h option: 0x42 �gTemporarily disable icemaker�h<br> * option: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetIcemakerSetting() { addProperty(EPC_ICEMAKER_SETTING); return this; } /** * Property name : Icemaker operation status<br> * <br> * EPC : 0xA5<br> * <br> * Contents of property :<br> * Used to acquire the status of the automatic icemaker of the refrigerator.<br> * <br> * Value range (decimal notation) :<br> * �gIce-making in progress�h state: 0x41<br> * �gIce-making stopped�h state: 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetIcemakerOperationStatus() { addProperty(EPC_ICEMAKER_OPERATION_STATUS); return this; } /** * Property name : Icemaker tank status<br> * <br> * EPC : 0xA6<br> * <br> * Contents of property :<br> * Used to acquire the status of the tank of the automatic icemaker of the refrigerator in terms of whether it contains water or not.<br> * <br> * Value range (decimal notation) :<br> * Icemaker tank contains water: 0x41<br> * There is no water left in the icemaker tank or the icemaker tank has not been positioned correctly in the refrigerator:<br> * 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Getter reqGetIcemakerTankStatus() { addProperty(EPC_ICEMAKER_TANK_STATUS); return this; } /** * Property name : Refrigerator compartment humidification function setting<br> * <br> * EPC : 0xA8<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the refrigerator compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetRefrigeratorCompartmentHumidificationFunctionSetting() { addProperty(EPC_REFRIGERATOR_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING); return this; } /** * Property name : Vegetable compartment humidification function setting<br> * <br> * EPC : 0xA9<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the vegetable compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetVegetableCompartmentHumidificationFunctionSetting() { addProperty(EPC_VEGETABLE_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING); return this; } /** * Property name : Deodorization function setting<br> * <br> * EPC : 0xAD<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the deodorization function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Getter reqGetDeodorizationFunctionSetting() { addProperty(EPC_DEODORIZATION_FUNCTION_SETTING); return this; } } public static class Informer extends DeviceObject.Informer { public Informer(EchoObject eoj, boolean multicast) { super(eoj, multicast); } @Override public Informer reqInformProperty(byte epc) { return (Informer)super.reqInformProperty(epc); } @Override public Informer reqInformOperationStatus() { return (Informer)super.reqInformOperationStatus(); } @Override public Informer reqInformInstallationLocation() { return (Informer)super.reqInformInstallationLocation(); } @Override public Informer reqInformStandardVersionInformation() { return (Informer)super.reqInformStandardVersionInformation(); } @Override public Informer reqInformIdentificationNumber() { return (Informer)super.reqInformIdentificationNumber(); } @Override public Informer reqInformMeasuredInstantaneousPowerConsumption() { return (Informer)super.reqInformMeasuredInstantaneousPowerConsumption(); } @Override public Informer reqInformMeasuredCumulativePowerConsumption() { return (Informer)super.reqInformMeasuredCumulativePowerConsumption(); } @Override public Informer reqInformManufacturersFaultCode() { return (Informer)super.reqInformManufacturersFaultCode(); } @Override public Informer reqInformCurrentLimitSetting() { return (Informer)super.reqInformCurrentLimitSetting(); } @Override public Informer reqInformFaultStatus() { return (Informer)super.reqInformFaultStatus(); } @Override public Informer reqInformFaultDescription() { return (Informer)super.reqInformFaultDescription(); } @Override public Informer reqInformManufacturerCode() { return (Informer)super.reqInformManufacturerCode(); } @Override public Informer reqInformBusinessFacilityCode() { return (Informer)super.reqInformBusinessFacilityCode(); } @Override public Informer reqInformProductCode() { return (Informer)super.reqInformProductCode(); } @Override public Informer reqInformProductionNumber() { return (Informer)super.reqInformProductionNumber(); } @Override public Informer reqInformProductionDate() { return (Informer)super.reqInformProductionDate(); } @Override public Informer reqInformPowerSavingOperationSetting() { return (Informer)super.reqInformPowerSavingOperationSetting(); } @Override public Informer reqInformPositionInformation() { return (Informer)super.reqInformPositionInformation(); } @Override public Informer reqInformCurrentTimeSetting() { return (Informer)super.reqInformCurrentTimeSetting(); } @Override public Informer reqInformCurrentDateSetting() { return (Informer)super.reqInformCurrentDateSetting(); } @Override public Informer reqInformPowerLimitSetting() { return (Informer)super.reqInformPowerLimitSetting(); } @Override public Informer reqInformCumulativeOperatingTime() { return (Informer)super.reqInformCumulativeOperatingTime(); } @Override public Informer reqInformStatusChangeAnnouncementPropertyMap() { return (Informer)super.reqInformStatusChangeAnnouncementPropertyMap(); } @Override public Informer reqInformSetPropertyMap() { return (Informer)super.reqInformSetPropertyMap(); } @Override public Informer reqInformGetPropertyMap() { return (Informer)super.reqInformGetPropertyMap(); } /** * Property name : Door open/close status<br> * <br> * EPC : 0xB0<br> * <br> * Contents of property :<br> * Door open/close status<br> * <br> * Value range (decimal notation) :<br> * Door open = 0x41, Door close = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - mandatory<br> */ public Informer reqInformDoorOpenCloseStatus() { addProperty(EPC_DOOR_OPEN_CLOSE_STATUS); return this; } /** * Property name : Door open warning<br> * <br> * EPC : 0xB1<br> * <br> * Contents of property :<br> * Door open warning status<br> * <br> * Value range (decimal notation) :<br> * Door open warning found = 0x41<br> * Door open warning not found = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> * <br> * <b>Announcement at status change</b><br> */ public Informer reqInformDoorOpenWarning() { addProperty(EPC_DOOR_OPEN_WARNING); return this; } /** * Property name : Refrigerator compartment door status<br> * <br> * EPC : 0xB2<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the refrigerator<br> * compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : .<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformRefrigeratorCompartmentDoorStatus() { addProperty(EPC_REFRIGERATOR_COMPARTMENT_DOOR_STATUS); return this; } /** * Property name : Freezer compartment door status<br> * <br> * EPC : 0xB3<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the freezer compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformFreezerCompartmentDoorStatus() { addProperty(EPC_FREEZER_COMPARTMENT_DOOR_STATUS); return this; } /** * Property name : Ice compartment door status<br> * <br> * EPC : 0xB4<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the ice compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformIceCompartmentDoorStatus() { addProperty(EPC_ICE_COMPARTMENT_DOOR_STATUS); return this; } /** * Property name : Vegetable compartment door status<br> * <br> * EPC : 0xB5<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the vegetable compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformVegetableCompartmentDoorStatus() { addProperty(EPC_VEGETABLE_COMPARTMENT_DOOR_STATUS); return this; } /** * Property name : Multi-refrigera- ting mode compartment door<br> * <br> * EPC : 0xB6<br> * <br> * Contents of property :<br> * Used to acquire the status (i.e. open or closed) of the multi-refrigerating mode compartment door.<br> * <br> * Value range (decimal notation) :<br> * Open = 0x41, closed = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformMultiRefrigeraTingModeCompartmentDoor() { addProperty(EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_DOOR); return this; } /** * Property name : Maximum allowable temperature setting level<br> * <br> * EPC : 0xE0<br> * <br> * Contents of property :<br> * Used to acquire the maximum allowable temperature setting levels<br> * for the individual compartments of the refrigerator.<br> * <br> * Value range (decimal notation) :<br> * First byte: Refrigerator compartment<br> * Second byte: Freezer compartment<br> * Third byte:subzero-fresh compartment<br> * Fourth byte: Vegetable compartment<br> * Fifth byte: Multi-refrigerating mode compartment<br> * Sixth to eighth bytes: Reserved for future use.<br> * 0x01 to 0xFF (Level 1 to 255)<br> * 0x00 = no compartment<br> * <br> * Data type : unsigned char x 8<br> * <br> * Data size : 8 bytes<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformMaximumAllowableTemperatureSettingLevel() { addProperty(EPC_MAXIMUM_ALLOWABLE_TEMPERATURE_SETTING_LEVEL); return this; } /** * Property name : Refrigerator compartment temperature setting<br> * <br> * EPC : 0xE2<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformRefrigeratorCompartmentTemperatureSetting() { addProperty(EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_SETTING); return this; } /** * Property name : Freezer compartment temperature setting<br> * <br> * EPC : 0xE3<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformFreezerCompartmentTemperatureSetting() { addProperty(EPC_FREEZER_COMPARTMENT_TEMPERATURE_SETTING); return this; } /** * Property name : Ice temperature setting<br> * <br> * EPC : 0xE4<br> * <br> * Contents of property :<br> * Used to specify the ice compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 bytes<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformIceTemperatureSetting() { addProperty(EPC_ICE_TEMPERATURE_SETTING); return this; } /** * Property name : Vegetable compartment temperature setting<br> * <br> * EPC : 0xE5<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformVegetableCompartmentTemperatureSetting() { addProperty(EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_SETTING); return this; } /** * Property name : Multi-refrigera- ting mode compartment temperature setting<br> * <br> * EPC : 0xE6<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature in ��C, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformMultiRefrigeraTingModeCompartmentTemperatureSetting() { addProperty(EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_SETTING); return this; } /** * Property name : Refrigerator compartment temperature level setting<br> * <br> * EPC : 0xE9<br> * <br> * Contents of property :<br> * Used to specify the refrigerator compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformRefrigeratorCompartmentTemperatureLevelSetting() { addProperty(EPC_REFRIGERATOR_COMPARTMENT_TEMPERATURE_LEVEL_SETTING); return this; } /** * Property name : Freezer compartment temperature level setting<br> * <br> * EPC : 0xEA<br> * <br> * Contents of property :<br> * Used to specify the freezer compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformFreezerCompartmentTemperatureLevelSetting() { addProperty(EPC_FREEZER_COMPARTMENT_TEMPERATURE_LEVEL_SETTING); return this; } /** * Property name : ice compartment temperature level setting<br> * <br> * EPC : 0xEB<br> * <br> * Contents of property :<br> * Used to specify ice compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformIceCompartmentTemperatureLevelSetting() { addProperty(EPC_ICE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING); return this; } /** * Property name : Vegetable compartment temperature level setting<br> * <br> * EPC : 0xEC<br> * <br> * Contents of property :<br> * Used to specify the vegetable compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformVegetableCompartmentTemperatureLevelSetting() { addProperty(EPC_VEGETABLE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING); return this; } /** * Property name : Multi-refrigera- ting mode compartment temperature level setting<br> * <br> * EPC : 0xED<br> * <br> * Contents of property :<br> * Used to specify the multi-refrigerating mode compartment temperature by selecting a level from among the predefined levels, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * 0x01 to maximum allowable temperature setting level (highest to lowest temperature)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformMultiRefrigeraTingModeCompartmentTemperatureLevelSetting() { addProperty(EPC_MULTI_REFRIGERA_TING_MODE_COMPARTMENT_TEMPERATURE_LEVEL_SETTING); return this; } /** * Property name : Measured refrigerator compartment temperature<br> * <br> * EPC : 0xD1<br> * <br> * Contents of property :<br> * Used to acquire the measured refrigerator compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformMeasuredRefrigeratorCompartmentTemperature() { addProperty(EPC_MEASURED_REFRIGERATOR_COMPARTMENT_TEMPERATURE); return this; } /** * Property name : Measured freezer compartment temperature<br> * <br> * EPC : 0xD2<br> * <br> * Contents of property :<br> * Used to acquire the measured freezer compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformMeasuredFreezerCompartmentTemperature() { addProperty(EPC_MEASURED_FREEZER_COMPARTMENT_TEMPERATURE); return this; } /** * Property name : Measured subzero-fresh compartment temperature<br> * <br> * EPC : 0xD3<br> * <br> * Contents of property :<br> * Used to acquire the measured meat and fish compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformMeasuredSubzeroFreshCompartmentTemperature() { addProperty(EPC_MEASURED_SUBZERO_FRESH_COMPARTMENT_TEMPERATURE); return this; } /** * Property name : Measured vegetable compartment temperature<br> * <br> * EPC : 0xD4<br> * <br> * Contents of property :<br> * Used to acquire the measured vegetable compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformMeasuredVegetableCompartmentTemperature() { addProperty(EPC_MEASURED_VEGETABLE_COMPARTMENT_TEMPERATURE); return this; } /** * Property name : Measured multi-refrigeratin g mode compartment temperature<br> * <br> * EPC : 0xD5<br> * <br> * Contents of property :<br> * Used to acquire the measured<br> * multi-refrigerating mode compartment temperature (��C).<br> * <br> * Value range (decimal notation) :<br> * 0x81 to 0x7E (-127 to 126��C)<br> * <br> * Data type : signed char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : . C<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformMeasuredMultiRefrigeratinGModeCompartmentTemperature() { addProperty(EPC_MEASURED_MULTI_REFRIGERATIN_G_MODE_COMPARTMENT_TEMPERATURE); return this; } /** * Property name : Compressor rotation speed<br> * <br> * EPC : 0xD8<br> * <br> * Contents of property :<br> * Used to acquire the rotation speed of the compressor. The rotation speed is expressed in terms of a level.<br> * <br> * Value range (decimal notation) :<br> * First byte: Maximum rotation speed L (0x01 to 0xFF (1 to 255))<br> * Second byte: Rotation speed of the actual compressor:<br> * 0x00 to L (zero speed to highest speed)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformCompressorRotationSpeed() { addProperty(EPC_COMPRESSOR_ROTATION_SPEED); return this; } /** * Property name : Measured electric current consumption<br> * <br> * EPC : 0xDA<br> * <br> * Contents of property :<br> * Used to acquire the measured electric current consumption.<br> * <br> * Value range (decimal notation) :<br> * 0x0000 to 0xFFFD (0 to 6553.3A)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : 0.1A<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformMeasuredElectricCurrentConsumption() { addProperty(EPC_MEASURED_ELECTRIC_CURRENT_CONSUMPTION); return this; } /** * Property name : Rated power consumption<br> * <br> * EPC : 0xDC<br> * <br> * Contents of property :<br> * Used to acquire the rated power consumption.<br> * <br> * Value range (decimal notation) :<br> * 0x0000 to 0xFFFD (0 to 65533W)<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 2 bytes<br> * <br> * Unit : W<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformRatedPowerConsumption() { addProperty(EPC_RATED_POWER_CONSUMPTION); return this; } /** * Property name : Quick freeze function setting<br> * <br> * EPC : 0xA0<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gQuick freeze�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick freeze�h mode: 0x42 �gStandby for fast freezing�h mode:<br> * 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformQuickFreezeFunctionSetting() { addProperty(EPC_QUICK_FREEZE_FUNCTION_SETTING); return this; } /** * Property name : Quick refrigeration function setting<br> * <br> * EPC : 0xA1<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the �gquick refrigeration�h function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gNormal operation�h mode: 0x41 �gQuick refrigeration�h mode: 0x42 �gStandby for quick refrigeration�h<br> * mode: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformQuickRefrigerationFunctionSetting() { addProperty(EPC_QUICK_REFRIGERATION_FUNCTION_SETTING); return this; } /** * Property name : Icemaker setting<br> * <br> * EPC : 0xA4<br> * <br> * Contents of property :<br> * Used to specify whether or not to enable the automatic icemaker of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * �gEnable icemaker�h option: 0x41 �gDisable icemaker�h option: 0x42 �gTemporarily disable icemaker�h<br> * option: 0x43<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformIcemakerSetting() { addProperty(EPC_ICEMAKER_SETTING); return this; } /** * Property name : Icemaker operation status<br> * <br> * EPC : 0xA5<br> * <br> * Contents of property :<br> * Used to acquire the status of the automatic icemaker of the refrigerator.<br> * <br> * Value range (decimal notation) :<br> * �gIce-making in progress�h state: 0x41<br> * �gIce-making stopped�h state: 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformIcemakerOperationStatus() { addProperty(EPC_ICEMAKER_OPERATION_STATUS); return this; } /** * Property name : Icemaker tank status<br> * <br> * EPC : 0xA6<br> * <br> * Contents of property :<br> * Used to acquire the status of the tank of the automatic icemaker of the refrigerator in terms of whether it contains water or not.<br> * <br> * Value range (decimal notation) :<br> * Icemaker tank contains water: 0x41<br> * There is no water left in the icemaker tank or the icemaker tank has not been positioned correctly in the refrigerator:<br> * 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - undefined<br> * Get - optional<br> */ public Informer reqInformIcemakerTankStatus() { addProperty(EPC_ICEMAKER_TANK_STATUS); return this; } /** * Property name : Refrigerator compartment humidification function setting<br> * <br> * EPC : 0xA8<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the refrigerator compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformRefrigeratorCompartmentHumidificationFunctionSetting() { addProperty(EPC_REFRIGERATOR_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING); return this; } /** * Property name : Vegetable compartment humidification function setting<br> * <br> * EPC : 0xA9<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the vegetable compartment humidification function, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformVegetableCompartmentHumidificationFunctionSetting() { addProperty(EPC_VEGETABLE_COMPARTMENT_HUMIDIFICATION_FUNCTION_SETTING); return this; } /** * Property name : Deodorization function setting<br> * <br> * EPC : 0xAD<br> * <br> * Contents of property :<br> * Used to specify whether or not to use the deodorization function of the refrigerator, and to acquire the current setting.<br> * <br> * Value range (decimal notation) :<br> * ON = 0x41<br> * OFF = 0x42<br> * <br> * Data type : unsigned char<br> * <br> * Data size : 1 byte<br> * <br> * Unit : -<br> * <br> * Access rule :<br> * Announce - undefined<br> * Set - optional<br> * Get - optional<br> */ public Informer reqInformDeodorizationFunctionSetting() { addProperty(EPC_DEODORIZATION_FUNCTION_SETTING); return this; } } public static class Proxy extends Refrigerator { private byte mInstanceCode; public Proxy(byte instanceCode) { super(); mInstanceCode = instanceCode; } @Override public byte getInstanceCode() { return mInstanceCode; } @Override protected byte[] getOperationStatus() {return null;} @Override protected boolean setInstallationLocation(byte[] edt) {return false;} @Override protected byte[] getInstallationLocation() {return null;} @Override protected byte[] getStandardVersionInformation() {return null;} @Override protected byte[] getFaultStatus() {return null;} @Override protected byte[] getManufacturerCode() {return null;} @Override protected byte[] getDoorOpenCloseStatus() {return null;} } public static Setter setG() { return setG((byte)0); } public static Setter setG(byte instanceCode) { return new Setter(new Proxy(instanceCode), true, true); } public static Setter setG(boolean responseRequired) { return setG((byte)0, responseRequired); } public static Setter setG(byte instanceCode, boolean responseRequired) { return new Setter(new Proxy(instanceCode), responseRequired, true); } public static Getter getG() { return getG((byte)0); } public static Getter getG(byte instanceCode) { return new Getter(new Proxy(instanceCode), true); } public static Informer informG() { return informG((byte)0); } public static Informer informG(byte instanceCode) { return new Informer(new Proxy(instanceCode), true); } }
[ "emura@plum8.westlab" ]
emura@plum8.westlab
a02238cf293f0771c1465041044e8cc1d69f81ed
14b389df8efcde6eb5c043bd9afec6c9772d03dd
/src/day18/Test1_6.java
e6b59d78ac7d61bf53c55419298daea34189dbe1
[]
no_license
if123456/work
3ea03fd5722e2ed125c31f875aa0023848addbec
26258d5563135cee402bef2fd68f98183ac2f498
refs/heads/master
2020-12-11T08:24:24.900033
2020-01-18T09:28:18
2020-01-18T09:28:18
233,799,873
0
0
null
null
null
null
UTF-8
Java
false
false
509
java
package day18; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; public class Test1_6 { public static void main(String[] args) throws IOException { FileInputStream fis=new FileInputStream("D:\\1.jpg"); FileOutputStream fos=new FileOutputStream("D:\\a\\1copy.jpg"); byte[]b=new byte[1024]; int len; while((len=fis.read(b))!=-1){ fos.write(b,0,len); } fos.close(); fis.close(); } }
[ "l" ]
l
392b89f25eace9859218360e7fca097391bf9dc7
776473121028ac5c6a072accddf2e273a3d1edaa
/src/main/java/com/qwon/springboot/web/dto/HelloResponseDto.java
785ab6d64864773f7524d60e7a20622b691de2c4
[]
no_license
sayhara/SpringBoot
9b74e0de33e72eebe2828cb7a4e22f6365d5b830
5664b0e99a3c8c3d2aa13fa2df47a7180bf55640
refs/heads/master
2023-06-20T15:57:15.875842
2021-07-15T03:15:24
2021-07-15T03:15:24
302,252,757
0
0
null
null
null
null
UTF-8
Java
false
false
229
java
package com.qwon.springboot.web.dto; import lombok.Getter; import lombok.RequiredArgsConstructor; @Getter @RequiredArgsConstructor public class HelloResponseDto { private final String name; private final int amount; }
[ "impact82@naver.com" ]
impact82@naver.com
381af694d97af29887a1df7a1402cca4499ae9f0
2a439ea24eb4d13e4da7ef639b5c85a06216e43d
/src/app/servlet/auth/PasswordChangeServlet.java
845823749ac6276a6938be8c2cfb217b3246ea59
[]
no_license
riki-ueno/VCC-A-Team_BookManageSystem
c6215f76f6175987971283e1da562720deb12c23
e3c3c075e3b4a08093104c45ef65920e5ef32d83
refs/heads/develop
2022-08-01T07:13:35.173912
2020-05-26T02:24:05
2020-05-26T02:24:05
264,864,257
0
0
null
2020-05-26T02:24:06
2020-05-18T07:38:57
CSS
UTF-8
Java
false
false
1,716
java
package app.servlet.auth; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.commons.codec.digest.DigestUtils; import com.fasterxml.jackson.databind.ObjectMapper; import app.dao.PasswordChangeDAO; /** * Servlet implementation class PasswordChangeServlet */ @WebServlet("/api/auth/passwordChange") public class PasswordChangeServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public PasswordChangeServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String password = request.getParameter("password"); HttpSession session = request.getSession(true); String account_name = (String)session.getAttribute("account_name"); PasswordChangeDAO passwordChangeDao = new PasswordChangeDAO(); passwordChangeDao.passwordChange(account_name, DigestUtils.sha256Hex(password)); PrintWriter pw = response.getWriter(); pw.append(new ObjectMapper().writeValueAsString("ok")); } }
[ "yu-ji@virtualex.co.jp" ]
yu-ji@virtualex.co.jp
783ae60a40fa4a53b7f80c54281364d0aba29c0c
978218804c720bfd680deb26bd136a62b39ed400
/src/test/java/com/pimpo/pimpofilms/web/rest/FilmResourceIntTest.java
eee98bb7225b20aed8d40d53750e377339fc64b3
[]
no_license
jorgerod/pimpofilms
6c8f7a7d3b10abea42298939914e2cc1aba6cabc
c2d88e316a0fef2bac7bf04baaac77d9cc896a25
refs/heads/master
2021-01-11T06:01:35.720233
2016-11-30T05:38:35
2016-11-30T05:38:35
70,007,099
0
0
null
null
null
null
UTF-8
Java
false
false
8,463
java
package com.pimpo.pimpofilms.web.rest; import com.pimpo.pimpofilms.PimpofilmsApp; import com.pimpo.pimpofilms.domain.Film; import com.pimpo.pimpofilms.repository.FilmRepository; import com.pimpo.pimpofilms.service.FilmService; import com.pimpo.pimpofilms.service.dto.FilmDTO; import com.pimpo.pimpofilms.service.mapper.FilmMapper; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import static org.hamcrest.Matchers.hasItem; import org.mockito.MockitoAnnotations; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import javax.inject.Inject; import javax.persistence.EntityManager; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; /** * Test class for the FilmResource REST controller. * * @see FilmResource */ @RunWith(SpringRunner.class) @SpringBootTest(classes = PimpofilmsApp.class) public class FilmResourceIntTest { private static final String DEFAULT_TITLE = "AAAAAAAAAA"; private static final String UPDATED_TITLE = "BBBBBBBBBB"; private static final Integer DEFAULT_YEAR = 1900; private static final Integer UPDATED_YEAR = 1901; @Inject private FilmRepository filmRepository; @Inject private FilmMapper filmMapper; @Inject private FilmService filmService; @Inject private MappingJackson2HttpMessageConverter jacksonMessageConverter; @Inject private PageableHandlerMethodArgumentResolver pageableArgumentResolver; @Inject private EntityManager em; private MockMvc restFilmMockMvc; private Film film; @Before public void setup() { MockitoAnnotations.initMocks(this); FilmResource filmResource = new FilmResource(); ReflectionTestUtils.setField(filmResource, "filmService", filmService); this.restFilmMockMvc = MockMvcBuilders.standaloneSetup(filmResource) .setCustomArgumentResolvers(pageableArgumentResolver) .setMessageConverters(jacksonMessageConverter).build(); } /** * Create an entity for this test. * * This is a static method, as tests for other entities might also need it, * if they test an entity which requires the current entity. */ public static Film createEntity(EntityManager em) { Film film = new Film() .title(DEFAULT_TITLE) .year(DEFAULT_YEAR); return film; } @Before public void initTest() { film = createEntity(em); } @Test @Transactional public void createFilm() throws Exception { int databaseSizeBeforeCreate = filmRepository.findAll().size(); // Create the Film FilmDTO filmDTO = filmMapper.filmToFilmDTO(film); restFilmMockMvc.perform(post("/api/films") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(filmDTO))) .andExpect(status().isCreated()); // Validate the Film in the database List<Film> films = filmRepository.findAll(); assertThat(films).hasSize(databaseSizeBeforeCreate + 1); Film testFilm = films.get(films.size() - 1); assertThat(testFilm.getTitle()).isEqualTo(DEFAULT_TITLE); assertThat(testFilm.getYear()).isEqualTo(DEFAULT_YEAR); } @Test @Transactional public void checkTitleIsRequired() throws Exception { int databaseSizeBeforeTest = filmRepository.findAll().size(); // set the field null film.setTitle(null); // Create the Film, which fails. FilmDTO filmDTO = filmMapper.filmToFilmDTO(film); restFilmMockMvc.perform(post("/api/films") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(filmDTO))) .andExpect(status().isBadRequest()); List<Film> films = filmRepository.findAll(); assertThat(films).hasSize(databaseSizeBeforeTest); } @Test @Transactional public void checkYearIsRequired() throws Exception { int databaseSizeBeforeTest = filmRepository.findAll().size(); // set the field null film.setYear(null); // Create the Film, which fails. FilmDTO filmDTO = filmMapper.filmToFilmDTO(film); restFilmMockMvc.perform(post("/api/films") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(filmDTO))) .andExpect(status().isBadRequest()); List<Film> films = filmRepository.findAll(); assertThat(films).hasSize(databaseSizeBeforeTest); } @Test @Transactional public void getAllFilms() throws Exception { // Initialize the database filmRepository.saveAndFlush(film); // Get all the films restFilmMockMvc.perform(get("/api/films?sort=id,desc")) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].id").value(hasItem(film.getId().intValue()))) .andExpect(jsonPath("$.[*].title").value(hasItem(DEFAULT_TITLE.toString()))) .andExpect(jsonPath("$.[*].year").value(hasItem(DEFAULT_YEAR))); } @Test @Transactional public void getFilm() throws Exception { // Initialize the database filmRepository.saveAndFlush(film); // Get the film restFilmMockMvc.perform(get("/api/films/{id}", film.getId())) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.id").value(film.getId().intValue())) .andExpect(jsonPath("$.title").value(DEFAULT_TITLE.toString())) .andExpect(jsonPath("$.year").value(DEFAULT_YEAR)); } @Test @Transactional public void getNonExistingFilm() throws Exception { // Get the film restFilmMockMvc.perform(get("/api/films/{id}", Long.MAX_VALUE)) .andExpect(status().isNotFound()); } @Test @Transactional public void updateFilm() throws Exception { // Initialize the database filmRepository.saveAndFlush(film); int databaseSizeBeforeUpdate = filmRepository.findAll().size(); // Update the film Film updatedFilm = filmRepository.findOne(film.getId()); updatedFilm .title(UPDATED_TITLE) .year(UPDATED_YEAR); FilmDTO filmDTO = filmMapper.filmToFilmDTO(updatedFilm); restFilmMockMvc.perform(put("/api/films") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(filmDTO))) .andExpect(status().isOk()); // Validate the Film in the database List<Film> films = filmRepository.findAll(); assertThat(films).hasSize(databaseSizeBeforeUpdate); Film testFilm = films.get(films.size() - 1); assertThat(testFilm.getTitle()).isEqualTo(UPDATED_TITLE); assertThat(testFilm.getYear()).isEqualTo(UPDATED_YEAR); } @Test @Transactional public void deleteFilm() throws Exception { // Initialize the database filmRepository.saveAndFlush(film); int databaseSizeBeforeDelete = filmRepository.findAll().size(); // Get the film restFilmMockMvc.perform(delete("/api/films/{id}", film.getId()) .accept(TestUtil.APPLICATION_JSON_UTF8)) .andExpect(status().isOk()); // Validate the database is empty List<Film> films = filmRepository.findAll(); assertThat(films).hasSize(databaseSizeBeforeDelete - 1); } }
[ "jorgerod84@gmail.com" ]
jorgerod84@gmail.com
afbe1bf8b75449ce2151c0dd21a58cff68c40409
e9da33e1e8795c5f5e8f524858c1a8ce73309c3f
/net/src/main/java/ru/finance2/simplecrmandroid/net/OneWayEntityNetClient.java
a166e326cd80c9a97ceadcde6f568f8cb9759869
[]
no_license
Alexey2FC/SyncExample-android-
985a7e24d22d5fbfd38b0b72e94d89408a1007c6
806a9163594a237747e50440d91b4bb6a20ad19f
refs/heads/master
2020-12-10T03:25:54.222224
2017-06-27T12:07:25
2017-06-27T12:08:31
95,554,071
0
0
null
null
null
null
UTF-8
Java
false
false
821
java
package ru.finance2.simplecrmandroid.net; import com.google.gson.JsonObject; import java.io.IOException; import java.util.List; import retrofit2.Call; public class OneWayEntityNetClient extends BasicNetClient<TwoWaysEntitiesAPI> { public OneWayEntityNetClient(String baseUrl, String token) { super(baseUrl, token, TwoWaysEntitiesAPI.class); } public List<JsonObject> getEntities() throws IOException { Call<List<JsonObject>> call = api.getEntities(); return fillResultOrError(call); } public static void main(String[] args) throws IOException { OneWayEntityNetClient client = new OneWayEntityNetClient("http://192.168.1.38/one-way-entity-sync-api/", "1"); List<JsonObject> entities = client.getEntities(); System.out.println(entities); } }
[ "admin@example.com" ]
admin@example.com
5ead8914a1545ce658619ce97f06e9767680e979
2ec3da3924d4c9473f66a3a2e00c3d9ee1b1962f
/src/Json/JSONWriter.java
73baab58ee39349e59c6a7aec0e8b3becb39ad0f
[ "JSON" ]
permissive
Baldomo/Dallaz
79820409272cc7a110c40afdd8feb7599a21f947
bf04ffee3f74e7dc9e74f737dfd46403ec0a9f99
refs/heads/master
2021-01-20T09:57:17.891831
2017-05-04T21:16:08
2017-05-04T21:16:08
90,310,051
0
0
null
null
null
null
UTF-8
Java
false
false
10,339
java
package Json; import java.io.IOException; /* Copyright (c) 2006 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The Software shall be used for Good, not Evil. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** * JSONWriter provides a quick and convenient way of producing JSON text. * The texts produced strictly conform to JSON syntax rules. No whitespace is * added, so the results are ready for transmission or storage. Each instance of * JSONWriter can produce one JSON text. * <p> * A JSONWriter instance provides a <code>value</code> method for appending * values to the * text, and a <code>key</code> * method for adding keys before values in objects. There are <code>array</code> * and <code>endArray</code> methods that make and bound array values, and * <code>object</code> and <code>endObject</code> methods which make and bound * object values. All of these methods return the JSONWriter instance, * permitting a cascade style. For example, <pre> * new JSONWriter(myWriter) * .object() * .key("JSON") * .value("Hello, World!") * .endObject();</pre> which writes <pre> * {"JSON":"Hello, World!"}</pre> * <p> * The first method called must be <code>array</code> or <code>object</code>. * There are no methods for adding commas or colons. JSONWriter adds them for * you. Objects and arrays can be nested up to 200 levels deep. * <p> * This can sometimes be easier than using a JSONObject to build a string. * @author JSON.org * @version 2016-08-08 */ public class JSONWriter { private static final int maxdepth = 200; /** * The comma flag determines if a comma should be output before the next * value. */ private boolean comma; /** * The current mode. Values: * 'a' (array), * 'd' (done), * 'i' (initial), * 'k' (key), * 'o' (object). */ protected char mode; /** * The object/array stack. */ private final JSONObject stack[]; /** * The stack top index. A value of 0 indicates that the stack is empty. */ private int top; /** * The writer that will receive the output. */ protected Appendable writer; /** * Make a fresh JSONWriter. It can be used to build one JSON text. */ public JSONWriter(Appendable w) { this.comma = false; this.mode = 'i'; this.stack = new JSONObject[maxdepth]; this.top = 0; this.writer = w; } /** * Append a value. * @param string A string value. * @return this * @throws JSONException If the value is out of sequence. */ private JSONWriter append(String string) throws JSONException { if (string == null) { throw new JSONException("Null pointer"); } if (this.mode == 'o' || this.mode == 'a') { try { if (this.comma && this.mode == 'a') { this.writer.append(','); } this.writer.append(string); } catch (IOException e) { throw new JSONException(e); } if (this.mode == 'o') { this.mode = 'k'; } this.comma = true; return this; } throw new JSONException("Value out of sequence."); } /** * Begin appending a new array. All values until the balancing * <code>endArray</code> will be appended to this array. The * <code>endArray</code> method must be called to mark the array's end. * @return this * @throws JSONException If the nesting is too deep, or if the object is * started in the wrong place (for example as a key or after the end of the * outermost array or object). */ public JSONWriter array() throws JSONException { if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') { this.push(null); this.append("["); this.comma = false; return this; } throw new JSONException("Misplaced array."); } /** * End something. * @param mode Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char mode, char c) throws JSONException { if (this.mode != mode) { throw new JSONException(mode == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(mode); try { this.writer.append(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; } /** * End an array. This method most be called to balance calls to * <code>array</code>. * @return this * @throws JSONException If incorrectly nested. */ public JSONWriter endArray() throws JSONException { return this.end('a', ']'); } /** * End an object. This method most be called to balance calls to * <code>object</code>. * @return this * @throws JSONException If incorrectly nested. */ public JSONWriter endObject() throws JSONException { return this.end('k', '}'); } /** * Append a key. The key will be associated with the next value. In an * object, every value must be preceded by a key. * @param string A key string. * @return this * @throws JSONException If the key is out of place. For example, keys * do not belong in arrays or if the key is null. */ public JSONWriter key(String string) throws JSONException { if (string == null) { throw new JSONException("Null key."); } if (this.mode == 'k') { try { this.stack[this.top - 1].putOnce(string, Boolean.TRUE); if (this.comma) { this.writer.append(','); } this.writer.append(JSONObject.quote(string)); this.writer.append(':'); this.comma = false; this.mode = 'o'; return this; } catch (IOException e) { throw new JSONException(e); } } throw new JSONException("Misplaced key."); } /** * Begin appending a new object. All keys and values until the balancing * <code>endObject</code> will be appended to this object. The * <code>endObject</code> method must be called to mark the object's end. * @return this * @throws JSONException If the nesting is too deep, or if the object is * started in the wrong place (for example as a key or after the end of the * outermost array or object). */ public JSONWriter object() throws JSONException { if (this.mode == 'i') { this.mode = 'o'; } if (this.mode == 'o' || this.mode == 'a') { this.append("{"); this.push(new JSONObject()); this.comma = false; return this; } throw new JSONException("Misplaced object."); } /** * Pop an array or object scope. * @param c The scope to close. * @throws JSONException If nesting is wrong. */ private void pop(char c) throws JSONException { if (this.top <= 0) { throw new JSONException("Nesting error."); } char m = this.stack[this.top - 1] == null ? 'a' : 'k'; if (m != c) { throw new JSONException("Nesting error."); } this.top -= 1; this.mode = this.top == 0 ? 'd' : this.stack[this.top - 1] == null ? 'a' : 'k'; } /** * Push an array or object scope. * @param jo The scope to open. * @throws JSONException If nesting is too deep. */ private void push(JSONObject jo) throws JSONException { if (this.top >= maxdepth) { throw new JSONException("Nesting too deep."); } this.stack[this.top] = jo; this.mode = jo == null ? 'a' : 'k'; this.top += 1; } /** * Append either the value <code>true</code> or the value * <code>false</code>. * @param b A boolean. * @return this * @throws JSONException */ public JSONWriter value(boolean b) throws JSONException { return this.append(b ? "true" : "false"); } /** * Append a double value. * @param d A double. * @return this * @throws JSONException If the number is not finite. */ public JSONWriter value(double d) throws JSONException { return this.value(new Double(d)); } /** * Append a long value. * @param l A long. * @return this * @throws JSONException */ public JSONWriter value(long l) throws JSONException { return this.append(Long.toString(l)); } /** * Append an object value. * @param object The object to append. It can be null, or a Boolean, Number, * String, JSONObject, or JSONArray, or an object that implements JSONString. * @return this * @throws JSONException If the value is out of sequence. */ public JSONWriter value(Object object) throws JSONException { return this.append(JSONObject.valueToString(object)); } }
[ "leobaldin.2000@gmail.com" ]
leobaldin.2000@gmail.com
e31a5ea2a7cb17b60ffdf29b320d54b3f8c61884
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/hu/akarnokd/rxjava2/operators/BasicMergeSubscription.java
800d2f8db2fda7a7fe4f7822fab0719f60fb0827
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
5,854
java
package hu.akarnokd.rxjava2.operators; import a2.b.a.a.a; import io.reactivex.internal.fuseable.SimpleQueue; import io.reactivex.internal.subscribers.InnerQueuedSubscriber; import io.reactivex.internal.subscribers.InnerQueuedSubscriberSupport; import io.reactivex.internal.subscriptions.EmptySubscription; import io.reactivex.internal.subscriptions.SubscriptionHelper; import io.reactivex.internal.util.AtomicThrowable; import io.reactivex.internal.util.BackpressureHelper; import io.reactivex.parallel.ParallelFlowable; import io.reactivex.plugins.RxJavaPlugins; import java.util.Arrays; import java.util.Comparator; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import org.reactivestreams.Publisher; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; public final class BasicMergeSubscription<T> extends AtomicInteger implements Subscription, InnerQueuedSubscriberSupport<T> { private static final long serialVersionUID = -8467324377226330554L; public final Subscriber<? super T> a; public final Comparator<? super T> b; public final InnerQueuedSubscriber<T>[] c; public final boolean d; public final AtomicThrowable e; public final AtomicLong f; public final Object[] g; public volatile boolean h; public BasicMergeSubscription(Subscriber<? super T> subscriber, Comparator<? super T> comparator, int i, int i2, boolean z) { this.a = subscriber; this.b = comparator; this.d = z; InnerQueuedSubscriber<T>[] innerQueuedSubscriberArr = new InnerQueuedSubscriber[i]; for (int i3 = 0; i3 < i; i3++) { innerQueuedSubscriberArr[i3] = new InnerQueuedSubscriber<>(this, i2); } this.c = innerQueuedSubscriberArr; this.f = new AtomicLong(); this.e = new AtomicThrowable(); this.g = new Object[i]; } public void a() { Arrays.fill(this.g, this); InnerQueuedSubscriber<T>[] innerQueuedSubscriberArr = this.c; for (InnerQueuedSubscriber<T> innerQueuedSubscriber : innerQueuedSubscriberArr) { innerQueuedSubscriber.cancel(); SimpleQueue<T> queue = innerQueuedSubscriber.queue(); if (queue != null) { queue.clear(); } } } public void b() { Arrays.fill(this.g, this); for (InnerQueuedSubscriber<T> innerQueuedSubscriber : this.c) { SimpleQueue<T> queue = innerQueuedSubscriber.queue(); if (queue != null) { queue.clear(); } } } @Override // org.reactivestreams.Subscription public void cancel() { if (!this.h) { this.h = true; for (InnerQueuedSubscriber<T> innerQueuedSubscriber : this.c) { innerQueuedSubscriber.cancel(); } if (getAndIncrement() == 0) { b(); } } } /* JADX DEBUG: Failed to insert an additional move for type inference into block B:131:0x00cf */ /* JADX WARNING: Code restructure failed: missing block: B:42:0x00a4, code lost: if (r0 != r26) goto L_0x00a6; */ /* JADX WARNING: Removed duplicated region for block: B:133:0x00cf A[SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:47:0x00ad A[SYNTHETIC, Splitter:B:47:0x00ad] */ /* JADX WARNING: Removed duplicated region for block: B:56:0x00cc */ @Override // io.reactivex.internal.subscribers.InnerQueuedSubscriberSupport /* Code decompiled incorrectly, please refer to instructions dump. */ public void drain() { /* // Method dump skipped, instructions count: 402 */ throw new UnsupportedOperationException("Method not decompiled: hu.akarnokd.rxjava2.operators.BasicMergeSubscription.drain():void"); } @Override // io.reactivex.internal.subscribers.InnerQueuedSubscriberSupport public void innerComplete(InnerQueuedSubscriber<T> innerQueuedSubscriber) { innerQueuedSubscriber.setDone(); drain(); } @Override // io.reactivex.internal.subscribers.InnerQueuedSubscriberSupport public void innerError(InnerQueuedSubscriber<T> innerQueuedSubscriber, Throwable th) { if (this.e.addThrowable(th)) { if (!this.d) { for (InnerQueuedSubscriber<T> innerQueuedSubscriber2 : this.c) { innerQueuedSubscriber2.cancel(); } } else { innerQueuedSubscriber.setDone(); } drain(); return; } RxJavaPlugins.onError(th); } @Override // io.reactivex.internal.subscribers.InnerQueuedSubscriberSupport public void innerNext(InnerQueuedSubscriber<T> innerQueuedSubscriber, T t) { innerQueuedSubscriber.queue().offer(t); drain(); } @Override // org.reactivestreams.Subscription public void request(long j) { if (SubscriptionHelper.validate(j)) { BackpressureHelper.add(this.f, j); drain(); } } public void subscribe(Publisher<T>[] publisherArr, int i) { InnerQueuedSubscriber<T>[] innerQueuedSubscriberArr = this.c; for (int i2 = 0; i2 < i && !this.h; i2++) { Publisher<T> publisher = publisherArr[i2]; if (publisher != null) { publisher.subscribe(innerQueuedSubscriberArr[i2]); } else { EmptySubscription.error(new NullPointerException(a.Q2("The ", i2, "th source is null")), innerQueuedSubscriberArr[i2]); if (!this.d) { return; } } } } public void subscribe(ParallelFlowable<T> parallelFlowable) { parallelFlowable.subscribe(this.c); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
5e01a263a121b87aa1ad2d7684cd76ca667d9b05
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/61803/src_1.java
99c4ebf932beed17a7d90819e68b015ae8e56f95
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
95,397
java
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.core; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.StringReader; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.eclipse.core.resources.ICommand; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IProjectNature; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Preferences; import org.eclipse.core.runtime.QualifiedName; import org.eclipse.jdt.core.IClasspathContainer; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaModelMarker; import org.eclipse.jdt.core.IJavaModelStatus; import org.eclipse.jdt.core.IJavaModelStatusConstants; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.IRegion; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.WorkingCopyOwner; import org.eclipse.jdt.core.eval.IEvaluationContext; import org.eclipse.jdt.internal.codeassist.ISearchableNameEnvironment; import org.eclipse.jdt.internal.compiler.util.ObjectVector; import org.eclipse.jdt.internal.compiler.util.SuffixConstants; import org.eclipse.jdt.internal.core.eval.EvaluationContextWrapper; import org.eclipse.jdt.internal.core.util.MementoTokenizer; import org.eclipse.jdt.internal.core.util.Util; import org.eclipse.jdt.internal.eval.EvaluationContext; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; import org.xml.sax.SAXException; /** * Handle for a Java Project. * * <p>A Java Project internally maintains a devpath that corresponds * to the project's classpath. The classpath may include source folders * from the current project; jars in the current project, other projects, * and the local file system; and binary folders (output location) of other * projects. The Java Model presents source elements corresponding to output * .class files in other projects, and thus uses the devpath rather than * the classpath (which is really a compilation path). The devpath mimics * the classpath, except has source folder entries in place of output * locations in external projects. * * <p>Each JavaProject has a NameLookup facility that locates elements * on by name, based on the devpath. * * @see IJavaProject */ public class JavaProject extends Openable implements IJavaProject, IProjectNature, SuffixConstants { /** * Whether the underlying file system is case sensitive. */ protected static final boolean IS_CASE_SENSITIVE = !new File("Temp").equals(new File("temp")); //$NON-NLS-1$ //$NON-NLS-2$ /** * An empty array of strings indicating that a project doesn't have any prerequesite projects. */ protected static final String[] NO_PREREQUISITES = new String[0]; /** * The platform project this <code>IJavaProject</code> is based on */ protected IProject project; /** * Name of file containing project classpath */ public static final String CLASSPATH_FILENAME = ".classpath"; //$NON-NLS-1$ /** * Name of file containing custom project preferences */ public static final String PREF_FILENAME = ".jprefs"; //$NON-NLS-1$ /** * Value of the project's raw classpath if the .classpath file contains invalid entries. */ public static final IClasspathEntry[] INVALID_CLASSPATH = new IClasspathEntry[0]; private static final String CUSTOM_DEFAULT_OPTION_VALUE = "#\r\n\r#custom-non-empty-default-value#\r\n\r#"; //$NON-NLS-1$ /** * Returns a canonicalized path from the given external path. * Note that the return path contains the same number of segments * and it contains a device only if the given path contained one. * @param externalPath IPath * @see java.io.File for the definition of a canonicalized path * @return IPath */ public static IPath canonicalizedPath(IPath externalPath) { if (externalPath == null) return null; // if (JavaModelManager.VERBOSE) { // System.out.println("JAVA MODEL - Canonicalizing " + externalPath.toString()); //$NON-NLS-1$ // } if (IS_CASE_SENSITIVE) { // if (JavaModelManager.VERBOSE) { // System.out.println("JAVA MODEL - Canonical path is original path (file system is case sensitive)"); //$NON-NLS-1$ // } return externalPath; } // if not external path, return original path IWorkspace workspace = ResourcesPlugin.getWorkspace(); if (workspace == null) return externalPath; // protection during shutdown (30487) if (workspace.getRoot().findMember(externalPath) != null) { // if (JavaModelManager.VERBOSE) { // System.out.println("JAVA MODEL - Canonical path is original path (member of workspace)"); //$NON-NLS-1$ // } return externalPath; } IPath canonicalPath = null; try { canonicalPath = new Path(new File(externalPath.toOSString()).getCanonicalPath()); } catch (IOException e) { // default to original path // if (JavaModelManager.VERBOSE) { // System.out.println("JAVA MODEL - Canonical path is original path (IOException)"); //$NON-NLS-1$ // } return externalPath; } IPath result; int canonicalLength = canonicalPath.segmentCount(); if (canonicalLength == 0) { // the java.io.File canonicalization failed // if (JavaModelManager.VERBOSE) { // System.out.println("JAVA MODEL - Canonical path is original path (canonical path is empty)"); //$NON-NLS-1$ // } return externalPath; } else if (externalPath.isAbsolute()) { result = canonicalPath; } else { // if path is relative, remove the first segments that were added by the java.io.File canonicalization // e.g. 'lib/classes.zip' was converted to 'd:/myfolder/lib/classes.zip' int externalLength = externalPath.segmentCount(); if (canonicalLength >= externalLength) { result = canonicalPath.removeFirstSegments(canonicalLength - externalLength); } else { // if (JavaModelManager.VERBOSE) { // System.out.println("JAVA MODEL - Canonical path is original path (canonical path is " + canonicalPath.toString() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ // } return externalPath; } } // keep device only if it was specified (this is because File.getCanonicalPath() converts '/lib/classed.zip' to 'd:/lib/classes/zip') if (externalPath.getDevice() == null) { result = result.setDevice(null); } // if (JavaModelManager.VERBOSE) { // System.out.println("JAVA MODEL - Canonical path is " + result.toString()); //$NON-NLS-1$ // } return result; } /** * Constructor needed for <code>IProject.getNature()</code> and <code>IProject.addNature()</code>. * * @see #setProject(IProject) */ public JavaProject() { super(null, null); } public JavaProject(IProject project, JavaElement parent) { super(parent, project.getName()); this.project = project; } /** * Adds a builder to the build spec for the given project. */ protected void addToBuildSpec(String builderID) throws CoreException { IProjectDescription description = this.project.getDescription(); ICommand javaCommand = getJavaCommand(description); if (javaCommand == null) { // Add a Java command to the build spec ICommand command = description.newCommand(); command.setBuilderName(builderID); setJavaCommand(description, command); } } /** * @see Openable */ protected boolean buildStructure(OpenableElementInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource) throws JavaModelException { // check whether the java project can be opened if (!underlyingResource.isAccessible()) { throw newNotPresentException(); } IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceRoot wRoot = workspace.getRoot(); // cannot refresh cp markers on opening (emulate cp check on startup) since can create deadlocks (see bug 37274) IClasspathEntry[] resolvedClasspath = getResolvedClasspath(true/*ignore unresolved variable*/); // compute the pkg fragment roots info.setChildren(computePackageFragmentRoots(resolvedClasspath, false)); // remember the timestamps of external libraries the first time they are looked up for (int i = 0, length = resolvedClasspath.length; i < length; i++) { IClasspathEntry entry = resolvedClasspath[i]; if (entry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) { IPath path = entry.getPath(); Object target = JavaModel.getTarget(wRoot, path, true); if (target instanceof java.io.File) { Map externalTimeStamps = JavaModelManager.getJavaModelManager().deltaState.externalTimeStamps; if (externalTimeStamps.get(path) == null) { long timestamp = DeltaProcessor.getTimeStamp((java.io.File)target); externalTimeStamps.put(path, new Long(timestamp)); } } } } return true; } protected void closing(Object info) { // forget source attachment recommendations Object[] children = ((JavaElementInfo)info).children; for (int i = 0, length = children.length; i < length; i++) { Object child = children[i]; if (child instanceof JarPackageFragmentRoot){ ((JarPackageFragmentRoot)child).setSourceAttachmentProperty(null); } } super.closing(info); } /** * Computes the collection of package fragment roots (local ones) and set it on the given info. * Need to check *all* package fragment roots in order to reset NameLookup * @param info JavaProjectElementInfo * @throws JavaModelException */ public void computeChildren(JavaProjectElementInfo info) throws JavaModelException { IClasspathEntry[] classpath = getResolvedClasspath(true); IPackageFragmentRoot[] oldRoots = info.allPkgFragmentRootsCache; if (oldRoots != null) { IPackageFragmentRoot[] newRoots = computePackageFragmentRoots(classpath, true); checkIdentical: { // compare all pkg fragment root lists if (oldRoots.length == newRoots.length){ for (int i = 0, length = oldRoots.length; i < length; i++){ if (!oldRoots[i].equals(newRoots[i])){ break checkIdentical; } } return; // no need to update } } } info.resetCaches(); // discard caches (hold onto roots and pkg fragments) info.setNonJavaResources(null); info.setChildren( computePackageFragmentRoots(classpath, false)); } /** * Internal computation of an expanded classpath. It will eliminate duplicates, and produce copies * of exported classpath entries to avoid possible side-effects ever after. */ private void computeExpandedClasspath( JavaProject initialProject, boolean ignoreUnresolvedVariable, boolean generateMarkerOnError, HashSet rootIDs, ObjectVector accumulatedEntries, Map preferredClasspaths, Map preferredOutputs) throws JavaModelException { // for the project we add this, in case the project is its own source folder. // we don't want the recursion to end if the source folder has been added // so we might add it as a rootID and as a project if (rootIDs.contains(this)){ return; // break cycles if any } rootIDs.add(this); IClasspathEntry[] preferredClasspath = preferredClasspaths != null ? (IClasspathEntry[])preferredClasspaths.get(this) : null; IPath preferredOutput = preferredOutputs != null ? (IPath)preferredOutputs.get(this) : null; IClasspathEntry[] immediateClasspath = preferredClasspath != null ? getResolvedClasspath(preferredClasspath, preferredOutput, ignoreUnresolvedVariable, generateMarkerOnError, null) : getResolvedClasspath(ignoreUnresolvedVariable, generateMarkerOnError); IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); boolean isInitialProject = this.equals(initialProject); for (int i = 0, length = immediateClasspath.length; i < length; i++){ ClasspathEntry entry = (ClasspathEntry) immediateClasspath[i]; if (isInitialProject || entry.isExported()){ String rootID = entry.rootID(); if (rootIDs.contains(rootID)) { continue; } accumulatedEntries.add(entry); rootIDs.add(rootID); // recurse in project to get all its indirect exports (only consider exported entries from there on) if (entry.getEntryKind() == IClasspathEntry.CPE_PROJECT) { IResource member = workspaceRoot.findMember(entry.getPath()); if (member != null && member.getType() == IResource.PROJECT){ // double check if bound to project (23977) IProject projRsc = (IProject) member; if (JavaProject.hasJavaNature(projRsc)) { JavaProject javaProject = (JavaProject) JavaCore.create(projRsc); javaProject.computeExpandedClasspath( initialProject, ignoreUnresolvedVariable, false /* no marker when recursing in prereq*/, rootIDs, accumulatedEntries, preferredClasspaths, preferredOutputs); } } } } } } /** * Returns (local/all) the package fragment roots identified by the given project's classpath. * Note: this follows project classpath references to find required project contributions, * eliminating duplicates silently. * Only works with resolved entries * @param resolvedClasspath IClasspathEntry[] * @param retrieveExportedRoots boolean * @return IPackageFragmentRoot[] * @throws JavaModelException */ public IPackageFragmentRoot[] computePackageFragmentRoots(IClasspathEntry[] resolvedClasspath, boolean retrieveExportedRoots) throws JavaModelException { ObjectVector accumulatedRoots = new ObjectVector(); computePackageFragmentRoots( resolvedClasspath, accumulatedRoots, new HashSet(5), // rootIDs true, // inside original project true, // check existency retrieveExportedRoots); IPackageFragmentRoot[] rootArray = new IPackageFragmentRoot[accumulatedRoots.size()]; accumulatedRoots.copyInto(rootArray); return rootArray; } /** * Computes the package fragment roots identified by the given entry. * Only works with resolved entry * @param resolvedEntry IClasspathEntry * @return IPackageFragmentRoot[] */ public IPackageFragmentRoot[] computePackageFragmentRoots(IClasspathEntry resolvedEntry) { try { return computePackageFragmentRoots( new IClasspathEntry[]{ resolvedEntry }, false // don't retrieve exported roots ); } catch (JavaModelException e) { return new IPackageFragmentRoot[] {}; } } /** * Returns the package fragment roots identified by the given entry. In case it refers to * a project, it will follow its classpath so as to find exported roots as well. * Only works with resolved entry * @param resolvedEntry IClasspathEntry * @param accumulatedRoots ObjectVector * @param rootIDs HashSet * @param insideOriginalProject boolean * @param checkExistency boolean * @param retrieveExportedRoots boolean * @throws JavaModelException */ public void computePackageFragmentRoots( IClasspathEntry resolvedEntry, ObjectVector accumulatedRoots, HashSet rootIDs, boolean insideOriginalProject, boolean checkExistency, boolean retrieveExportedRoots) throws JavaModelException { String rootID = ((ClasspathEntry)resolvedEntry).rootID(); if (rootIDs.contains(rootID)) return; IPath projectPath = this.project.getFullPath(); IPath entryPath = resolvedEntry.getPath(); IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); switch(resolvedEntry.getEntryKind()){ // source folder case IClasspathEntry.CPE_SOURCE : if (projectPath.isPrefixOf(entryPath)){ if (checkExistency) { Object target = JavaModel.getTarget(workspaceRoot, entryPath, checkExistency); if (target == null) return; if (target instanceof IFolder || target instanceof IProject){ accumulatedRoots.add( getPackageFragmentRoot((IResource)target)); rootIDs.add(rootID); } } else { IPackageFragmentRoot root = getFolderPackageFragmentRoot(entryPath); if (root != null) { accumulatedRoots.add(root); rootIDs.add(rootID); } } } break; // internal/external JAR or folder case IClasspathEntry.CPE_LIBRARY : if (!insideOriginalProject && !resolvedEntry.isExported()) return; if (checkExistency) { Object target = JavaModel.getTarget(workspaceRoot, entryPath, checkExistency); if (target == null) return; if (target instanceof IResource){ // internal target IResource resource = (IResource) target; IPackageFragmentRoot root = getPackageFragmentRoot(resource); if (root != null) { accumulatedRoots.add(root); rootIDs.add(rootID); } } else { // external target - only JARs allowed if (((java.io.File)target).isFile() && (org.eclipse.jdt.internal.compiler.util.Util.isArchiveFileName(entryPath.lastSegment()))) { accumulatedRoots.add( new JarPackageFragmentRoot(entryPath, this)); rootIDs.add(rootID); } } } else { IPackageFragmentRoot root = getPackageFragmentRoot(entryPath); if (root != null) { accumulatedRoots.add(root); rootIDs.add(rootID); } } break; // recurse into required project case IClasspathEntry.CPE_PROJECT : if (!retrieveExportedRoots) return; if (!insideOriginalProject && !resolvedEntry.isExported()) return; IResource member = workspaceRoot.findMember(entryPath); if (member != null && member.getType() == IResource.PROJECT){// double check if bound to project (23977) IProject requiredProjectRsc = (IProject) member; if (JavaProject.hasJavaNature(requiredProjectRsc)){ // special builder binary output rootIDs.add(rootID); JavaProject requiredProject = (JavaProject)JavaCore.create(requiredProjectRsc); requiredProject.computePackageFragmentRoots( requiredProject.getResolvedClasspath(true), accumulatedRoots, rootIDs, false, checkExistency, retrieveExportedRoots); } break; } } } /** * Returns (local/all) the package fragment roots identified by the given project's classpath. * Note: this follows project classpath references to find required project contributions, * eliminating duplicates silently. * Only works with resolved entries * @param resolvedClasspath IClasspathEntry[] * @param accumulatedRoots ObjectVector * @param rootIDs HashSet * @param insideOriginalProject boolean * @param checkExistency boolean * @param retrieveExportedRoots boolean * @throws JavaModelException */ public void computePackageFragmentRoots( IClasspathEntry[] resolvedClasspath, ObjectVector accumulatedRoots, HashSet rootIDs, boolean insideOriginalProject, boolean checkExistency, boolean retrieveExportedRoots) throws JavaModelException { if (insideOriginalProject){ rootIDs.add(rootID()); } for (int i = 0, length = resolvedClasspath.length; i < length; i++){ computePackageFragmentRoots( resolvedClasspath[i], accumulatedRoots, rootIDs, insideOriginalProject, checkExistency, retrieveExportedRoots); } } /** * Compute the file name to use for a given shared property * @param qName QualifiedName * @return String */ public String computeSharedPropertyFileName(QualifiedName qName) { return '.' + qName.getLocalName(); } /** * Configure the project with Java nature. */ public void configure() throws CoreException { // register Java builder addToBuildSpec(JavaCore.BUILDER_ID); } /* * Returns whether the given resource is accessible through the children or the non-Java resources of this project. * Returns true if the resource is not in the project. * Assumes that the resource is a folder or a file. */ public boolean contains(IResource resource) { IClasspathEntry[] classpath; IPath output; try { classpath = getResolvedClasspath(true); output = getOutputLocation(); } catch (JavaModelException e) { return false; } IPath fullPath = resource.getFullPath(); IPath innerMostOutput = output.isPrefixOf(fullPath) ? output : null; IClasspathEntry innerMostEntry = null; for (int j = 0, cpLength = classpath.length; j < cpLength; j++) { IClasspathEntry entry = classpath[j]; IPath entryPath = entry.getPath(); if ((innerMostEntry == null || innerMostEntry.getPath().isPrefixOf(entryPath)) && entryPath.isPrefixOf(fullPath)) { innerMostEntry = entry; } IPath entryOutput = classpath[j].getOutputLocation(); if (entryOutput != null && entryOutput.isPrefixOf(fullPath)) { innerMostOutput = entryOutput; } } if (innerMostEntry != null) { // special case prj==src and nested output location if (innerMostOutput != null && innerMostOutput.segmentCount() > 1 // output isn't project && innerMostEntry.getPath().segmentCount() == 1) { // 1 segment must be project name return false; } if (resource instanceof IFolder) { // folders are always included in src/lib entries return true; } switch (innerMostEntry.getEntryKind()) { case IClasspathEntry.CPE_SOURCE: // .class files are not visible in source folders return !org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(fullPath.lastSegment()); case IClasspathEntry.CPE_LIBRARY: // .java files are not visible in library folders return !org.eclipse.jdt.internal.compiler.util.Util.isJavaFileName(fullPath.lastSegment()); } } if (innerMostOutput != null) { return false; } return true; } /** * Record a new marker denoting a classpath problem */ void createClasspathProblemMarker(IJavaModelStatus status) { IMarker marker = null; int severity; String[] arguments = new String[0]; boolean isCycleProblem = false, isClasspathFileFormatProblem = false; switch (status.getCode()) { case IJavaModelStatusConstants.CLASSPATH_CYCLE : isCycleProblem = true; if (JavaCore.ERROR.equals(getOption(JavaCore.CORE_CIRCULAR_CLASSPATH, true))) { severity = IMarker.SEVERITY_ERROR; } else { severity = IMarker.SEVERITY_WARNING; } break; case IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT : isClasspathFileFormatProblem = true; severity = IMarker.SEVERITY_ERROR; break; case IJavaModelStatusConstants.INCOMPATIBLE_JDK_LEVEL : String setting = getOption(JavaCore.CORE_INCOMPATIBLE_JDK_LEVEL, true); if (JavaCore.ERROR.equals(setting)) { severity = IMarker.SEVERITY_ERROR; } else if (JavaCore.WARNING.equals(setting)) { severity = IMarker.SEVERITY_WARNING; } else { return; // setting == IGNORE } break; default: IPath path = status.getPath(); if (path != null) arguments = new String[] { path.toString() }; if (JavaCore.ERROR.equals(getOption(JavaCore.CORE_INCOMPLETE_CLASSPATH, true))) { severity = IMarker.SEVERITY_ERROR; } else { severity = IMarker.SEVERITY_WARNING; } break; } try { marker = this.project.createMarker(IJavaModelMarker.BUILDPATH_PROBLEM_MARKER); marker.setAttributes( new String[] { IMarker.MESSAGE, IMarker.SEVERITY, IMarker.LOCATION, IJavaModelMarker.CYCLE_DETECTED, IJavaModelMarker.CLASSPATH_FILE_FORMAT, IJavaModelMarker.ID, IJavaModelMarker.ARGUMENTS , }, new Object[] { status.getMessage(), new Integer(severity), Util.bind("classpath.buildPath"),//$NON-NLS-1$ isCycleProblem ? "true" : "false",//$NON-NLS-1$ //$NON-NLS-2$ isClasspathFileFormatProblem ? "true" : "false",//$NON-NLS-1$ //$NON-NLS-2$ new Integer(status.getCode()), Util.getProblemArgumentsForMarker(arguments) , } ); } catch (CoreException e) { // could not create marker: cannot do much if (JavaModelManager.VERBOSE) { e.printStackTrace(); } } } /** * Returns a new element info for this element. */ protected Object createElementInfo() { return new JavaProjectElementInfo(); } /** * Reads and decode an XML classpath string */ protected IClasspathEntry[] decodeClasspath(String xmlClasspath, boolean createMarker, boolean logProblems) { ArrayList paths = new ArrayList(); IClasspathEntry defaultOutput = null; try { if (xmlClasspath == null) return null; StringReader reader = new StringReader(xmlClasspath); Element cpElement; try { DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder(); cpElement = parser.parse(new InputSource(reader)).getDocumentElement(); } catch (SAXException e) { throw new IOException(Util.bind("file.badFormat")); //$NON-NLS-1$ } catch (ParserConfigurationException e) { throw new IOException(Util.bind("file.badFormat")); //$NON-NLS-1$ } finally { reader.close(); } if (!cpElement.getNodeName().equalsIgnoreCase("classpath")) { //$NON-NLS-1$ throw new IOException(Util.bind("file.badFormat")); //$NON-NLS-1$ } NodeList list = cpElement.getElementsByTagName("classpathentry"); //$NON-NLS-1$ int length = list.getLength(); for (int i = 0; i < length; ++i) { Node node = list.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { IClasspathEntry entry = ClasspathEntry.elementDecode((Element)node, this); if (entry != null){ if (entry.getContentKind() == ClasspathEntry.K_OUTPUT) { defaultOutput = entry; // separate output } else { paths.add(entry); } } } } } catch (IOException e) { // bad format if (createMarker && this.project.isAccessible()) { this.createClasspathProblemMarker(new JavaModelStatus( IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT, Util.bind("classpath.xmlFormatError", this.getElementName(), e.getMessage()))); //$NON-NLS-1$ } if (logProblems) { Util.log(e, "Exception while retrieving "+ this.getPath() //$NON-NLS-1$ +"/.classpath, will mark classpath as invalid"); //$NON-NLS-1$ } return INVALID_CLASSPATH; } catch (Assert.AssertionFailedException e) { // failed creating CP entries from file if (createMarker && this.project.isAccessible()) { this.createClasspathProblemMarker(new JavaModelStatus( IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT, Util.bind("classpath.illegalEntryInClasspathFile", this.getElementName(), e.getMessage()))); //$NON-NLS-1$ } if (logProblems) { Util.log(e, "Exception while retrieving "+ this.getPath() //$NON-NLS-1$ +"/.classpath, will mark classpath as invalid"); //$NON-NLS-1$ } return INVALID_CLASSPATH; } int pathSize = paths.size(); if (pathSize > 0 || defaultOutput != null) { IClasspathEntry[] entries = new IClasspathEntry[pathSize + (defaultOutput == null ? 0 : 1)]; paths.toArray(entries); if (defaultOutput != null) entries[pathSize] = defaultOutput; // ensure output is last item return entries; } else { return null; } } /** /** * Removes the Java nature from the project. */ public void deconfigure() throws CoreException { // deregister Java builder removeFromBuildSpec(JavaCore.BUILDER_ID); } /** * Returns a default class path. * This is the root of the project */ protected IClasspathEntry[] defaultClasspath() { return new IClasspathEntry[] { JavaCore.newSourceEntry(this.project.getFullPath())}; } /** * Returns a default output location. * This is the project bin folder */ protected IPath defaultOutputLocation() { return this.project.getFullPath().append("bin"); //$NON-NLS-1$ } /** * Returns the XML String encoding of the class path. */ protected String encodeClasspath(IClasspathEntry[] classpath, IPath outputLocation, boolean indent) throws JavaModelException { try { ByteArrayOutputStream s = new ByteArrayOutputStream(); OutputStreamWriter writer = new OutputStreamWriter(s, "UTF8"); //$NON-NLS-1$ XMLWriter xmlWriter = new XMLWriter(writer); xmlWriter.startTag("classpath", indent); //$NON-NLS-1$ for (int i = 0; i < classpath.length; ++i) { ((ClasspathEntry)classpath[i]).elementEncode(xmlWriter, this.project.getFullPath(), indent, true); } if (outputLocation != null) { outputLocation = outputLocation.removeFirstSegments(1); outputLocation = outputLocation.makeRelative(); HashMap parameters = new HashMap(); parameters.put("kind", ClasspathEntry.kindToString(ClasspathEntry.K_OUTPUT));//$NON-NLS-1$ parameters.put("path", String.valueOf(outputLocation));//$NON-NLS-1$ xmlWriter.printTag("classpathentry", parameters, indent, true, true);//$NON-NLS-1$ } xmlWriter.endTag("classpath", indent);//$NON-NLS-1$ writer.flush(); writer.close(); return s.toString("UTF8");//$NON-NLS-1$ } catch (IOException e) { throw new JavaModelException(e, IJavaModelStatusConstants.IO_EXCEPTION); } } /** * Returns true if this handle represents the same Java project * as the given handle. Two handles represent the same * project if they are identical or if they represent a project with * the same underlying resource and occurrence counts. * * @see JavaElement#equals(Object) */ public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof JavaProject)) return false; JavaProject other = (JavaProject) o; return this.project.equals(other.getProject()) && this.occurrenceCount == other.occurrenceCount; } public boolean exists() { return hasJavaNature(this.project); } /** * @see IJavaProject */ public IJavaElement findElement(IPath path) throws JavaModelException { return findElement(path, DefaultWorkingCopyOwner.PRIMARY); } /** * @see IJavaProject */ public IJavaElement findElement(IPath path, WorkingCopyOwner owner) throws JavaModelException { if (path == null || path.isAbsolute()) { throw new JavaModelException( new JavaModelStatus(IJavaModelStatusConstants.INVALID_PATH, path)); } try { String extension = path.getFileExtension(); if (extension == null) { String packageName = path.toString().replace(IPath.SEPARATOR, '.'); NameLookup lookup = newNameLookup((WorkingCopyOwner)null/*no need to look at working copies for pkgs*/); IPackageFragment[] pkgFragments = lookup.findPackageFragments(packageName, false); if (pkgFragments == null) { return null; } else { // try to return one that is a child of this project for (int i = 0, length = pkgFragments.length; i < length; i++) { IPackageFragment pkgFragment = pkgFragments[i]; if (this.equals(pkgFragment.getParent().getParent())) { return pkgFragment; } } // default to the first one return pkgFragments[0]; } } else if ( extension.equalsIgnoreCase(EXTENSION_java) || extension.equalsIgnoreCase(EXTENSION_class)) { IPath packagePath = path.removeLastSegments(1); String packageName = packagePath.toString().replace(IPath.SEPARATOR, '.'); String typeName = path.lastSegment(); typeName = typeName.substring(0, typeName.length() - extension.length() - 1); String qualifiedName = null; if (packageName.length() > 0) { qualifiedName = packageName + "." + typeName; //$NON-NLS-1$ } else { qualifiedName = typeName; } // lookup type NameLookup lookup = newNameLookup(owner); IType type = lookup.findType( qualifiedName, false, NameLookup.ACCEPT_CLASSES | NameLookup.ACCEPT_INTERFACES); if (type != null) { return type.getParent(); } else { return null; } } else { // unsupported extension return null; } } catch (JavaModelException e) { if (e.getStatus().getCode() == IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST) { return null; } else { throw e; } } } /** * @see IJavaProject */ public IPackageFragment findPackageFragment(IPath path) throws JavaModelException { return findPackageFragment0(JavaProject.canonicalizedPath(path)); } /* * non path canonicalizing version */ public IPackageFragment findPackageFragment0(IPath path) throws JavaModelException { NameLookup lookup = newNameLookup((WorkingCopyOwner)null/*no need to look at working copies for pkgs*/); return lookup.findPackageFragment(path); } /** * @see IJavaProject */ public IPackageFragmentRoot findPackageFragmentRoot(IPath path) throws JavaModelException { return findPackageFragmentRoot0(JavaProject.canonicalizedPath(path)); } /* * no path canonicalization */ public IPackageFragmentRoot findPackageFragmentRoot0(IPath path) throws JavaModelException { IPackageFragmentRoot[] allRoots = this.getAllPackageFragmentRoots(); if (!path.isAbsolute()) { throw new IllegalArgumentException(Util.bind("path.mustBeAbsolute")); //$NON-NLS-1$ } for (int i= 0; i < allRoots.length; i++) { IPackageFragmentRoot classpathRoot= allRoots[i]; if (classpathRoot.getPath().equals(path)) { return classpathRoot; } } return null; } /** * @see IJavaProject */ public IPackageFragmentRoot[] findPackageFragmentRoots(IClasspathEntry entry) { try { IClasspathEntry[] classpath = this.getRawClasspath(); for (int i = 0, length = classpath.length; i < length; i++) { if (classpath[i].equals(entry)) { // entry may need to be resolved return computePackageFragmentRoots( getResolvedClasspath(new IClasspathEntry[] {entry}, null, true, false, null/*no reverse map*/), false); // don't retrieve exported roots } } } catch (JavaModelException e) { // project doesn't exist: return an empty array } return new IPackageFragmentRoot[] {}; } /** * @see IJavaProject#findType(String) */ public IType findType(String fullyQualifiedName) throws JavaModelException { return findType(fullyQualifiedName, DefaultWorkingCopyOwner.PRIMARY); } /** * @see IJavaProject#findType(String, WorkingCopyOwner) */ public IType findType(String fullyQualifiedName, WorkingCopyOwner owner) throws JavaModelException { NameLookup lookup = newNameLookup(owner); IType type = lookup.findType( fullyQualifiedName, false, NameLookup.ACCEPT_CLASSES | NameLookup.ACCEPT_INTERFACES); if (type == null) { // try to find enclosing type int lastDot = fullyQualifiedName.lastIndexOf('.'); if (lastDot == -1) return null; type = this.findType(fullyQualifiedName.substring(0, lastDot)); if (type != null) { type = type.getType(fullyQualifiedName.substring(lastDot+1)); if (!type.exists()) { return null; } } } return type; } /** * @see IJavaProject#findType(String, String) */ public IType findType(String packageName, String typeQualifiedName) throws JavaModelException { return findType(packageName, typeQualifiedName, DefaultWorkingCopyOwner.PRIMARY); } /** * @see IJavaProject#findType(String, String, WorkingCopyOwner) */ public IType findType(String packageName, String typeQualifiedName, WorkingCopyOwner owner) throws JavaModelException { NameLookup lookup = newNameLookup(owner); return lookup.findType( typeQualifiedName, packageName, false, NameLookup.ACCEPT_CLASSES | NameLookup.ACCEPT_INTERFACES); } /** * Remove all markers denoting classpath problems */ //TODO (philippe) should improve to use a bitmask instead of booleans (CYCLE, FORMAT, VALID) protected void flushClasspathProblemMarkers(boolean flushCycleMarkers, boolean flushClasspathFormatMarkers) { try { if (this.project.isAccessible()) { IMarker[] markers = this.project.findMarkers(IJavaModelMarker.BUILDPATH_PROBLEM_MARKER, false, IResource.DEPTH_ZERO); for (int i = 0, length = markers.length; i < length; i++) { IMarker marker = markers[i]; if (flushCycleMarkers && flushClasspathFormatMarkers) { marker.delete(); } else { String cycleAttr = (String)marker.getAttribute(IJavaModelMarker.CYCLE_DETECTED); String classpathFileFormatAttr = (String)marker.getAttribute(IJavaModelMarker.CLASSPATH_FILE_FORMAT); if ((flushCycleMarkers == (cycleAttr != null && cycleAttr.equals("true"))) //$NON-NLS-1$ && (flushClasspathFormatMarkers == (classpathFileFormatAttr != null && classpathFileFormatAttr.equals("true")))){ //$NON-NLS-1$ marker.delete(); } } } } } catch (CoreException e) { // could not flush markers: not much we can do if (JavaModelManager.VERBOSE) { e.printStackTrace(); } } } /* * Force the project to reload its <code>.classpath</code> file from disk and update the classpath accordingly. * Usually, a change to the <code>.classpath</code> file is automatically noticed and reconciled at the next * resource change notification event. If required to consider such a change prior to the next automatic * refresh, then this functionnality should be used to trigger a refresh. In particular, if a change to the file is performed, * during an operation where this change needs to be reflected before the operation ends, then an explicit refresh is * necessary. * Note that classpath markers are NOT created. * * @param monitor a progress monitor for reporting operation progress * @exception JavaModelException if the classpath could not be updated. Reasons * include: * <ul> * <li> This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li> * <li> Two or more entries specify source roots with the same or overlapping paths (NAME_COLLISION) * <li> A entry of kind <code>CPE_PROJECT</code> refers to this project (INVALID_PATH) * <li>This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li> * <li>The output location path refers to a location not contained in this project (<code>PATH_OUTSIDE_PROJECT</code>) * <li>The output location path is not an absolute path (<code>RELATIVE_PATH</code>) * <li>The output location path is nested inside a package fragment root of this project (<code>INVALID_PATH</code>) * <li> The classpath is being modified during resource change event notification (CORE_EXCEPTION) * </ul> */ protected void forceClasspathReload(IProgressMonitor monitor) throws JavaModelException { if (monitor != null && monitor.isCanceled()) return; // check if any actual difference boolean wasSuccessful = false; // flag recording if .classpath file change got reflected try { // force to (re)read the property file IClasspathEntry[] fileEntries = readClasspathFile(false/*don't create markers*/, false/*don't log problems*/); if (fileEntries == null) { return; // could not read, ignore } JavaModelManager.PerProjectInfo info = getPerProjectInfo(); if (info.rawClasspath != null) { // if there is an in-memory classpath if (isClasspathEqualsTo(info.rawClasspath, info.outputLocation, fileEntries)) { wasSuccessful = true; return; } } // will force an update of the classpath/output location based on the file information // extract out the output location IPath outputLocation = null; if (fileEntries != null && fileEntries.length > 0) { IClasspathEntry entry = fileEntries[fileEntries.length - 1]; if (entry.getContentKind() == ClasspathEntry.K_OUTPUT) { outputLocation = entry.getPath(); IClasspathEntry[] copy = new IClasspathEntry[fileEntries.length - 1]; System.arraycopy(fileEntries, 0, copy, 0, copy.length); fileEntries = copy; } } // restore output location if (outputLocation == null) { outputLocation = SetClasspathOperation.ReuseOutputLocation; // clean mode will also default to reusing current one } IClasspathEntry[] oldResolvedClasspath = info.resolvedClasspath; setRawClasspath( fileEntries, outputLocation, monitor, !ResourcesPlugin.getWorkspace().isTreeLocked(), // canChangeResource oldResolvedClasspath != null ? oldResolvedClasspath : getResolvedClasspath(true), // ignoreUnresolvedVariable true, // needValidation false); // no need to save // if reach that far, the classpath file change got absorbed wasSuccessful = true; } catch (RuntimeException e) { // setRawClasspath might fire a delta, and a listener may throw an exception if (this.project.isAccessible()) { Util.log(e, "Could not set classpath for "+ getPath()); //$NON-NLS-1$ } throw e; // rethrow } catch (JavaModelException e) { // CP failed validation if (!ResourcesPlugin.getWorkspace().isTreeLocked()) { if (this.project.isAccessible()) { if (e.getJavaModelStatus().getException() instanceof CoreException) { // happens if the .classpath could not be written to disk createClasspathProblemMarker(new JavaModelStatus( IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT, Util.bind("classpath.couldNotWriteClasspathFile", getElementName(), e.getMessage()))); //$NON-NLS-1$ } else { createClasspathProblemMarker(new JavaModelStatus( IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT, Util.bind("classpath.invalidClasspathInClasspathFile", getElementName(), e.getMessage()))); //$NON-NLS-1$ } } } throw e; // rethrow } finally { if (!wasSuccessful) { try { this.getPerProjectInfo().updateClasspathInformation(JavaProject.INVALID_CLASSPATH); updatePackageFragmentRoots(); } catch (JavaModelException e) { // ignore } } } } /** * @see IJavaProject */ public IPackageFragmentRoot[] getAllPackageFragmentRoots() throws JavaModelException { return computePackageFragmentRoots(getResolvedClasspath(true), true); } /** * Returns the classpath entry that refers to the given path * or <code>null</code> if there is no reference to the path. * @param path IPath * @return IClasspathEntry * @throws JavaModelException */ public IClasspathEntry getClasspathEntryFor(IPath path) throws JavaModelException { IClasspathEntry[] entries = getExpandedClasspath(true); for (int i = 0; i < entries.length; i++) { if (entries[i].getPath().equals(path)) { return entries[i]; } } return null; } /* * Returns the cycle marker associated with this project or null if none. */ public IMarker getCycleMarker(){ try { if (this.project.isAccessible()) { IMarker[] markers = this.project.findMarkers(IJavaModelMarker.BUILDPATH_PROBLEM_MARKER, false, IResource.DEPTH_ZERO); for (int i = 0, length = markers.length; i < length; i++) { IMarker marker = markers[i]; String cycleAttr = (String)marker.getAttribute(IJavaModelMarker.CYCLE_DETECTED); if (cycleAttr != null && cycleAttr.equals("true")){ //$NON-NLS-1$ return marker; } } } } catch (CoreException e) { // could not get markers: return null } return null; } /** * @see IJavaElement */ public int getElementType() { return JAVA_PROJECT; } /** * This is a helper method returning the expanded classpath for the project, as a list of classpath entries, * where all classpath variable entries have been resolved and substituted with their final target entries. * All project exports have been appended to project entries. * @param ignoreUnresolvedVariable boolean * @return IClasspathEntry[] * @throws JavaModelException */ public IClasspathEntry[] getExpandedClasspath(boolean ignoreUnresolvedVariable) throws JavaModelException { return getExpandedClasspath(ignoreUnresolvedVariable, false/*don't create markers*/, null, null); } /** * Internal variant which can create marker on project for invalid entries, * it will also perform classpath expansion in presence of project prerequisites * exporting their entries. * @param ignoreUnresolvedVariable boolean * @param generateMarkerOnError boolean * @param preferredClasspaths Map * @param preferredOutputs Map * @return IClasspathEntry[] * @throws JavaModelException */ public IClasspathEntry[] getExpandedClasspath( boolean ignoreUnresolvedVariable, boolean generateMarkerOnError, Map preferredClasspaths, Map preferredOutputs) throws JavaModelException { ObjectVector accumulatedEntries = new ObjectVector(); computeExpandedClasspath(this, ignoreUnresolvedVariable, generateMarkerOnError, new HashSet(5), accumulatedEntries, preferredClasspaths, preferredOutputs); IClasspathEntry[] expandedPath = new IClasspathEntry[accumulatedEntries.size()]; accumulatedEntries.copyInto(expandedPath); return expandedPath; } /* * @see JavaElement */ public IJavaElement getHandleFromMemento(String token, MementoTokenizer memento, WorkingCopyOwner owner) { switch (token.charAt(0)) { case JEM_COUNT: return getHandleUpdatingCountFromMemento(memento, owner); case JEM_PACKAGEFRAGMENTROOT: String rootPath = IPackageFragmentRoot.DEFAULT_PACKAGEROOT_PATH; token = null; while (memento.hasMoreTokens()) { token = memento.nextToken(); char firstChar = token.charAt(0); if (firstChar != JEM_PACKAGEFRAGMENT && firstChar != JEM_COUNT) { rootPath += token; } else { break; } } JavaElement root = (JavaElement)getPackageFragmentRoot(new Path(rootPath)); if (token != null && token.charAt(0) == JEM_PACKAGEFRAGMENT) { return root.getHandleFromMemento(token, memento, owner); } else { return root.getHandleFromMemento(memento, owner); } } return null; } /** * Returns the <code>char</code> that marks the start of this handles * contribution to a memento. */ protected char getHandleMementoDelimiter() { return JEM_JAVAPROJECT; } /** * Find the specific Java command amongst the build spec of a given description */ private ICommand getJavaCommand(IProjectDescription description) { ICommand[] commands = description.getBuildSpec(); for (int i = 0; i < commands.length; ++i) { if (commands[i].getBuilderName().equals(JavaCore.BUILDER_ID)) { return commands[i]; } } return null; } /** * Convenience method that returns the specific type of info for a Java project. */ protected JavaProjectElementInfo getJavaProjectElementInfo() throws JavaModelException { return (JavaProjectElementInfo) getElementInfo(); } /** * Returns an array of non-java resources contained in the receiver. */ public Object[] getNonJavaResources() throws JavaModelException { return ((JavaProjectElementInfo) getElementInfo()).getNonJavaResources(this); } /** * @see org.eclipse.jdt.core.IJavaProject#getOption(String, boolean) */ public String getOption(String optionName, boolean inheritJavaCoreOptions) { String propertyName = optionName; if (JavaModelManager.getJavaModelManager().optionNames.contains(propertyName)){ Preferences preferences = getPreferences(); if (preferences == null || preferences.isDefault(propertyName)) { return inheritJavaCoreOptions ? JavaCore.getOption(propertyName) : null; } return preferences.getString(propertyName).trim(); } return null; } /** * @see org.eclipse.jdt.core.IJavaProject#getOptions(boolean) */ public Map getOptions(boolean inheritJavaCoreOptions) { // initialize to the defaults from JavaCore options pool Map options = inheritJavaCoreOptions ? JavaCore.getOptions() : new Hashtable(5); Preferences preferences = getPreferences(); if (preferences == null) return options; // cannot do better (non-Java project) HashSet optionNames = JavaModelManager.getJavaModelManager().optionNames; // project cannot hold custom preferences set to their default, as it uses CUSTOM_DEFAULT_OPTION_VALUE // get custom preferences not set to their default String[] propertyNames = preferences.propertyNames(); for (int i = 0; i < propertyNames.length; i++){ String propertyName = propertyNames[i]; String value = preferences.getString(propertyName).trim(); if (optionNames.contains(propertyName)){ options.put(propertyName, value); } } return options; } /** * @see IJavaProject */ public IPath getOutputLocation() throws JavaModelException { // Do not create marker but log problems while getting output location return this.getOutputLocation(false, true); } /** * @param createMarkers boolean * @param logProblems boolean * @return IPath * @throws JavaModelException */ public IPath getOutputLocation(boolean createMarkers, boolean logProblems) throws JavaModelException { JavaModelManager.PerProjectInfo perProjectInfo = getPerProjectInfo(); IPath outputLocation = perProjectInfo.outputLocation; if (outputLocation != null) return outputLocation; // force to read classpath - will position output location as well this.getRawClasspath(createMarkers, logProblems); outputLocation = perProjectInfo.outputLocation; if (outputLocation == null) { return defaultOutputLocation(); } return outputLocation; } /** * @param path IPath * @return A handle to the package fragment root identified by the given path. * This method is handle-only and the element may or may not exist. Returns * <code>null</code> if unable to generate a handle from the path (for example, * an absolute path that has less than 1 segment. The path may be relative or * absolute. */ public IPackageFragmentRoot getPackageFragmentRoot(IPath path) { if (!path.isAbsolute()) { path = getPath().append(path); } int segmentCount = path.segmentCount(); switch (segmentCount) { case 0: return null; case 1: // default root return getPackageFragmentRoot(this.project); default: // a path ending with .jar/.zip is still ambiguous and could still resolve to a source/lib folder // thus will try to guess based on existing resource if (org.eclipse.jdt.internal.compiler.util.Util.isArchiveFileName(path.lastSegment())) { IResource resource = this.project.getWorkspace().getRoot().findMember(path); if (resource != null && resource.getType() == IResource.FOLDER){ return getPackageFragmentRoot(resource); } return getPackageFragmentRoot0(path); } else { return getPackageFragmentRoot(this.project.getWorkspace().getRoot().getFolder(path)); } } } /** * The path is known to match a source/library folder entry. * @param path IPath * @return IPackageFragmentRoot */ public IPackageFragmentRoot getFolderPackageFragmentRoot(IPath path) { if (path.segmentCount() == 1) { // default project root return getPackageFragmentRoot(this.project); } return getPackageFragmentRoot(this.project.getWorkspace().getRoot().getFolder(path)); } /** * @see IJavaProject */ public IPackageFragmentRoot getPackageFragmentRoot(IResource resource) { switch (resource.getType()) { case IResource.FILE: if (org.eclipse.jdt.internal.compiler.util.Util.isArchiveFileName(resource.getName())) { return new JarPackageFragmentRoot(resource, this); } else { return null; } case IResource.FOLDER: return new PackageFragmentRoot(resource, this, resource.getName()); case IResource.PROJECT: return new PackageFragmentRoot(resource, this, ""); //$NON-NLS-1$ default: return null; } } /** * @see IJavaProject */ public IPackageFragmentRoot getPackageFragmentRoot(String jarPath) { return getPackageFragmentRoot0(JavaProject.canonicalizedPath(new Path(jarPath))); } /* * no path canonicalization */ public IPackageFragmentRoot getPackageFragmentRoot0(IPath jarPath) { return new JarPackageFragmentRoot(jarPath, this); } /** * @see IJavaProject */ public IPackageFragmentRoot[] getPackageFragmentRoots() throws JavaModelException { Object[] children; int length; IPackageFragmentRoot[] roots; System.arraycopy( children = getChildren(), 0, roots = new IPackageFragmentRoot[length = children.length], 0, length); return roots; } /** * @see IJavaProject * @deprecated */ public IPackageFragmentRoot[] getPackageFragmentRoots(IClasspathEntry entry) { return findPackageFragmentRoots(entry); } /** * Returns the package fragment root prefixed by the given path, or * an empty collection if there are no such elements in the model. */ protected IPackageFragmentRoot[] getPackageFragmentRoots(IPath path) throws JavaModelException { IPackageFragmentRoot[] roots = getAllPackageFragmentRoots(); ArrayList matches = new ArrayList(); for (int i = 0; i < roots.length; ++i) { if (path.isPrefixOf(roots[i].getPath())) { matches.add(roots[i]); } } IPackageFragmentRoot[] copy = new IPackageFragmentRoot[matches.size()]; matches.toArray(copy); return copy; } /** * @see IJavaProject */ public IPackageFragment[] getPackageFragments() throws JavaModelException { IPackageFragmentRoot[] roots = getPackageFragmentRoots(); return getPackageFragmentsInRoots(roots); } /** * Returns all the package fragments found in the specified * package fragment roots. * @param roots IPackageFragmentRoot[] * @return IPackageFragment[] */ public IPackageFragment[] getPackageFragmentsInRoots(IPackageFragmentRoot[] roots) { ArrayList frags = new ArrayList(); for (int i = 0; i < roots.length; i++) { IPackageFragmentRoot root = roots[i]; try { IJavaElement[] rootFragments = root.getChildren(); for (int j = 0; j < rootFragments.length; j++) { frags.add(rootFragments[j]); } } catch (JavaModelException e) { // do nothing } } IPackageFragment[] fragments = new IPackageFragment[frags.size()]; frags.toArray(fragments); return fragments; } /** * @see IJavaElement */ public IPath getPath() { return this.project.getFullPath(); } public JavaModelManager.PerProjectInfo getPerProjectInfo() throws JavaModelException { return JavaModelManager.getJavaModelManager().getPerProjectInfoCheckExistence(this.project); } /** * @see IJavaProject#getProject() */ public IProject getProject() { return this.project; } /** * Returns the project custom preference pool. * Project preferences may include custom encoding. * @return Preferences */ public Preferences getPreferences(){ if (!JavaProject.hasJavaNature(this.project)) return null; JavaModelManager.PerProjectInfo perProjectInfo = JavaModelManager.getJavaModelManager().getPerProjectInfo(this.project, true); Preferences preferences = perProjectInfo.preferences; if (preferences != null) return preferences; preferences = loadPreferences(); if (preferences == null) preferences = new Preferences(); perProjectInfo.preferences = preferences; return preferences; } /** * @see IJavaProject */ public IClasspathEntry[] getRawClasspath() throws JavaModelException { // Do not create marker but log problems while getting raw classpath return getRawClasspath(false, true); } /* * Internal variant allowing to parameterize problem creation/logging */ public IClasspathEntry[] getRawClasspath(boolean createMarkers, boolean logProblems) throws JavaModelException { JavaModelManager.PerProjectInfo perProjectInfo = null; IClasspathEntry[] classpath; if (createMarkers) { this.flushClasspathProblemMarkers(false/*cycle*/, true/*format*/); classpath = this.readClasspathFile(createMarkers, logProblems); } else { perProjectInfo = getPerProjectInfo(); classpath = perProjectInfo.rawClasspath; if (classpath != null) return classpath; classpath = this.readClasspathFile(createMarkers, logProblems); } // extract out the output location IPath outputLocation = null; if (classpath != null && classpath.length > 0) { IClasspathEntry entry = classpath[classpath.length - 1]; if (entry.getContentKind() == ClasspathEntry.K_OUTPUT) { outputLocation = entry.getPath(); IClasspathEntry[] copy = new IClasspathEntry[classpath.length - 1]; System.arraycopy(classpath, 0, copy, 0, copy.length); classpath = copy; } } if (classpath == null) { return defaultClasspath(); } /* Disable validate: classpath can contain CP variables and container that need to be resolved if (classpath != INVALID_CLASSPATH && !JavaConventions.validateClasspath(this, classpath, outputLocation).isOK()) { classpath = INVALID_CLASSPATH; } */ if (!createMarkers) { perProjectInfo.rawClasspath = classpath; perProjectInfo.outputLocation = outputLocation; } return classpath; } /** * @see IJavaProject#getRequiredProjectNames() */ public String[] getRequiredProjectNames() throws JavaModelException { return this.projectPrerequisites(getResolvedClasspath(true)); } /** * @see IJavaProject */ public IClasspathEntry[] getResolvedClasspath(boolean ignoreUnresolvedEntry) throws JavaModelException { return this.getResolvedClasspath( ignoreUnresolvedEntry, false); // generateMarkerOnError } /** * Internal variant which can create marker on project for invalid entries * and caches the resolved classpath on perProjectInfo * @param ignoreUnresolvedEntry boolean * @param generateMarkerOnError boolean * @return IClasspathEntry[] * @throws JavaModelException */ public IClasspathEntry[] getResolvedClasspath( boolean ignoreUnresolvedEntry, boolean generateMarkerOnError) throws JavaModelException { JavaModelManager.PerProjectInfo perProjectInfo = null; if (ignoreUnresolvedEntry && !generateMarkerOnError) { perProjectInfo = getPerProjectInfo(); if (perProjectInfo != null) { // resolved path is cached on its info IClasspathEntry[] infoPath = perProjectInfo.resolvedClasspath; if (infoPath != null) return infoPath; } } Map reverseMap = perProjectInfo == null ? null : new HashMap(5); IClasspathEntry[] resolvedPath = getResolvedClasspath( getRawClasspath(generateMarkerOnError, !generateMarkerOnError), generateMarkerOnError ? getOutputLocation() : null, ignoreUnresolvedEntry, generateMarkerOnError, reverseMap); if (perProjectInfo != null){ if (perProjectInfo.rawClasspath == null // .classpath file could not be read && generateMarkerOnError && JavaProject.hasJavaNature(this.project)) { // flush .classpath format markers (bug 39877), but only when file cannot be read (bug 42366) this.flushClasspathProblemMarkers(false, true); this.createClasspathProblemMarker(new JavaModelStatus( IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT, Util.bind("classpath.cannotReadClasspathFile", this.getElementName()))); //$NON-NLS-1$ } perProjectInfo.resolvedClasspath = resolvedPath; perProjectInfo.resolvedPathToRawEntries = reverseMap; } return resolvedPath; } /** * Internal variant which can process any arbitrary classpath * @param classpathEntries IClasspathEntry[] * @param projectOutputLocation IPath * @param ignoreUnresolvedEntry boolean * @param generateMarkerOnError boolean * @param reverseMap Map * @return IClasspathEntry[] * @throws JavaModelException */ public IClasspathEntry[] getResolvedClasspath( IClasspathEntry[] classpathEntries, IPath projectOutputLocation, // only set if needing full classpath validation (and markers) boolean ignoreUnresolvedEntry, // if unresolved entries are met, should it trigger initializations boolean generateMarkerOnError, Map reverseMap) // can be null if not interested in reverse mapping throws JavaModelException { IJavaModelStatus status; if (generateMarkerOnError){ flushClasspathProblemMarkers(false, false); } int length = classpathEntries.length; ArrayList resolvedEntries = new ArrayList(); for (int i = 0; i < length; i++) { IClasspathEntry rawEntry = classpathEntries[i]; IPath resolvedPath; status = null; /* validation if needed */ if (generateMarkerOnError || !ignoreUnresolvedEntry) { status = ClasspathEntry.validateClasspathEntry(this, rawEntry, false /*ignore src attach*/, false /*do not recurse in containers, done later to accumulate*/); if (generateMarkerOnError && !status.isOK()) createClasspathProblemMarker(status); } switch (rawEntry.getEntryKind()){ case IClasspathEntry.CPE_VARIABLE : IClasspathEntry resolvedEntry = null; try { resolvedEntry = JavaCore.getResolvedClasspathEntry(rawEntry); } catch (Assert.AssertionFailedException e) { // Catch the assertion failure and throw java model exception instead // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=55992 // if ignoredUnresolvedEntry is false, status is set by by ClasspathEntry.validateClasspathEntry // called above as validation was needed if (!ignoreUnresolvedEntry) throw new JavaModelException(status); } if (resolvedEntry == null) { if (!ignoreUnresolvedEntry) throw new JavaModelException(status); } else { if (reverseMap != null && reverseMap.get(resolvedPath = resolvedEntry.getPath()) == null) reverseMap.put(resolvedPath , rawEntry); resolvedEntries.add(resolvedEntry); } break; case IClasspathEntry.CPE_CONTAINER : IClasspathContainer container = JavaCore.getClasspathContainer(rawEntry.getPath(), this); if (container == null){ if (!ignoreUnresolvedEntry) throw new JavaModelException(status); break; } IClasspathEntry[] containerEntries = container.getClasspathEntries(); if (containerEntries == null) break; // container was bound for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){ IClasspathEntry cEntry = containerEntries[j]; if (generateMarkerOnError) { IJavaModelStatus containerStatus = ClasspathEntry.validateClasspathEntry(this, cEntry, false, true /*recurse*/); if (!containerStatus.isOK()) createClasspathProblemMarker(containerStatus); } // if container is exported, then its nested entries must in turn be exported (21749) if (rawEntry.isExported()){ cEntry = new ClasspathEntry(cEntry.getContentKind(), cEntry.getEntryKind(), cEntry.getPath(), cEntry.getInclusionPatterns(), cEntry.getExclusionPatterns(), cEntry.getSourceAttachmentPath(), cEntry.getSourceAttachmentRootPath(), cEntry.getOutputLocation(), true); // duplicate container entry for tagging it as exported } if (reverseMap != null && reverseMap.get(resolvedPath = cEntry.getPath()) == null) reverseMap.put(resolvedPath, rawEntry); resolvedEntries.add(cEntry); } break; default : if (reverseMap != null && reverseMap.get(resolvedPath = rawEntry.getPath()) == null) reverseMap.put(resolvedPath, rawEntry); resolvedEntries.add(rawEntry); } } IClasspathEntry[] resolvedPath = new IClasspathEntry[resolvedEntries.size()]; resolvedEntries.toArray(resolvedPath); if (generateMarkerOnError && projectOutputLocation != null) { status = ClasspathEntry.validateClasspath(this, resolvedPath, projectOutputLocation); if (!status.isOK()) createClasspathProblemMarker(status); } return resolvedPath; } /** * @see IJavaElement */ public IResource getResource() { return this.project; } /** * Retrieve a shared property on a project. If the property is not defined, answers null. * Note that it is orthogonal to IResource persistent properties, and client code has to decide * which form of storage to use appropriately. Shared properties produce real resource files which * can be shared through a VCM onto a server. Persistent properties are not shareable. * * @param key String * @see JavaProject#setSharedProperty(String, String) * @return String * @throws CoreException */ public String getSharedProperty(String key) throws CoreException { String property = null; IFile rscFile = this.project.getFile(key); if (rscFile.exists()) { property = new String(Util.getResourceContentsAsByteArray(rscFile)); } return property; } /** * @see JavaElement */ public SourceMapper getSourceMapper() { return null; } /** * @see IJavaElement */ public IResource getUnderlyingResource() throws JavaModelException { if (!exists()) throw newNotPresentException(); return this.project; } /** * @see IJavaProject */ public boolean hasBuildState() { return JavaModelManager.getJavaModelManager().getLastBuiltState(this.project, null) != null; } /** * @see IJavaProject */ public boolean hasClasspathCycle(IClasspathEntry[] preferredClasspath) { HashSet cycleParticipants = new HashSet(); HashMap preferredClasspaths = new HashMap(1); preferredClasspaths.put(this, preferredClasspath); updateCycleParticipants(new ArrayList(2), cycleParticipants, ResourcesPlugin.getWorkspace().getRoot(), new HashSet(2), preferredClasspaths); return !cycleParticipants.isEmpty(); } public boolean hasCycleMarker(){ return this.getCycleMarker() != null; } public int hashCode() { return this.project.hashCode(); } /** * Returns true if the given project is accessible and it has * a java nature, otherwise false. * @param project IProject * @return boolean */ public static boolean hasJavaNature(IProject project) { try { return project.hasNature(JavaCore.NATURE_ID); } catch (CoreException e) { // project does not exist or is not open } return false; } /** * Answers true if the project potentially contains any source. A project which has no source is immutable. * @return boolean */ public boolean hasSource() { // look if any source folder on the classpath // no need for resolved path given source folder cannot be abstracted IClasspathEntry[] entries; try { entries = this.getRawClasspath(); } catch (JavaModelException e) { return true; // unsure } for (int i = 0, max = entries.length; i < max; i++) { if (entries[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) { return true; } } return false; } /** * Compare current classpath with given one to see if any different. * Note that the argument classpath contains its binary output. * @param newClasspath IClasspathEntry[] * @param newOutputLocation IPath * @param otherClasspathWithOutput IClasspathEntry[] * @return boolean */ public boolean isClasspathEqualsTo(IClasspathEntry[] newClasspath, IPath newOutputLocation, IClasspathEntry[] otherClasspathWithOutput) { if (otherClasspathWithOutput != null && otherClasspathWithOutput.length > 0) { int length = otherClasspathWithOutput.length; if (length == newClasspath.length + 1) { // output is amongst file entries (last one) // compare classpath entries for (int i = 0; i < length - 1; i++) { if (!otherClasspathWithOutput[i].equals(newClasspath[i])) return false; } // compare binary outputs IClasspathEntry output = otherClasspathWithOutput[length - 1]; if (output.getContentKind() == ClasspathEntry.K_OUTPUT && output.getPath().equals(newOutputLocation)) return true; } } return false; } /* * @see IJavaProject */ public boolean isOnClasspath(IJavaElement element) { IPath path = element.getPath(); IClasspathEntry[] classpath; try { classpath = this.getResolvedClasspath(true/*ignore unresolved variable*/); } catch(JavaModelException e){ return false; // not a Java project } boolean isFolderPath = false; switch (element.getElementType()) { case IJavaElement.PACKAGE_FRAGMENT_ROOT: // package fragment roots must match exactly entry pathes (no exclusion there) for (int i = 0; i < classpath.length; i++) { IClasspathEntry entry = classpath[i]; IPath entryPath = entry.getPath(); if (entryPath.equals(path)) { return true; } } return false; case IJavaElement.PACKAGE_FRAGMENT: if (!((IPackageFragmentRoot)element.getParent()).isArchive()) { // ensure that folders are only excluded if all of their children are excluded isFolderPath = true; } break; } for (int i = 0; i < classpath.length; i++) { IClasspathEntry entry = classpath[i]; IPath entryPath = entry.getPath(); if (entryPath.isPrefixOf(path) && !Util.isExcluded(path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), isFolderPath)) { return true; } } return false; } /* * @see IJavaProject */ public boolean isOnClasspath(IResource resource) { IPath exactPath = resource.getFullPath(); IPath path = exactPath; // ensure that folders are only excluded if all of their children are excluded boolean isFolderPath = resource.getType() == IResource.FOLDER; IClasspathEntry[] classpath; try { classpath = this.getResolvedClasspath(true/*ignore unresolved variable*/); } catch(JavaModelException e){ return false; // not a Java project } for (int i = 0; i < classpath.length; i++) { IClasspathEntry entry = classpath[i]; IPath entryPath = entry.getPath(); if (entryPath.equals(exactPath)) { // package fragment roots must match exactly entry pathes (no exclusion there) return true; } if (entryPath.isPrefixOf(path) && !Util.isExcluded(path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), isFolderPath)) { return true; } } return false; } private IPath getPluginWorkingLocation() { return this.project.getWorkingLocation(JavaCore.PLUGIN_ID); } /* * load preferences from a shareable format (VCM-wise) */ public Preferences loadPreferences() { Preferences preferences = new Preferences(); // File prefFile = this.project.getLocation().append(PREF_FILENAME).toFile(); IPath projectMetaLocation = getPluginWorkingLocation(); if (projectMetaLocation != null) { File prefFile = projectMetaLocation.append(PREF_FILENAME).toFile(); if (prefFile.exists()) { // load preferences from file InputStream in = null; try { in = new BufferedInputStream(new FileInputStream(prefFile)); preferences.load(in); return preferences; } catch (IOException e) { // problems loading preference store - quietly ignore } finally { if (in != null) { try { in.close(); } catch (IOException e) { // ignore problems with close } } } } } return null; } /** * @see IJavaProject#newEvaluationContext() */ public IEvaluationContext newEvaluationContext() { return new EvaluationContextWrapper(new EvaluationContext(), this); } /* * Returns a new name lookup. This name lookup first looks in the given working copies. */ public NameLookup newNameLookup(ICompilationUnit[] workingCopies) throws JavaModelException { JavaProjectElementInfo info = getJavaProjectElementInfo(); // lock on the project info to avoid race condition while computing the pkg fragment roots and package fragment caches synchronized(info){ return new NameLookup(info.getAllPackageFragmentRoots(this), info.getAllPackageFragments(this), workingCopies); } } /* * Returns a new name lookup. This name lookup first looks in the working copies of the given owner. */ public NameLookup newNameLookup(WorkingCopyOwner owner) throws JavaModelException { JavaModelManager manager = JavaModelManager.getJavaModelManager(); ICompilationUnit[] workingCopies = owner == null ? null : manager.getWorkingCopies(owner, true/*add primary WCs*/); return newNameLookup(workingCopies); } /* * Returns a new search name environment for this project. This name environment first looks in the given working copies. */ public ISearchableNameEnvironment newSearchableNameEnvironment(ICompilationUnit[] workingCopies) throws JavaModelException { return new SearchableEnvironment(this, workingCopies); } /* * Returns a new search name environment for this project. This name environment first looks in the working copies * of the given owner. */ public ISearchableNameEnvironment newSearchableNameEnvironment(WorkingCopyOwner owner) throws JavaModelException { return new SearchableEnvironment(this, owner); } /** * @see IJavaProject */ public ITypeHierarchy newTypeHierarchy( IRegion region, IProgressMonitor monitor) throws JavaModelException { return newTypeHierarchy(region, DefaultWorkingCopyOwner.PRIMARY, monitor); } /** * @see IJavaProject */ public ITypeHierarchy newTypeHierarchy( IRegion region, WorkingCopyOwner owner, IProgressMonitor monitor) throws JavaModelException { if (region == null) { throw new IllegalArgumentException(Util.bind("hierarchy.nullRegion"));//$NON-NLS-1$ } ICompilationUnit[] workingCopies = JavaModelManager.getJavaModelManager().getWorkingCopies(owner, true/*add primary working copies*/); CreateTypeHierarchyOperation op = new CreateTypeHierarchyOperation(region, this, workingCopies, null, true); op.runOperation(monitor); return op.getResult(); } /** * @see IJavaProject */ public ITypeHierarchy newTypeHierarchy( IType type, IRegion region, IProgressMonitor monitor) throws JavaModelException { return newTypeHierarchy(type, region, DefaultWorkingCopyOwner.PRIMARY, monitor); } /** * @see IJavaProject */ public ITypeHierarchy newTypeHierarchy( IType type, IRegion region, WorkingCopyOwner owner, IProgressMonitor monitor) throws JavaModelException { if (type == null) { throw new IllegalArgumentException(Util.bind("hierarchy.nullFocusType"));//$NON-NLS-1$ } if (region == null) { throw new IllegalArgumentException(Util.bind("hierarchy.nullRegion"));//$NON-NLS-1$ } ICompilationUnit[] workingCopies = JavaModelManager.getJavaModelManager().getWorkingCopies(owner, true/*add primary working copies*/); CreateTypeHierarchyOperation op = new CreateTypeHierarchyOperation(region, this, workingCopies, type, true); op.runOperation(monitor); return op.getResult(); } public String[] projectPrerequisites(IClasspathEntry[] entries) throws JavaModelException { ArrayList prerequisites = new ArrayList(); // need resolution entries = getResolvedClasspath(entries, null, true, false, null/*no reverse map*/); for (int i = 0, length = entries.length; i < length; i++) { IClasspathEntry entry = entries[i]; if (entry.getEntryKind() == IClasspathEntry.CPE_PROJECT) { prerequisites.add(entry.getPath().lastSegment()); } } int size = prerequisites.size(); if (size == 0) { return NO_PREREQUISITES; } else { String[] result = new String[size]; prerequisites.toArray(result); return result; } } /** * Reads the .classpath file from disk and returns the list of entries it contains (including output location entry) * Returns null if .classfile is not present. * Returns INVALID_CLASSPATH if it has a format problem. */ protected IClasspathEntry[] readClasspathFile(boolean createMarker, boolean logProblems) { try { String xmlClasspath = getSharedProperty(CLASSPATH_FILENAME); if (xmlClasspath == null) { if (createMarker && this.project.isAccessible()) { this.createClasspathProblemMarker(new JavaModelStatus( IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT, Util.bind("classpath.cannotReadClasspathFile", this.getElementName()))); //$NON-NLS-1$ } return null; } return decodeClasspath(xmlClasspath, createMarker, logProblems); } catch(CoreException e) { // file does not exist (or not accessible) if (createMarker && this.project.isAccessible()) { this.createClasspathProblemMarker(new JavaModelStatus( IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT, Util.bind("classpath.cannotReadClasspathFile", this.getElementName()))); //$NON-NLS-1$ } if (logProblems) { Util.log(e, "Exception while retrieving "+ this.getPath() //$NON-NLS-1$ +"/.classpath, will revert to default classpath"); //$NON-NLS-1$ } } return null; } /** * @see IJavaProject */ public IPath readOutputLocation() { // Read classpath file without creating markers nor logging problems IClasspathEntry[] classpath = this.readClasspathFile(false, false); // extract the output location IPath outputLocation = null; if (classpath != null && classpath.length > 0) { IClasspathEntry entry = classpath[classpath.length - 1]; if (entry.getContentKind() == ClasspathEntry.K_OUTPUT) { outputLocation = entry.getPath(); } } return outputLocation; } /** * @see IJavaProject */ public IClasspathEntry[] readRawClasspath() { // Read classpath file without creating markers nor logging problems IClasspathEntry[] classpath = this.readClasspathFile(false, false); // discard the output location if (classpath != null && classpath.length > 0) { IClasspathEntry entry = classpath[classpath.length - 1]; if (entry.getContentKind() == ClasspathEntry.K_OUTPUT) { IClasspathEntry[] copy = new IClasspathEntry[classpath.length - 1]; System.arraycopy(classpath, 0, copy, 0, copy.length); classpath = copy; } } return classpath; } /** * Removes the given builder from the build spec for the given project. */ protected void removeFromBuildSpec(String builderID) throws CoreException { IProjectDescription description = this.project.getDescription(); ICommand[] commands = description.getBuildSpec(); for (int i = 0; i < commands.length; ++i) { if (commands[i].getBuilderName().equals(builderID)) { ICommand[] newCommands = new ICommand[commands.length - 1]; System.arraycopy(commands, 0, newCommands, 0, i); System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1); description.setBuildSpec(newCommands); this.project.setDescription(description, null); return; } } } /* * Resets this project's caches */ public void resetCaches() { JavaProjectElementInfo info = (JavaProjectElementInfo) JavaModelManager.getJavaModelManager().peekAtInfo(this); if (info != null){ info.resetCaches(); } } /** * Answers an ID which is used to distinguish project/entries during package * fragment root computations * @return String */ public String rootID(){ return "[PRJ]"+this.project.getFullPath(); //$NON-NLS-1$ } /** * Saves the classpath in a shareable format (VCM-wise) only when necessary, that is, if it is semantically different * from the existing one in file. Will never write an identical one. * * @param newClasspath IClasspathEntry[] * @param newOutputLocation IPath * @return boolean Return whether the .classpath file was modified. * @throws JavaModelException */ public boolean saveClasspath(IClasspathEntry[] newClasspath, IPath newOutputLocation) throws JavaModelException { if (!this.project.isAccessible()) return false; IClasspathEntry[] fileEntries = readClasspathFile(false /*don't create markers*/, false/*don't log problems*/); if (fileEntries != null && isClasspathEqualsTo(newClasspath, newOutputLocation, fileEntries)) { // no need to save it, it is the same return false; } // actual file saving try { setSharedProperty(CLASSPATH_FILENAME, encodeClasspath(newClasspath, newOutputLocation, true)); return true; } catch (CoreException e) { throw new JavaModelException(e); } } /** * Save project custom preferences to shareable file (.jprefs) */ private void savePreferences(Preferences preferences) { if (!JavaProject.hasJavaNature(this.project)) return; // ignore if (preferences == null || (!preferences.needsSaving() && preferences.propertyNames().length != 0)) { // nothing to save return; } // preferences need to be saved // the preferences file is located in the plug-in's state area // at a well-known name (.jprefs) // File prefFile = this.project.getLocation().append(PREF_FILENAME).toFile(); File prefFile = getPluginWorkingLocation().append(PREF_FILENAME).toFile(); if (preferences.propertyNames().length == 0) { // there are no preference settings // rather than write an empty file, just delete any existing file if (prefFile.exists()) { prefFile.delete(); // don't worry if delete unsuccessful } return; } // write file, overwriting an existing one OutputStream out = null; try { // do it as carefully as we know how so that we don't lose/mangle // the setting in times of stress out = new BufferedOutputStream(new FileOutputStream(prefFile)); preferences.store(out, null); } catch (IOException e) { // problems saving preference store - quietly ignore } finally { if (out != null) { try { out.close(); } catch (IOException e) { // ignore problems with close } } } } /** * Update the Java command in the build spec (replace existing one if present, * add one first if none). */ private void setJavaCommand( IProjectDescription description, ICommand newCommand) throws CoreException { ICommand[] oldCommands = description.getBuildSpec(); ICommand oldJavaCommand = getJavaCommand(description); ICommand[] newCommands; if (oldJavaCommand == null) { // Add a Java build spec before other builders (1FWJK7I) newCommands = new ICommand[oldCommands.length + 1]; System.arraycopy(oldCommands, 0, newCommands, 1, oldCommands.length); newCommands[0] = newCommand; } else { for (int i = 0, max = oldCommands.length; i < max; i++) { if (oldCommands[i] == oldJavaCommand) { oldCommands[i] = newCommand; break; } } newCommands = oldCommands; } // Commit the spec change into the project description.setBuildSpec(newCommands); this.project.setDescription(description, null); } /** * @see org.eclipse.jdt.core.IJavaProject#setOption(java.lang.String, java.lang.String) */ public void setOption(String optionName, String optionValue) { if (!JavaModelManager.getJavaModelManager().optionNames.contains(optionName)) return; // unrecognized option Preferences preferences = getPreferences(); preferences.setDefault(optionName, CUSTOM_DEFAULT_OPTION_VALUE); // empty string isn't the default (26251) preferences.setValue(optionName, optionValue); savePreferences(preferences); } /** * @see org.eclipse.jdt.core.IJavaProject#setOptions(Map) */ public void setOptions(Map newOptions) { Preferences preferences = getPreferences(); if (newOptions != null){ Iterator keys = newOptions.keySet().iterator(); while (keys.hasNext()){ String key = (String)keys.next(); if (!JavaModelManager.getJavaModelManager().optionNames.contains(key)) continue; // unrecognized option // no filtering for encoding (custom encoding for project is allowed) String value = (String)newOptions.get(key); preferences.setDefault(key, CUSTOM_DEFAULT_OPTION_VALUE); // empty string isn't the default (26251) preferences.setValue(key, value); } } // reset to default all options not in new map // @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=26255 // @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49691 String[] pNames = preferences.propertyNames(); int ln = pNames.length; for (int i=0; i<ln; i++) { String key = pNames[i]; if (newOptions == null || !newOptions.containsKey(key)) { preferences.setToDefault(key); // set default => remove from preferences table } } // persist options savePreferences(preferences); } /** * @see IJavaProject */ public void setOutputLocation(IPath path, IProgressMonitor monitor) throws JavaModelException { if (path == null) { throw new IllegalArgumentException(Util.bind("path.nullPath")); //$NON-NLS-1$ } if (path.equals(getOutputLocation())) { return; } this.setRawClasspath(SetClasspathOperation.ReuseClasspath, path, monitor); } /* * Set cached preferences, no preference file is saved, only info is updated */ public void setPreferences(Preferences preferences) { if (!JavaProject.hasJavaNature(this.project)) return; // ignore JavaModelManager.PerProjectInfo perProjectInfo = JavaModelManager.getJavaModelManager().getPerProjectInfo(this.project, true); perProjectInfo.preferences = preferences; } /** * Sets the underlying kernel project of this Java project, * and fills in its parent and name. * Called by IProject.getNature(). * * @see IProjectNature#setProject(IProject) */ public void setProject(IProject project) { this.project = project; this.parent = JavaModelManager.getJavaModelManager().getJavaModel(); this.name = project.getName(); } /** * @see IJavaProject#setRawClasspath(IClasspathEntry[],IPath,IProgressMonitor) */ public void setRawClasspath( IClasspathEntry[] entries, IPath outputLocation, IProgressMonitor monitor) throws JavaModelException { setRawClasspath( entries, outputLocation, monitor, true, // canChangeResource (as per API contract) getResolvedClasspath(true), // ignoreUnresolvedVariable true, // needValidation true); // need to save } public void setRawClasspath( IClasspathEntry[] newEntries, IPath newOutputLocation, IProgressMonitor monitor, boolean canChangeResource, IClasspathEntry[] oldResolvedPath, boolean needValidation, boolean needSave) throws JavaModelException { JavaModelManager manager = JavaModelManager.getJavaModelManager(); try { IClasspathEntry[] newRawPath = newEntries; if (newRawPath == null) { //are we already with the default classpath newRawPath = defaultClasspath(); } SetClasspathOperation op = new SetClasspathOperation( this, oldResolvedPath, newRawPath, newOutputLocation, canChangeResource, needValidation, needSave); op.runOperation(monitor); } catch (JavaModelException e) { manager.getDeltaProcessor().flush(); throw e; } } /** * @see IJavaProject */ public void setRawClasspath( IClasspathEntry[] entries, IProgressMonitor monitor) throws JavaModelException { setRawClasspath( entries, SetClasspathOperation.ReuseOutputLocation, monitor, true, // canChangeResource (as per API contract) getResolvedClasspath(true), // ignoreUnresolvedVariable true, // needValidation true); // need to save } /** * Record a shared persistent property onto a project. * Note that it is orthogonal to IResource persistent properties, and client code has to decide * which form of storage to use appropriately. Shared properties produce real resource files which * can be shared through a VCM onto a server. Persistent properties are not shareable. * * shared properties end up in resource files, and thus cannot be modified during * delta notifications (a CoreException would then be thrown). * * @param key String * @param value String * @see JavaProject#getSharedProperty(String key) * @throws CoreException */ public void setSharedProperty(String key, String value) throws CoreException { IFile rscFile = this.project.getFile(key); InputStream inputStream = new ByteArrayInputStream(value.getBytes()); // update the resource content if (rscFile.exists()) { if (rscFile.isReadOnly()) { // provide opportunity to checkout read-only .classpath file (23984) ResourcesPlugin.getWorkspace().validateEdit(new IFile[]{rscFile}, null); } rscFile.setContents(inputStream, IResource.FORCE, null); } else { rscFile.create(inputStream, IResource.FORCE, null); } } /** * Update cycle markers for all java projects * @param preferredClasspaths Map * @throws JavaModelException */ public static void updateAllCycleMarkers(Map preferredClasspaths) throws JavaModelException { //long start = System.currentTimeMillis(); IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); IProject[] rscProjects = workspaceRoot.getProjects(); int length = rscProjects.length; JavaProject[] projects = new JavaProject[length]; HashSet cycleParticipants = new HashSet(); HashSet traversed = new HashSet(); // compute cycle participants ArrayList prereqChain = new ArrayList(); for (int i = 0; i < length; i++){ if (hasJavaNature(rscProjects[i])) { JavaProject project = (projects[i] = (JavaProject)JavaCore.create(rscProjects[i])); if (!traversed.contains(project.getPath())){ prereqChain.clear(); project.updateCycleParticipants(prereqChain, cycleParticipants, workspaceRoot, traversed, preferredClasspaths); } } } //System.out.println("updateAllCycleMarkers: " + (System.currentTimeMillis() - start) + " ms"); for (int i = 0; i < length; i++){ JavaProject project = projects[i]; if (project != null) { if (cycleParticipants.contains(project.getPath())){ IMarker cycleMarker = project.getCycleMarker(); String circularCPOption = project.getOption(JavaCore.CORE_CIRCULAR_CLASSPATH, true); int circularCPSeverity = JavaCore.ERROR.equals(circularCPOption) ? IMarker.SEVERITY_ERROR : IMarker.SEVERITY_WARNING; if (cycleMarker != null) { // update existing cycle marker if needed try { int existingSeverity = ((Integer)cycleMarker.getAttribute(IMarker.SEVERITY)).intValue(); if (existingSeverity != circularCPSeverity) { cycleMarker.setAttribute(IMarker.SEVERITY, circularCPSeverity); } } catch (CoreException e) { throw new JavaModelException(e); } } else { // create new marker project.createClasspathProblemMarker( new JavaModelStatus(IJavaModelStatusConstants.CLASSPATH_CYCLE, project)); } } else { project.flushClasspathProblemMarkers(true, false); } } } } /** * If a cycle is detected, then cycleParticipants contains all the paths of projects involved in this cycle (directly and indirectly), * no cycle if the set is empty (and started empty) * @param prereqChain ArrayList * @param cycleParticipants HashSet * @param workspaceRoot IWorkspaceRoot * @param traversed HashSet * @param preferredClasspaths Map */ public void updateCycleParticipants( ArrayList prereqChain, HashSet cycleParticipants, IWorkspaceRoot workspaceRoot, HashSet traversed, Map preferredClasspaths){ IPath path = this.getPath(); prereqChain.add(path); traversed.add(path); try { IClasspathEntry[] classpath = null; if (preferredClasspaths != null) classpath = (IClasspathEntry[])preferredClasspaths.get(this); if (classpath == null) classpath = getResolvedClasspath(true); for (int i = 0, length = classpath.length; i < length; i++) { IClasspathEntry entry = classpath[i]; if (entry.getEntryKind() == IClasspathEntry.CPE_PROJECT){ IPath prereqProjectPath = entry.getPath(); int index = cycleParticipants.contains(prereqProjectPath) ? 0 : prereqChain.indexOf(prereqProjectPath); if (index >= 0) { // refer to cycle, or in cycle itself for (int size = prereqChain.size(); index < size; index++) { cycleParticipants.add(prereqChain.get(index)); } } else { if (!traversed.contains(prereqProjectPath)) { IResource member = workspaceRoot.findMember(prereqProjectPath); if (member != null && member.getType() == IResource.PROJECT){ JavaProject javaProject = (JavaProject)JavaCore.create((IProject)member); javaProject.updateCycleParticipants(prereqChain, cycleParticipants, workspaceRoot, traversed, preferredClasspaths); } } } } } } catch(JavaModelException e){ // project doesn't exist: ignore } prereqChain.remove(path); } /* * Update .classpath format markers. */ public void updateClasspathMarkers(Map preferredClasspaths, Map preferredOutputs) { this.flushClasspathProblemMarkers(false/*cycle*/, true/*format*/); this.flushClasspathProblemMarkers(false/*cycle*/, false/*format*/); IClasspathEntry[] classpath = this.readClasspathFile(true/*marker*/, false/*log*/); IPath output = null; // discard the output location if (classpath != null && classpath.length > 0) { IClasspathEntry entry = classpath[classpath.length - 1]; if (entry.getContentKind() == ClasspathEntry.K_OUTPUT) { IClasspathEntry[] copy = new IClasspathEntry[classpath.length - 1]; System.arraycopy(classpath, 0, copy, 0, copy.length); classpath = copy; output = entry.getPath(); } } // remember invalid path so as to avoid reupdating it again later on if (preferredClasspaths != null) { preferredClasspaths.put(this, classpath == null ? INVALID_CLASSPATH : classpath); } if (preferredOutputs != null) { preferredOutputs.put(this, output == null ? defaultOutputLocation() : output); } // force classpath marker refresh if (classpath != null && output != null) { for (int i = 0; i < classpath.length; i++) { IJavaModelStatus status = ClasspathEntry.validateClasspathEntry(this, classpath[i], false/*src attach*/, true /*recurse in container*/); if (!status.isOK()) this.createClasspathProblemMarker(status); } IJavaModelStatus status = ClasspathEntry.validateClasspath(this, classpath, output); if (!status.isOK()) this.createClasspathProblemMarker(status); } } /** * Reset the collection of package fragment roots (local ones) - only if opened. */ public void updatePackageFragmentRoots(){ if (this.isOpen()) { try { JavaProjectElementInfo info = getJavaProjectElementInfo(); computeChildren(info); } catch(JavaModelException e){ try { close(); // could not do better } catch(JavaModelException ex){ // ignore } } } } }
[ "375833274@qq.com" ]
375833274@qq.com
5545dd3f48591add50f1ffb9c682ce96755c6718
b6e9d5d0930cdc0b192d39e4e844aba43bb5ac7a
/plugins/xfire-0.8.3/src/java/org/grails/xfire/aegis/type/DefaultTypeCreator.java
92767aaa2adee19f6046cd507c6a037453a4db29
[ "Apache-2.0" ]
permissive
amull6/vehcert_12_26
2c2c2fa94d4825462915cd8eced49de02e2028f3
df3ce288f20dcdf1f6c0dd5e98972e44bce6a2f4
refs/heads/master
2020-04-13T21:40:44.688364
2019-05-15T02:35:09
2019-05-15T02:35:09
163,461,482
1
1
null
null
null
null
UTF-8
Java
false
false
4,105
java
package org.grails.xfire.aegis.type; import java.beans.PropertyDescriptor; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; import org.codehaus.groovy.grails.commons.DomainClassArtefactHandler; import org.codehaus.xfire.XFireRuntimeException; import org.grails.xfire.ServiceFactoryBean; import org.grails.xfire.aegis.type.basic.BeanType; import org.grails.xfire.aegis.type.basic.BeanTypeInfo; public class DefaultTypeCreator extends AbstractTypeCreator { public DefaultTypeCreator() { } public DefaultTypeCreator(Configuration configuration) { setConfiguration(configuration); } public TypeClassInfo createClassInfo(Method m, int index) { TypeClassInfo info = new TypeClassInfo(); if (index >= 0) { java.lang.reflect.Type t = m.getGenericParameterTypes()[index]; if(t instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType)t; info.setGenericType((Class)pt.getActualTypeArguments()[0]); } info.setTypeClass(m.getParameterTypes()[index]); } else { // System.out.println(m); java.lang.reflect.Type t = m.getGenericReturnType(); if(t instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType)t; info.setGenericType((Class)pt.getActualTypeArguments()[0]); } info.setTypeClass(m.getReturnType()); } return info; } public TypeClassInfo createClassInfo(PropertyDescriptor pd) { TypeClassInfo info = createBasicClassInfo(pd.getPropertyType()); try { Class c = ServiceFactoryBean.getApp().getClassLoader().loadClass(pd.getShortDescription()); if (ServiceFactoryBean.getApp().isArtefactOfType(DomainClassArtefactHandler.TYPE, c)) { if ((pd.getPropertyType().getName().equals("java.util.Set") || pd.getPropertyType().getName().equals("java.util.List") ) && !pd.getShortDescription().equals("")) { info.setGenericType(c); return info; } } } catch (Exception e) { // do nothing, it's not a Grails domain class } Method m = pd.getReadMethod(); java.lang.reflect.Type t = m.getGenericReturnType(); if(t instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType)t; info.setGenericType((Class)pt.getActualTypeArguments()[0]); } return info; } public Type createCollectionType(TypeClassInfo info) { System.out.println("================="); System.out.println(info.description); System.out.println(info.flat); System.out.println(info.genericType); System.out.println(info.keyType); System.out.println(info.mappedName); System.out.println(info.type); System.out.println(info.typeClass); System.out.println(info.typeName); System.out.println("================="); if (info.getGenericType() == null) { throw new XFireRuntimeException("Cannot create mapping for " + info.getTypeClass().getName() + ", unspecified component type for " + info.getDescription()); } return createCollectionTypeFromGeneric(info); } public Type createDefaultType(TypeClassInfo info) { BeanType type = new BeanType(); type.setSchemaType(createQName(info.getTypeClass())); type.setTypeClass(info.getTypeClass()); type.setTypeMapping(getTypeMapping()); BeanTypeInfo typeInfo = type.getTypeInfo(); typeInfo.setDefaultMinOccurs(getConfiguration().getDefaultMinOccurs()); typeInfo.setExtensibleAttributes(getConfiguration().isDefaultExtensibleAttributes()); typeInfo.setExtensibleElements(getConfiguration().isDefaultExtensibleElements()); return type; } }
[ "250676978@qq.com" ]
250676978@qq.com