hexsha
stringlengths 40
40
| size
int64 3
1.05M
| ext
stringclasses 1
value | lang
stringclasses 1
value | max_stars_repo_path
stringlengths 5
1.02k
| max_stars_repo_name
stringlengths 4
126
| max_stars_repo_head_hexsha
stringlengths 40
78
| max_stars_repo_licenses
sequence | max_stars_count
float64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 5
1.02k
| max_issues_repo_name
stringlengths 4
114
| max_issues_repo_head_hexsha
stringlengths 40
78
| max_issues_repo_licenses
sequence | max_issues_count
float64 1
92.2k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 5
1.02k
| max_forks_repo_name
stringlengths 4
136
| max_forks_repo_head_hexsha
stringlengths 40
78
| max_forks_repo_licenses
sequence | max_forks_count
float64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | avg_line_length
float64 2.55
99.9
| max_line_length
int64 3
1k
| alphanum_fraction
float64 0.25
1
| index
int64 0
1M
| content
stringlengths 3
1.05M
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3e007967c68dbd268b1eba7d2c3cf6fa2af73a51 | 1,400 | java | Java | aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesisanalytics/model/TooManyTagsException.java | ericvincent83/aws-sdk-java | c491416f3ea9411a04d9bafedee6c6874a79e48d | [
"Apache-2.0"
] | 3,372 | 2015-01-03T00:35:43.000Z | 2022-03-31T15:56:24.000Z | aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesisanalytics/model/TooManyTagsException.java | ericvincent83/aws-sdk-java | c491416f3ea9411a04d9bafedee6c6874a79e48d | [
"Apache-2.0"
] | 2,391 | 2015-01-01T12:55:24.000Z | 2022-03-31T08:01:50.000Z | aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesisanalytics/model/TooManyTagsException.java | ericvincent83/aws-sdk-java | c491416f3ea9411a04d9bafedee6c6874a79e48d | [
"Apache-2.0"
] | 2,876 | 2015-01-01T14:38:37.000Z | 2022-03-29T19:53:10.000Z | 36.842105 | 121 | 0.735 | 201 | /*
* Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.kinesisanalytics.model;
import javax.annotation.Generated;
/**
* <p>
* Application created with too many tags, or too many tags added to an application. Note that the maximum number of
* application tags includes system tags. The maximum number of user-defined application tags is 50.
* </p>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class TooManyTagsException extends com.amazonaws.services.kinesisanalytics.model.AmazonKinesisAnalyticsException {
private static final long serialVersionUID = 1L;
/**
* Constructs a new TooManyTagsException with the specified error message.
*
* @param message
* Describes the error encountered.
*/
public TooManyTagsException(String message) {
super(message);
}
}
|
3e00797599a7b524478e1766e075ef72ef6f026d | 6,357 | java | Java | demo/demo/src/main/java/com/ksyun/ts/demo/RecordActivity.java | ksvc/KSVSShortVideoCore_Android | 839fb0cd0aa8c556951b73cc11daf9ff1a1d5fdc | [
"Apache-2.0"
] | 7 | 2018-01-04T02:39:25.000Z | 2020-11-02T06:26:24.000Z | demo/demo/src/main/java/com/ksyun/ts/demo/RecordActivity.java | ksvc/KSVSShortVideoCore_Android | 839fb0cd0aa8c556951b73cc11daf9ff1a1d5fdc | [
"Apache-2.0"
] | null | null | null | demo/demo/src/main/java/com/ksyun/ts/demo/RecordActivity.java | ksvc/KSVSShortVideoCore_Android | 839fb0cd0aa8c556951b73cc11daf9ff1a1d5fdc | [
"Apache-2.0"
] | 5 | 2018-01-04T02:39:27.000Z | 2020-07-23T04:05:50.000Z | 37.615385 | 127 | 0.630958 | 202 | package com.ksyun.ts.demo;
import android.app.Activity;
import android.content.Intent;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.ksyun.media.shortvideo.kit.KSYRecordKit;
import com.ksyun.media.streamer.capture.CameraCapture;
import com.ksyun.media.streamer.encoder.VideoEncodeFormat;
import com.ksyun.media.streamer.framework.AVConst;
import com.ksyun.media.streamer.kit.KSYStreamer;
import com.ksyun.media.streamer.kit.StreamerConstants;
import com.ksyun.ts.shortvideo.common.util.KLog;
import java.io.File;
/**
* @Author: [xiaoqiang]
* @Description: [RecordActivity]
* @CreateDate: [2017/12/22]
* @UpdateDate: [2017/12/22]
* @UpdateUser: [xiaoqiang]
* @UpdateRemark: []
*/
public class RecordActivity extends Activity {
private final static String TAG = RecordActivity.class.getName();
private KSYRecordKit mKSYRecordKit;
private GLSurfaceView mCameraPreviewView;
private Button mStartButton;
private TextView mRecordTime;
private Handler mHandler;
private int mTime = 5;
public final static void startActivityForResult(Activity context, int request) {
Intent intent = new Intent(context, RecordActivity.class);
context.startActivityForResult(intent, request);
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_record);
mCameraPreviewView = findViewById(R.id.gl_surface);
mStartButton = findViewById(R.id.btn_record);
mRecordTime = findViewById(R.id.tv_record);
mHandler = new Handler();
init();
mStartButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mStartButton.setVisibility(View.GONE);
File file = new File(Environment.getExternalStorageDirectory() + "/ksyun/"
+ getPackageName());
if (!file.exists()) {
file.mkdirs();
}
mTime = 5;
boolean status = mKSYRecordKit.startRecord(file.getAbsolutePath() + "/" + System.currentTimeMillis() + ".mp4");
if (status) {
mHandler.postDelayed(mRunnable, 1000);
}
}
});
}
private Runnable mRunnable = new Runnable() {
@Override
public void run() {
mTime--;
mRecordTime.setText("测试录制功能,Demo中只是录制5秒视频\n" +
"录制倒计时:" + mTime);
if (mTime <= 0) {
File file = new File(Environment.getExternalStorageDirectory() + "/ksyun/"
+ getPackageName());
if (!file.exists()) {
file.mkdirs();
}
String outFile = file.getAbsolutePath() + "/" +
"merger_" + System.currentTimeMillis() + ".mp4";
mKSYRecordKit.stopRecord(outFile, mMergeListener);
} else {
mHandler.postDelayed(mRunnable, 1000);
}
}
};
private void init() {
mKSYRecordKit = new KSYRecordKit(RecordActivity.this);
mKSYRecordKit.setPreviewFps(StreamerConstants.DEFAULT_TARGET_FPS);
mKSYRecordKit.setTargetFps(StreamerConstants.DEFAULT_TARGET_FPS);
mKSYRecordKit.setVideoKBitrate(StreamerConstants.DEFAULT_INIT_VIDEO_BITRATE);
mKSYRecordKit.setAudioKBitrate(StreamerConstants.DEFAULT_AUDIO_BITRATE);
mKSYRecordKit.setPreviewResolution(StreamerConstants.VIDEO_RESOLUTION_480P);
mKSYRecordKit.setTargetResolution(StreamerConstants.VIDEO_RESOLUTION_480P);
mKSYRecordKit.setVideoCodecId(AVConst.CODEC_ID_AVC);
mKSYRecordKit.setEncodeMethod(StreamerConstants.ENCODE_METHOD_SOFTWARE);
mKSYRecordKit.setVideoEncodeProfile(VideoEncodeFormat.ENCODE_PROFILE_LOW_POWER);
mKSYRecordKit.setRotateDegrees(0);
mKSYRecordKit.setEnableRepeatLastFrame(false);
mKSYRecordKit.setCameraFacing(CameraCapture.FACING_FRONT);
mKSYRecordKit.setFrontCameraMirror(true);
mKSYRecordKit.setOnInfoListener(new KSYStreamer.OnInfoListener() {
@Override
public void onInfo(int i, int i1, int i2) {
KLog.e(TAG, "ONINFO:" + i + "," + i1 + "," + i2);
}
});
mKSYRecordKit.setOnErrorListener(new KSYStreamer.OnErrorListener() {
@Override
public void onError(int i, int i1, int i2) {
KLog.e(TAG, "onError:" + i + "," + i1 + "," + i2);
}
});
}
@Override
public void onResume() {
super.onResume();
mKSYRecordKit.setDisplayPreview(mCameraPreviewView);
mKSYRecordKit.onResume();
mKSYRecordKit.startCameraPreview();
}
@Override
public void onPause() {
super.onPause();
mKSYRecordKit.onPause();
if (!mKSYRecordKit.isRecording() && !mKSYRecordKit.isFileRecording()) {
mKSYRecordKit.stopCameraPreview();
}
}
@Override
public void onDestroy() {
super.onDestroy();
if (mKSYRecordKit != null) {
mKSYRecordKit.setOnInfoListener(null);
mKSYRecordKit.setOnErrorListener(null);
mCameraPreviewView = null;
mKSYRecordKit.setDisplayPreview(mCameraPreviewView);
mKSYRecordKit.setOnLogEventListener(null);
mKSYRecordKit.release();
mKSYRecordKit = null;
}
}
private KSYRecordKit.MergeFilesFinishedListener mMergeListener =
new KSYRecordKit.MergeFilesFinishedListener() {
@Override
public void onFinished(String s) {
Intent intent = new Intent();
intent.putExtra(MainActivity.VIDEOPATH, s);
setResult(Activity.RESULT_OK, intent);
Toast.makeText(RecordActivity.this, "视频录制完成,点击编辑按钮进行视频编辑", Toast.LENGTH_SHORT).show();
finish();
}
};
}
|
3e007978d26a3d9e45397c36ce3e38cba67bfb6e | 1,024 | java | Java | lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/util/MonotonicMultiHashMap.java | anupam128/reef | b90a3f690e859fa23319abe33fdbc259007fa393 | [
"Apache-2.0"
] | 1 | 2018-04-10T18:43:04.000Z | 2018-04-10T18:43:04.000Z | lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/util/MonotonicMultiHashMap.java | anupam128/reef | b90a3f690e859fa23319abe33fdbc259007fa393 | [
"Apache-2.0"
] | 8 | 2020-12-07T06:33:15.000Z | 2021-07-07T06:05:35.000Z | lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/util/MonotonicMultiHashMap.java | anupam128/reef | b90a3f690e859fa23319abe33fdbc259007fa393 | [
"Apache-2.0"
] | 1 | 2017-07-19T06:06:38.000Z | 2017-07-19T06:06:38.000Z | 39.384615 | 82 | 0.749023 | 203 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 org.apache.reef.tang.util;
public class MonotonicMultiHashMap<K, V> extends AbstractMonotonicMultiMap<K, V> {
public MonotonicMultiHashMap() {
super(new MonotonicHashMap<K, java.util.Set<V>>());
}
}
|
3e007bd985379e801d7ebd3510ef978ce0df24e6 | 2,491 | java | Java | src/main/java/svenhjol/charm/module/Tinted.java | Blueberryy/CharmForge | e3987659b7a4a1e94a61cb14d4cc3a07d13d6072 | [
"MIT"
] | 16 | 2020-12-28T17:59:22.000Z | 2022-01-13T21:32:06.000Z | src/main/java/svenhjol/charm/module/Tinted.java | Blueberryy/CharmForge | e3987659b7a4a1e94a61cb14d4cc3a07d13d6072 | [
"MIT"
] | 139 | 2020-12-27T06:07:03.000Z | 2022-03-18T03:11:06.000Z | src/main/java/svenhjol/charm/module/Tinted.java | Blueberryy/CharmForge | e3987659b7a4a1e94a61cb14d4cc3a07d13d6072 | [
"MIT"
] | 13 | 2020-12-25T18:14:31.000Z | 2022-03-09T03:43:30.000Z | 33.213333 | 227 | 0.691289 | 204 | package svenhjol.charm.module;
import net.minecraft.item.DyeItem;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import svenhjol.charm.Charm;
import svenhjol.charm.base.CharmModule;
import svenhjol.charm.base.handler.ModuleHandler;
import svenhjol.charm.base.helper.EnchantmentsHelper;
import svenhjol.charm.base.iface.Config;
import svenhjol.charm.base.iface.Module;
import svenhjol.charm.enchantment.TintedEnchantment;
import svenhjol.charm.handler.ColoredGlintHandler;
@Module(mod = Charm.MOD_ID, hasSubscriptions = true, description = "When applied, this enchantment lets you change the color of the enchanted glint using dye on an anvil. Requires Core 'Enchantment glint override' to be true.")
public class Tinted extends CharmModule {
public static TintedEnchantment TINTED;
@Config(name = "XP cost", description = "Number of levels required to change a tinted item using dye on an anvil.")
public static int xpCost = 0;
@Override
public void register() {
TINTED = new TintedEnchantment(this);
}
@Override
public boolean depends() {
return Core.overrideGlint;
}
@Override
public void init() {
if (!ModuleHandler.enabled(AnvilImprovements.class) && xpCost < 1)
xpCost = 1;
}
@SubscribeEvent
public void onAnvilUpdate(AnvilUpdateEvent event) {
if (!event.isCanceled())
handleAnvilBehavior(event);
}
/**
* Adds the enchantment and color directly to the input stack with no sanity checking.
*/
public static void applyTint(ItemStack stack, String color) {
EnchantmentsHelper.apply(stack, TINTED, 1);
stack.getOrCreateTag().putString(ColoredGlintHandler.GLINT_TAG, color);
}
private void handleAnvilBehavior(AnvilUpdateEvent event) {
ItemStack out;
ItemStack left = event.getLeft();
ItemStack right = event.getRight();
if (left.isEmpty() || right.isEmpty())
return;
if (!EnchantmentsHelper.has(left, TINTED) || !(right.getItem() instanceof DyeItem))
return;
int cost = Math.max(0, xpCost);
out = left.copy();
DyeItem dye = (DyeItem)right.getItem();
String color = dye.getDyeColor().getString();
applyTint(out, color);
event.setMaterialCost(1);
event.setCost(cost);
event.setOutput(out);
}
}
|
3e007c24a74c8fee1382e52dd88eb9a71e6d1f1f | 152 | java | Java | backup/dumps-1.0.0/dump-SeaShellsClient/package-info.java | jesperancinha/sea-shell-archiver | c69eb5820b146e6a3834c3fa7218d7c1a7b06fce | [
"Apache-2.0"
] | 1 | 2020-09-05T14:40:46.000Z | 2020-09-05T14:40:46.000Z | backup/dumps-1.0.0/dump-SeaShellsClient/package-info.java | jesperancinha/sea-shell-archiver | c69eb5820b146e6a3834c3fa7218d7c1a7b06fce | [
"Apache-2.0"
] | 8 | 2021-07-25T11:00:54.000Z | 2022-03-25T15:53:40.000Z | backup/dumps-1.0.0/dump-SeaShellsClient/package-info.java | jesperancinha/sea-shell-archiver | c69eb5820b146e6a3834c3fa7218d7c1a7b06fce | [
"Apache-2.0"
] | null | null | null | 50.666667 | 104 | 0.822368 | 205 | @javax.xml.bind.annotation.XmlSchema(namespace = "http://org.jesperancinha.shells/SeaShellsWSDLShells/")
package org.jesperancinha.shell.client.shells;
|
3e007dd429956ba5b145387b98288cdc21ea7f19 | 552 | java | Java | backend/src/main/java/com/homeproject/blog/backend/presentationlayer/converters/CommentModelToCommentDTOConverter.java | varhanovdm/home-project-blog | 8b29a0aea8c8639edf7d29bed34995baad6cbc0e | [
"MIT"
] | null | null | null | backend/src/main/java/com/homeproject/blog/backend/presentationlayer/converters/CommentModelToCommentDTOConverter.java | varhanovdm/home-project-blog | 8b29a0aea8c8639edf7d29bed34995baad6cbc0e | [
"MIT"
] | null | null | null | backend/src/main/java/com/homeproject/blog/backend/presentationlayer/converters/CommentModelToCommentDTOConverter.java | varhanovdm/home-project-blog | 8b29a0aea8c8639edf7d29bed34995baad6cbc0e | [
"MIT"
] | null | null | null | 34.5 | 94 | 0.788043 | 206 | package com.homeproject.blog.backend.presentationlayer.converters;
import com.homeproject.blog.backend.businesslayer.dto.CommentDTO;
import com.homeproject.blog.backend.presentationlayer.model.Comment;
import org.springframework.stereotype.Component;
@Component
public class CommentModelToCommentDTOConverter implements BlogConverter<Comment, CommentDTO> {
@Override
public CommentDTO convert(Comment source) {
CommentDTO commentDTO = new CommentDTO();
commentDTO.setText(source.getText());
return commentDTO;
}
}
|
3e007f096e0d4e67481de88ac230964a6fab8f0b | 3,531 | java | Java | android/app/src/main/java/org/autojs/autojs/ui/widget/BubblePopupMenu.java | snailuncle/autojs-web-control | ec4586109c6b5da01183eb3f63913904e72b99c7 | [
"MIT"
] | null | null | null | android/app/src/main/java/org/autojs/autojs/ui/widget/BubblePopupMenu.java | snailuncle/autojs-web-control | ec4586109c6b5da01183eb3f63913904e72b99c7 | [
"MIT"
] | 2 | 2021-03-02T01:47:51.000Z | 2021-07-20T07:46:49.000Z | android/app/src/main/java/org/autojs/autojs/ui/widget/BubblePopupMenu.java | FFHixio/autojs-web-control | ec4586109c6b5da01183eb3f63913904e72b99c7 | [
"MIT"
] | 2 | 2020-10-04T18:15:49.000Z | 2020-12-01T17:51:29.000Z | 33.628571 | 133 | 0.653922 | 207 | package org.autojs.autojs.ui.widget;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import androidx.recyclerview.widget.RecyclerView;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;
import org.autojs.autojs.R;
import java.util.List;
/**
* Created by Stardust on 2017/5/23.
*/
public class BubblePopupMenu extends PopupWindow {
public interface OnItemClickListener {
void onClick(View view, int position);
}
private RecyclerView mRecyclerView;
private OnItemClickListener mOnItemClickListener;
private View mLittleTriangle;
public BubblePopupMenu(Context context, List<String> options) {
super(context);
View view = View.inflate(context, R.layout.bubble_popup_menu, null);
mLittleTriangle = view.findViewById(R.id.little_triangle);
mRecyclerView = (RecyclerView) view.findViewById(R.id.list);
mRecyclerView.setAdapter(new SimpleRecyclerViewAdapter<>(R.layout.bubble_popup_menu_item, options, MenuItemViewHolder::new));
setContentView(view);
setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
setOutsideTouchable(true);
setFocusable(true);
}
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
mOnItemClickListener = onItemClickListener;
}
public void showAsDropDownAtLocation(View parent, int contentHeight, int x, int y) {
int screenWidth = getContentView().getResources().getDisplayMetrics().widthPixels;
int screenHeight = getContentView().getResources().getDisplayMetrics().heightPixels;
int width = getContentView().getMeasuredWidth();
int height = getContentView().getMeasuredHeight();
LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mLittleTriangle.getLayoutParams();
if (x + width > screenWidth) {
params.leftMargin = x + width - screenWidth;
} else if (x < 0) {
params.leftMargin = x;
} else {
params.leftMargin = 0;
}
if (y > screenHeight / 2) {
getContentView().setRotation(180);
mRecyclerView.setRotation(180);
params.leftMargin = -params.leftMargin;
y -= contentHeight + height;
} else {
getContentView().setRotation(0);
mRecyclerView.setRotation(0);
}
mLittleTriangle.setLayoutParams(params);
super.showAtLocation(parent, Gravity.NO_GRAVITY, x, y);
}
public void preMeasure() {
getContentView().measure(getWidth(), getHeight());
}
private class MenuItemViewHolder extends BindableViewHolder<String> {
private TextView mOption;
public MenuItemViewHolder(View itemView) {
super(itemView);
mOption = (TextView) itemView.findViewById(R.id.option);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mOnItemClickListener != null) {
int i = mRecyclerView.getChildAdapterPosition(v);
mOnItemClickListener.onClick(v, i);
}
}
});
}
@Override
public void bind(String s, int position) {
mOption.setText(s);
}
}
}
|
3e007f1b18784721e9e20038cdbfcc2f74fa0312 | 36,951 | java | Java | api/src/test/java/io/strimzi/test/StrimziRunner.java | ppietruch/strimzi-kafka-operator | 18d55765a103cd3f1d4443eaa78465e77e848d5c | [
"Apache-2.0"
] | null | null | null | api/src/test/java/io/strimzi/test/StrimziRunner.java | ppietruch/strimzi-kafka-operator | 18d55765a103cd3f1d4443eaa78465e77e848d5c | [
"Apache-2.0"
] | null | null | null | api/src/test/java/io/strimzi/test/StrimziRunner.java | ppietruch/strimzi-kafka-operator | 18d55765a103cd3f1d4443eaa78465e77e848d5c | [
"Apache-2.0"
] | null | null | null | 43.574292 | 168 | 0.565885 | 208 | /*
* Copyright 2018, Strimzi authors.
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
*/
package io.strimzi.test;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
import io.strimzi.api.kafka.model.KafkaAssembly;
import io.strimzi.api.kafka.model.KafkaConnectAssembly;
import io.strimzi.test.k8s.BaseKubeClient;
import io.strimzi.test.k8s.KubeClient;
import io.strimzi.test.k8s.KubeClusterException;
import io.strimzi.test.k8s.KubeClusterResource;
import io.strimzi.test.k8s.Minishift;
import io.strimzi.test.k8s.OpenShift;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.ClassRule;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.Annotatable;
import org.junit.runners.model.FrameworkField;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.Statement;
import org.junit.runners.model.TestClass;
import java.io.File;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.annotation.Repeatable;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Stack;
import java.util.function.Consumer;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import static io.strimzi.test.TestUtils.indent;
import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
import static java.util.Collections.singletonList;
/**
* A test runner which sets up Strimzi resources in a Kubernetes cluster
* according to annotations ({@link Namespace}, {@link Resources}, {@link ClusterOperator}, {@link KafkaFromClasspathYaml})
* on the test class and/or test methods. {@link OpenShiftOnly} can be used to ignore tests when not running on
* OpenShift (if the thing under test is OpenShift-specific).
*/
public class StrimziRunner extends BlockJUnit4ClassRunner {
private static final Logger LOGGER = LogManager.getLogger(StrimziRunner.class);
/**
* If env var NOTEARDOWN is set to any value then teardown for resources supported by annotations
* won't happen. This can be useful in debugging a single test, because it leaves the cluster
* in the state it was in when the test failed.
*/
public static final String NOTEARDOWN = "NOTEARDOWN";
public static final String KAFKA_PERSISTENT_YAML = "../examples/kafka/kafka-persistent.yaml";
public static final String KAFKA_CONNECT_YAML = "../examples/kafka-connect/kafka-connect.yaml";
public static final String CO_INSTALL_DIR = "../examples/install/cluster-operator";
public static final String CO_DEPLOYMENT_NAME = "strimzi-cluster-operator";
public static final String TOPIC_CM = "../examples/configmaps/topic-operator/kafka-topic-configmap.yaml";
private KubeClusterResource clusterResource;
public StrimziRunner(Class<?> klass) throws InitializationError {
super(klass);
}
@Override
protected boolean isIgnored(FrameworkMethod child) {
if (super.isIgnored(child)) {
return true;
} else {
return isWrongClusterType(getTestClass(), child) || isWrongClusterType(child, child)
|| isIgnoredByTestGroup(getTestClass(), child) || isIgnoredByTestGroup(child, child);
}
}
private boolean isWrongClusterType(Annotatable annotated, FrameworkMethod test) {
boolean result = annotated.getAnnotation(OpenShiftOnly.class) != null
&& !(clusterResource().cluster() instanceof OpenShift
|| clusterResource().cluster() instanceof Minishift);
if (result) {
LOGGER.info("{} is @OpenShiftOnly, but the running cluster is not OpenShift: Ignoring {}", name(annotated), name(test));
}
return result;
}
private boolean isIgnoredByTestGroup(Annotatable annotated, FrameworkMethod test) {
JUnitGroup testGroup = annotated.getAnnotation(JUnitGroup.class);
if (testGroup == null) {
return false;
}
Collection<String> enabledGroups = getEnabledGroups(testGroup.systemProperty());
Collection<String> declaredGroups = getDeclaredGroups(testGroup);
if (isGroupEnabled(enabledGroups, declaredGroups)) {
LOGGER.info("Test group {} is enabled for method {}. Enabled test groups: {}",
declaredGroups, test.getName(), enabledGroups);
return false;
}
LOGGER.info("None of the test groups {} are enabled for method {}. Enabled test groups: {}",
declaredGroups, test.getName(), enabledGroups);
return true;
}
private static Collection<String> getEnabledGroups(String key) {
Collection<String> enabledGroups = splitProperties(System.getProperty(key));
return enabledGroups;
}
private static Collection<String> getDeclaredGroups(JUnitGroup testGroup) {
String[] declaredGroups = testGroup.name();
return new HashSet<>(Arrays.asList(declaredGroups));
}
private static Collection<String> splitProperties(String commaSeparated) {
if (commaSeparated == null || commaSeparated.trim().isEmpty()) {
return Collections.emptySet();
}
return new HashSet<>(Arrays.asList(commaSeparated.split(",+")));
}
/**
* A test group is enabled if {@link JUnitGroup#ALL_GROUPS} is defined or
* the declared test groups contain at least one defined test group
* @param enabledGroups Test groups that are enabled for execution.
* @param declaredGroups Test groups that are declared in the {@link JUnitGroup} annotation.
* @return boolean name with actual status
*/
private static boolean isGroupEnabled(Collection<String> enabledGroups, Collection<String> declaredGroups) {
if (enabledGroups.contains(JUnitGroup.ALL_GROUPS) || (enabledGroups.isEmpty() && declaredGroups.isEmpty())) {
return true;
}
for (String enabledGroup : enabledGroups) {
if (declaredGroups.contains(enabledGroup)) {
return true;
}
}
return false;
}
@Override
protected Statement methodBlock(FrameworkMethod method) {
Statement statement = super.methodBlock(method);
statement = new Bracket(statement, () -> e -> {
LOGGER.info("Test {} failed, due to {}", method.getName(), e, e);
}) {
@Override
protected void before() {
}
@Override
protected void after() {
}
};
statement = withConnectClusters(method, statement);
statement = withKafkaClusters(method, statement);
statement = withClusterOperator(method, statement);
statement = withResources(method, statement);
statement = withTopic(method, statement);
statement = withNamespaces(method, statement);
statement = withLogging(method, statement);
return statement;
}
/**
* Get the (possibly @Repeatable) annotations on the given element.
* @param element
* @param annotationType
* @param <A>
* @return
*/
<A extends Annotation> List<A> annotations(Annotatable element, Class<A> annotationType) {
final List<A> list;
A c = element.getAnnotation(annotationType);
if (c != null) {
list = singletonList(c);
} else {
Repeatable r = annotationType.getAnnotation(Repeatable.class);
if (r != null) {
Class<? extends Annotation> ra = r.value();
Annotation container = element.getAnnotation(ra);
if (container != null) {
try {
Method value = ra.getDeclaredMethod("value");
list = asList((A[]) value.invoke(container));
} catch (ReflectiveOperationException e) {
throw new RuntimeException(e);
}
} else {
list = emptyList();
}
} else {
list = emptyList();
}
}
return list;
}
abstract class Bracket extends Statement implements Runnable {
private final Statement statement;
private final Thread hook = new Thread(this);
private final Supplier<Consumer<? super Throwable>> onError;
public Bracket(Statement statement, Supplier<Consumer<? super Throwable>> onError) {
this.statement = statement;
this.onError = onError;
}
@Override
public void evaluate() throws Throwable {
// All this fuss just to ensure that the first thrown exception is what propagates
Throwable thrown = null;
try {
Runtime.getRuntime().addShutdownHook(hook);
before();
statement.evaluate();
} catch (Throwable e) {
thrown = e;
if (onError != null) {
try {
onError.get().accept(e);
} catch (Throwable t) {
thrown.addSuppressed(t);
}
}
} finally {
try {
Runtime.getRuntime().removeShutdownHook(hook);
runAfter();
} catch (Throwable e) {
if (thrown != null) {
thrown.addSuppressed(e);
throw thrown;
} else {
thrown = e;
}
}
if (thrown != null) {
throw thrown;
}
}
}
/** Runs before the test */
protected abstract void before();
/** Runs after the test, even it if failed or the JVM can killed */
protected abstract void after();
@Override
public void run() {
runAfter();
}
public void runAfter() {
if (System.getenv(NOTEARDOWN) == null) {
after();
}
}
}
protected KubeClient<?> kubeClient() {
return clusterResource().client();
}
String name(Annotatable a) {
if (a instanceof TestClass) {
return "class " + ((TestClass) a).getJavaClass().getSimpleName();
} else if (a instanceof FrameworkMethod) {
FrameworkMethod method = (FrameworkMethod) a;
return "method " + method.getDeclaringClass().getSimpleName() + "." + method.getName() + "()";
} else if (a instanceof FrameworkField) {
FrameworkField field = (FrameworkField) a;
return "field " + field.getDeclaringClass().getSimpleName() + "." + field.getName();
} else {
return a.toString();
}
}
Class<?> testClass(Annotatable a) {
if (a instanceof TestClass) {
return ((TestClass) a).getJavaClass();
} else if (a instanceof FrameworkMethod) {
FrameworkMethod method = (FrameworkMethod) a;
return method.getDeclaringClass();
} else if (a instanceof FrameworkField) {
FrameworkField field = (FrameworkField) a;
return field.getDeclaringClass();
} else {
throw new RuntimeException("Unexpected annotatable element " + a);
}
}
String getContent(File file, Consumer<JsonNode> edit) {
YAMLMapper mapper = new YAMLMapper();
try {
JsonNode node = mapper.readTree(file);
edit.accept(node);
return mapper.writeValueAsString(node);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private List<String> ccFirst(List<String> l) {
List<String> head = new ArrayList<>();
List<String> tail = new ArrayList<>();
for (String n : l) {
if (n.startsWith("strimzi-cluster-operator-")) {
head.add(n);
} else {
tail.add(n);
}
}
head.addAll(tail);
return head;
}
class ResourceName {
public final String kind;
public final String name;
public ResourceName(String kind, String name) {
this.kind = kind;
this.name = name;
}
}
class ResourceMatcher implements Supplier<List<ResourceName>> {
public final String kind;
public final String namePattern;
public ResourceMatcher(String kind, String namePattern) {
this.kind = kind;
this.namePattern = namePattern;
}
@Override
public List<ResourceName> get() {
return kubeClient().list(kind).stream()
.filter(name -> name.matches(namePattern))
.map(name -> new ResourceName(kind, name))
.collect(Collectors.toList());
}
}
class DumpLogsErrorAction implements Consumer<Throwable> {
private final Supplier<List<ResourceName>> podNameSupplier;
private final String container;
public DumpLogsErrorAction(Supplier<List<ResourceName>> podNameSupplier, String container) {
this.podNameSupplier = podNameSupplier;
this.container = container;
}
@Override
public void accept(Throwable t) {
for (ResourceName pod : podNameSupplier.get()) {
if (pod.kind.equals("pod") || pod.kind.equals("pods") || pod.kind.equals("po")) {
LOGGER.info("Logs from pod {}:{}{}", pod.name, System.lineSeparator(), indent(kubeClient().logs(pod.name, container)));
}
}
}
}
class DescribeErrorAction implements Consumer<Throwable> {
private final Supplier<List<ResourceName>> resources;
public DescribeErrorAction(Supplier<List<ResourceName>> resources) {
this.resources = resources;
}
@Override
public void accept(Throwable t) {
for (ResourceName resource : resources.get()) {
LOGGER.info("Description of {} '{}':{}{}", resource.kind, resource.name,
System.lineSeparator(), indent(kubeClient().getResourceAsYaml(resource.kind, resource.name)));
}
}
}
class ResourceAction<T extends ResourceAction<T>> implements Supplier<Consumer<Throwable>> {
protected List<Consumer<Throwable>> list = new ArrayList<>();
public ResourceAction getResources(ResourceMatcher resources) {
list.add(new DescribeErrorAction(resources));
return this;
}
public ResourceAction getResources(String kind, String pattern) {
return getResources(new ResourceMatcher(kind, pattern));
}
public ResourceAction getPo() {
return getPo(".*");
}
public ResourceAction getPo(String pattern) {
return getResources(new ResourceMatcher("pod", pattern));
}
public ResourceAction getDep() {
return getDep(".*");
}
public ResourceAction getDep(String pattern) {
return getResources(new ResourceMatcher("deployment", pattern));
}
public ResourceAction getSs() {
return getSs(".*");
}
public ResourceAction getSs(String pattern) {
return getResources(new ResourceMatcher("statefulset", pattern));
}
public ResourceAction logs(String pattern, String container) {
list.add(new DumpLogsErrorAction(new ResourceMatcher("pod", pattern), container));
return this;
}
/**
* Gets a result.
*
* @return a result
*/
@Override
public Consumer<Throwable> get() {
return t -> {
for (Consumer<Throwable> x : list) {
x.accept(t);
}
};
}
}
private void logState(Throwable t) {
LOGGER.info("The test is failing/erroring due to {}, here's some diagnostic output{}{}",
t, System.lineSeparator(), "----------------------------------------------------------------------");
for (String pod : ccFirst(kubeClient().list("pod"))) {
LOGGER.info("Logs from pod {}:{}{}", pod, System.lineSeparator(), indent(kubeClient().logs(pod)));
}
asList("pod", "deployment", "statefulset", "kafka", "kafkaconnect", "kafkaconnects2i").stream().forEach(resourceType -> {
try {
for (String resourceName : kubeClient().list(resourceType)) {
LOGGER.info("Description of {} '{}':{}{}", resourceType, resourceName,
System.lineSeparator(), indent(kubeClient().getResourceAsYaml(resourceType, resourceName)));
}
} catch (KubeClusterException e) {
t.addSuppressed(e);
}
});
LOGGER.info("That's all the diagnostic info, the exception {} will now propagate and the test will fail{}{}",
t,
t, System.lineSeparator(), "----------------------------------------------------------------------");
}
private Statement withConnectClusters(Annotatable element,
Statement statement) {
Statement last = statement;
KafkaConnectFromClasspathYaml cluster = element.getAnnotation(KafkaConnectFromClasspathYaml.class);
if (cluster != null) {
String[] resources = cluster.value().length == 0 ? new String[]{classpathResourceName(element)} : cluster.value();
for (String resource : resources) {
// use the example kafka-ephemeral as a template, but modify it according to the annotation
String yaml = TestUtils.readResource(testClass(element), resource);
KafkaConnectAssembly kafkaAssembly = TestUtils.fromYamlString(yaml, KafkaConnectAssembly.class);
String clusterName = kafkaAssembly.getMetadata().getName();
final String deploymentName = clusterName + "-connect";
last = new Bracket(last, new ResourceAction()
.getDep(deploymentName)
.getPo(deploymentName + ".*")
.logs(deploymentName + ".*", null)) {
@Override
protected void before() {
LOGGER.info("Creating connect cluster '{}' before test per @ConnectCluster annotation on {}", clusterName, name(element));
// create cm
kubeClient().clientWithAdmin().applyContent(yaml);
// wait for deployment
kubeClient().waitForDeployment(deploymentName, kafkaAssembly.getSpec().getReplicas());
}
@Override
protected void after() {
LOGGER.info("Deleting connect cluster '{}' after test per @ConnectCluster annotation on {}", clusterName, name(element));
// delete cm
kubeClient().clientWithAdmin().deleteContent(yaml);
// wait for ss to go
kubeClient().waitForResourceDeletion("deployment", deploymentName);
}
};
}
}
return last;
}
private Statement withKafkaClusters(Annotatable element,
Statement statement) {
Statement last = statement;
KafkaFromClasspathYaml cluster = element.getAnnotation(KafkaFromClasspathYaml.class);
if (cluster != null) {
String[] resources = cluster.value().length == 0 ? new String[]{classpathResourceName(element)} : cluster.value();
for (String resource : resources) {
// use the example kafka-ephemeral as a template, but modify it according to the annotation
String yaml = TestUtils.readResource(testClass(element), resource);
KafkaAssembly kafkaAssembly = TestUtils.fromYamlString(yaml, KafkaAssembly.class);
final String kafkaStatefulSetName = kafkaAssembly.getMetadata().getName() + "-kafka";
final String zookeeperStatefulSetName = kafkaAssembly.getMetadata().getName() + "-zookeeper";
final String tcDeploymentName = kafkaAssembly.getMetadata().getName() + "-topic-operator";
last = new Bracket(last, new ResourceAction()
.getPo(CO_DEPLOYMENT_NAME + ".*")
.logs(CO_DEPLOYMENT_NAME + ".*", null)
.getDep(CO_DEPLOYMENT_NAME)
.getSs(kafkaStatefulSetName)
.getPo(kafkaStatefulSetName + ".*")
.logs(kafkaStatefulSetName + ".*", null)
.getSs(zookeeperStatefulSetName)
.getPo(zookeeperStatefulSetName)
.logs(zookeeperStatefulSetName + ".*", "zookeeper")
.getDep(tcDeploymentName)
.logs(tcDeploymentName + ".*", null)) {
@Override
protected void before() {
LOGGER.info("Creating kafka cluster '{}' before test per @KafkaCluster annotation on {}", kafkaAssembly.getMetadata().getName(), name(element));
// create cm
kubeClient().clientWithAdmin().applyContent(yaml);
// wait for ss
LOGGER.info("Waiting for Zookeeper SS");
kubeClient().waitForStatefulSet(zookeeperStatefulSetName, kafkaAssembly.getSpec().getZookeeper().getReplicas());
// wait for ss
LOGGER.info("Waiting for Kafka SS");
kubeClient().waitForStatefulSet(kafkaStatefulSetName, kafkaAssembly.getSpec().getKafka().getReplicas());
// wait for TOs
LOGGER.info("Waiting for TC Deployment");
kubeClient().waitForDeployment(tcDeploymentName, 1);
}
@Override
protected void after() {
LOGGER.info("Deleting kafka cluster '{}' after test per @KafkaCluster annotation on {}", kafkaAssembly.getMetadata().getName(), name(element));
// delete cm
kubeClient().clientWithAdmin().deleteContent(yaml);
// wait for ss to go
kubeClient().waitForResourceDeletion("statefulset", kafkaStatefulSetName);
}
};
}
}
return last;
}
private String classpathResourceName(Annotatable element) {
if (element instanceof TestClass) {
return ((TestClass) element).getJavaClass().getSimpleName() + ".yaml";
} else if (element instanceof FrameworkMethod) {
return testClass(element).getSimpleName() + "." + ((FrameworkMethod) element).getName() + ".yaml";
} else if (element instanceof FrameworkField) {
return testClass(element).getSimpleName() + "." + ((FrameworkField) element).getName() + ".yaml";
} else {
throw new RuntimeException("Unexpected annotatable " + element);
}
}
private Statement withClusterOperator(Annotatable element,
Statement statement) {
Statement last = statement;
for (ClusterOperator cc : annotations(element, ClusterOperator.class)) {
Map<File, String> yamls = Arrays.stream(new File(CO_INSTALL_DIR).listFiles()).sorted().collect(Collectors.toMap(file -> file, f -> getContent(f, node -> {
// Change the docker org of the images in the 04-deployment.yaml
if ("05-Deployment-strimzi-cluster-operator.yaml".equals(f.getName())) {
String dockerOrg = System.getenv().getOrDefault("DOCKER_ORG", "strimzi");
String dockerTag = System.getenv().getOrDefault("DOCKER_TAG", "latest");
ObjectNode containerNode = (ObjectNode) node.get("spec").get("template").get("spec").get("containers").get(0);
containerNode.put("imagePullPolicy", "Always");
JsonNodeFactory factory = new JsonNodeFactory(false);
ObjectNode resources = new ObjectNode(factory);
ObjectNode requests = new ObjectNode(factory);
requests.put("cpu", "200m").put("memory", "512Mi");
ObjectNode limits = new ObjectNode(factory);
limits.put("cpu", "1000m").put("memory", "512Mi");
resources.set("requests", requests);
resources.set("limits", limits);
containerNode.replace("resources", resources);
containerNode.remove("resources");
JsonNode ccImageNode = containerNode.get("image");
((ObjectNode) containerNode).put("image", TestUtils.changeOrgAndTag(ccImageNode.asText(), dockerOrg, dockerTag));
for (JsonNode envVar : containerNode.get("env")) {
String varName = envVar.get("name").textValue();
// Replace all the default images with ones from the $DOCKER_ORG org and with the $DOCKER_TAG tag
if (varName.matches("STRIMZI_DEFAULT_.*_IMAGE")) {
String value = envVar.get("value").textValue();
((ObjectNode) envVar).put("value", TestUtils.changeOrgAndTag(value, dockerOrg, dockerTag));
}
// Set log level
if (varName.equals("STRIMZI_LOG_LEVEL")) {
String logLevel = System.getenv().getOrDefault("TEST_STRIMZI_LOG_LEVEL", "INFO");
((ObjectNode) envVar).put("value", logLevel);
}
// Updates default values of env variables
for (EnvVariables envVariable : cc.envVariables()) {
if (varName.equals(envVariable.key())) {
((ObjectNode) envVar).put("value", envVariable.value());
}
}
}
}
if (f.getName().matches(".*ClusterRoleBinding.*")) {
String ns = annotations(element, Namespace.class).get(0).value();
ArrayNode subjects = (ArrayNode) node.get("subjects");
ObjectNode subject = (ObjectNode) subjects.get(0);
subject.put("kind", "ServiceAccount")
.put("name", "strimzi-cluster-operator")
.put("namespace", ns);
LOGGER.info("Modified binding from {}: {}", f, node);
}
}), (x, y) -> x, LinkedHashMap::new));
last = new Bracket(last, new ResourceAction().getPo(CO_DEPLOYMENT_NAME + ".*")
.logs(CO_DEPLOYMENT_NAME + ".*", null)
.getDep(CO_DEPLOYMENT_NAME)) {
Stack<String> deletable = new Stack<>();
@Override
protected void before() {
// Here we record the state of the cluster
LOGGER.info("Creating cluster operator {} before test per @ClusterOperator annotation on {}", cc, name(element));
for (Map.Entry<File, String> entry: yamls.entrySet()) {
LOGGER.info("creating possibly modified version of {}", entry.getKey());
deletable.push(entry.getValue());
kubeClient().clientWithAdmin().applyContent(entry.getValue());
}
kubeClient().waitForDeployment(CO_DEPLOYMENT_NAME, 1);
}
@Override
protected void after() {
LOGGER.info("Deleting cluster operator {} after test per @ClusterOperator annotation on {}", cc, name(element));
while (!deletable.isEmpty()) {
kubeClient().clientWithAdmin().deleteContent(deletable.pop());
}
kubeClient().waitForResourceDeletion("deployment", CO_DEPLOYMENT_NAME);
}
};
}
return last;
}
private Statement withResources(Annotatable element,
Statement statement) {
Statement last = statement;
for (Resources resources : annotations(element, Resources.class)) {
last = new Bracket(last, null) {
@Override
protected void before() {
// Here we record the state of the cluster
LOGGER.info("Creating resources {}, before test per @Resources annotation on {}", Arrays.toString(resources.value()), name(element));
kubeClient().create(resources.value());
}
private KubeClient kubeClient() {
KubeClient client = StrimziRunner.this.kubeClient();
if (resources.asAdmin()) {
client = client.clientWithAdmin();
}
return client;
}
@Override
protected void after() {
LOGGER.info("Deleting resources {}, after test per @Resources annotation on {}", Arrays.toString(resources.value()), name(element));
// Here we verify the cluster is in the same state
kubeClient().delete(resources.value());
}
};
}
return last;
}
private Statement withNamespaces(Annotatable element,
Statement statement) {
Statement last = statement;
for (Namespace namespace : annotations(element, Namespace.class)) {
last = new Bracket(last, null) {
String previousNamespace = null;
@Override
protected void before() {
LOGGER.info("Creating namespace '{}' before test per @Namespace annotation on {}", namespace.value(), name(element));
kubeClient().createNamespace(namespace.value());
previousNamespace = kubeClient().namespace(namespace.value());
}
@Override
protected void after() {
LOGGER.info("Deleting namespace '{}' after test per @Namespace annotation on {}", namespace.value(), name(element));
kubeClient().deleteNamespace(namespace.value());
kubeClient().namespace(previousNamespace);
}
};
}
return last;
}
private boolean areAllChildrenIgnored() {
for (FrameworkMethod child : getChildren()) {
if (!isIgnored(child)) {
return false;
}
}
return true;
}
@Override
protected Statement classBlock(final RunNotifier notifier) {
Statement statement = super.classBlock(notifier);
TestClass testClass = getTestClass();
if (!areAllChildrenIgnored()) {
statement = new Bracket(statement, () -> e -> {
LOGGER.info("Failed to set up test class {}, due to {}", testClass.getName(), e, e);
}) {
@Override
protected void before() {
}
@Override
protected void after() {
}
};
statement = withConnectClusters(testClass, statement);
statement = withKafkaClusters(testClass, statement);
statement = withClusterOperator(testClass, statement);
statement = withResources(testClass, statement);
statement = withTopic(testClass, statement);
statement = withNamespaces(testClass, statement);
statement = withLogging(testClass, statement);
}
return statement;
}
/** Get the value of the @ClassRule-annotated KubeClusterResource field*/
private KubeClusterResource clusterResource() {
if (clusterResource == null) {
List<KubeClusterResource> fieldValues = getTestClass().getAnnotatedFieldValues(null, ClassRule.class, KubeClusterResource.class);
if (fieldValues == null || fieldValues.isEmpty()) {
fieldValues = getTestClass().getAnnotatedMethodValues(null, ClassRule.class, KubeClusterResource.class);
}
if (fieldValues == null || fieldValues.isEmpty()) {
clusterResource = new KubeClusterResource();
clusterResource.before();
} else {
clusterResource = fieldValues.get(0);
}
}
return clusterResource;
}
private Statement withTopic(Annotatable element, Statement statement) {
Statement last = statement;
for (Topic topic : annotations(element, Topic.class)) {
final JsonNodeFactory factory = JsonNodeFactory.instance;
final ObjectNode node = factory.objectNode();
node.put("apiVersion", "v1");
node.put("kind", "ConfigMap");
node.putObject("metadata");
JsonNode metadata = node.get("metadata");
((ObjectNode) metadata).put("name", topic.name());
((ObjectNode) metadata).putObject("labels");
JsonNode labels = metadata.get("labels");
((ObjectNode) labels).put("strimzi.io/kind", "topic");
((ObjectNode) labels).put("strimzi.io/cluster", topic.clusterName());
node.putObject("data");
JsonNode data = node.get("data");
((ObjectNode) data).put("name", topic.name());
((ObjectNode) data).put("partitions", topic.partitions());
((ObjectNode) data).put("replicas", topic.replicas());
String configMap = node.toString();
last = new Bracket(last, null) {
@Override
protected void before() {
LOGGER.info("Creating Topic {} {}", topic.name(), name(element));
// create cm
kubeClient().applyContent(configMap);
kubeClient().waitForResourceCreation(BaseKubeClient.CM, topic.name());
}
@Override
protected void after() {
LOGGER.info("Deleting ConfigMap '{}' after test per @Topic annotation on {}", topic.clusterName(), name(element));
// delete cm
kubeClient().deleteContent(configMap);
kubeClient().waitForResourceDeletion(BaseKubeClient.CM, topic.name());
}
};
}
return last;
}
private Statement withLogging(Annotatable element, Statement statement) {
return new Bracket(statement, null) {
private long t0;
@Override
protected void before() {
t0 = System.currentTimeMillis();
LOGGER.info("Starting {}", name(element));
System.out.println("travis_fold:start:" + name(element));
}
@Override
protected void after() {
System.out.println("travis_fold:end:" + name(element));
LOGGER.info("Finished {}: took {}",
name(element),
duration(System.currentTimeMillis() - t0));
}
};
}
private static String duration(long millis) {
long ms = millis % 1_000;
long time = millis / 1_000;
long minutes = time / 60;
long seconds = time % 60;
return minutes + "m" + seconds + "." + ms + "s";
}
}
|
3e007fc1656a93d93fba3166c21855b8a4cf09cb | 2,358 | java | Java | src/main/java/com/hifood/core/openApi/SpringFoxConfig.java | victorhgoli/hifood-api | de88d4067eca77d57bab21c433b864e9a6b330e0 | [
"MIT"
] | null | null | null | src/main/java/com/hifood/core/openApi/SpringFoxConfig.java | victorhgoli/hifood-api | de88d4067eca77d57bab21c433b864e9a6b330e0 | [
"MIT"
] | null | null | null | src/main/java/com/hifood/core/openApi/SpringFoxConfig.java | victorhgoli/hifood-api | de88d4067eca77d57bab21c433b864e9a6b330e0 | [
"MIT"
] | null | null | null | 32.805556 | 94 | 0.769687 | 209 | package com.hifood.core.openApi;
import java.util.Arrays;
import java.util.List;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import com.fasterxml.classmate.TypeResolver;
import com.hifood.api.exceptionhandler.Problem;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.builders.ResponseBuilder;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.service.Response;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
@Configuration
@EnableOpenApi
public class SpringFoxConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.OAS_30)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.hifood"))
.build()
.useDefaultResponseMessages(false)
.globalResponses(HttpMethod.GET, globalResponseMessages())
.globalResponses(HttpMethod.POST, globalResponseMessages())
.globalResponses(HttpMethod.PUT, globalResponseMessages())
.globalResponses(HttpMethod.DELETE, globalResponseMessages())
.additionalModels(new TypeResolver().resolve(Problem.class));
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Hifood")
.description("API aplicativo de delivery Hifood")
.version("1")
.contact(new Contact("Victor", "https://github.com/victorhgoli", "envkt@example.com"))
.build();
}
private List<Response> globalResponseMessages(){
return Arrays.asList(
new ResponseBuilder()
.code(String.valueOf(HttpStatus.BAD_REQUEST.value()))
.description("Requisicao inválida (erro do cliente)")
.build(),
new ResponseBuilder()
.code(String.valueOf(HttpStatus.INTERNAL_SERVER_ERROR.value()))
.description("Erro Interno do servidor")
.build(),
new ResponseBuilder()
.code(String.valueOf(HttpStatus.NOT_ACCEPTABLE.value()))
.description("Recurso não possui representação que poderia ser aceito pelo consumidor")
.build()
);
}
}
|
3e0080abb7290d8493fd6e32e7dd8824ccd06fd7 | 2,413 | java | Java | jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/TIdentityRecord.java | ben-manes/jOOQ | 9f160d5e869de1a9d66408d90718148f76c5e000 | [
"Apache-2.0"
] | 1 | 2020-05-24T20:35:57.000Z | 2020-05-24T20:35:57.000Z | jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/TIdentityRecord.java | ben-manes/jOOQ | 9f160d5e869de1a9d66408d90718148f76c5e000 | [
"Apache-2.0"
] | null | null | null | jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/TIdentityRecord.java | ben-manes/jOOQ | 9f160d5e869de1a9d66408d90718148f76c5e000 | [
"Apache-2.0"
] | null | null | null | 22.980952 | 204 | 0.594281 | 210 | /**
* This class is generated by jOOQ
*/
package org.jooq.test.sybase.generatedclasses.tables.records;
/**
* This class is generated by jOOQ.
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TIdentityRecord extends org.jooq.impl.TableRecordImpl<org.jooq.test.sybase.generatedclasses.tables.records.TIdentityRecord> implements org.jooq.Record2<java.lang.Integer, java.lang.Integer> {
private static final long serialVersionUID = 1040766862;
/**
* Setter for <code>DBA.t_identity.id</code>.
*/
public void setId(java.lang.Integer value) {
setValue(0, value);
}
/**
* Getter for <code>DBA.t_identity.id</code>.
*/
public java.lang.Integer getId() {
return (java.lang.Integer) getValue(0);
}
/**
* Setter for <code>DBA.t_identity.val</code>.
*/
public void setVal(java.lang.Integer value) {
setValue(1, value);
}
/**
* Getter for <code>DBA.t_identity.val</code>.
*/
public java.lang.Integer getVal() {
return (java.lang.Integer) getValue(1);
}
// -------------------------------------------------------------------------
// Record2 type implementation
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row2<java.lang.Integer, java.lang.Integer> fieldsRow() {
return (org.jooq.Row2) super.fieldsRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row2<java.lang.Integer, java.lang.Integer> valuesRow() {
return (org.jooq.Row2) super.valuesRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field1() {
return org.jooq.test.sybase.generatedclasses.tables.TIdentity.T_IDENTITY.ID;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field2() {
return org.jooq.test.sybase.generatedclasses.tables.TIdentity.T_IDENTITY.VAL;
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value1() {
return getId();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value2() {
return getVal();
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached TIdentityRecord
*/
public TIdentityRecord() {
super(org.jooq.test.sybase.generatedclasses.tables.TIdentity.T_IDENTITY);
}
}
|
3e0081457f4899a7dc09ea5458d7b6ecb7d8b23c | 68,799 | java | Java | sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsClientImpl.java | minnieliu/azure-sdk-for-java | 917efe5bf3d02a7be833c6a0602f5703e4d83d4e | [
"MIT"
] | 2 | 2020-12-08T18:36:16.000Z | 2021-10-18T03:32:47.000Z | sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsClientImpl.java | minnieliu/azure-sdk-for-java | 917efe5bf3d02a7be833c6a0602f5703e4d83d4e | [
"MIT"
] | null | null | null | sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsClientImpl.java | minnieliu/azure-sdk-for-java | 917efe5bf3d02a7be833c6a0602f5703e4d83d4e | [
"MIT"
] | 1 | 2022-01-31T19:22:33.000Z | 2022-01-31T19:22:33.000Z | 48.897655 | 120 | 0.663934 | 211 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.network.implementation;
import com.azure.core.annotation.BodyParam;
import com.azure.core.annotation.Delete;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
import com.azure.core.annotation.Headers;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.Patch;
import com.azure.core.annotation.PathParam;
import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.UnexpectedResponseExceptionType;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.PagedResponse;
import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.network.fluent.ExpressRoutePortsClient;
import com.azure.resourcemanager.network.fluent.models.ExpressRoutePortInner;
import com.azure.resourcemanager.network.models.ExpressRoutePortListResult;
import com.azure.resourcemanager.network.models.TagsObject;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing;
import java.nio.ByteBuffer;
import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in ExpressRoutePortsClient. */
public final class ExpressRoutePortsClientImpl
implements InnerSupportsGet<ExpressRoutePortInner>,
InnerSupportsListing<ExpressRoutePortInner>,
InnerSupportsDelete<Void>,
ExpressRoutePortsClient {
private final ClientLogger logger = new ClientLogger(ExpressRoutePortsClientImpl.class);
/** The proxy service used to perform REST calls. */
private final ExpressRoutePortsService service;
/** The service client containing this operation class. */
private final NetworkManagementClientImpl client;
/**
* Initializes an instance of ExpressRoutePortsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
ExpressRoutePortsClientImpl(NetworkManagementClientImpl client) {
this.service =
RestProxy.create(ExpressRoutePortsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
* The interface defining all the services for NetworkManagementClientExpressRoutePorts to be used by the proxy
* service to perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "NetworkManagementCli")
private interface ExpressRoutePortsService {
@Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network"
+ "/ExpressRoutePorts/{expressRoutePortName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> delete(
@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("expressRoutePortName") String expressRoutePortName,
Context context);
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network"
+ "/ExpressRoutePorts/{expressRoutePortName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ExpressRoutePortInner>> getByResourceGroup(
@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("expressRoutePortName") String expressRoutePortName,
Context context);
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network"
+ "/ExpressRoutePorts/{expressRoutePortName}")
@ExpectedResponses({200, 201})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> createOrUpdate(
@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("expressRoutePortName") String expressRoutePortName,
@BodyParam("application/json") ExpressRoutePortInner parameters,
Context context);
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network"
+ "/ExpressRoutePorts/{expressRoutePortName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ExpressRoutePortInner>> updateTags(
@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("expressRoutePortName") String expressRoutePortName,
@BodyParam("application/json") TagsObject parameters,
Context context);
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network"
+ "/ExpressRoutePorts")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ExpressRoutePortListResult>> listByResourceGroup(
@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
@PathParam("resourceGroupName") String resourceGroupName,
Context context);
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ExpressRoutePortListResult>> list(
@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
Context context);
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ExpressRoutePortListResult>> listByResourceGroupNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
@Headers({"Accept: application/json", "Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<ExpressRoutePortListResult>> listNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
}
/**
* Deletes the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
String resourceGroupName, String expressRoutePortName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (expressRoutePortName == null) {
return Mono
.error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
return FluxUtil
.withContext(
context ->
service
.delete(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
apiVersion,
resourceGroupName,
expressRoutePortName,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
/**
* Deletes the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
String resourceGroupName, String expressRoutePortName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (expressRoutePortName == null) {
return Mono
.error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
context = this.client.mergeContext(context);
return service
.delete(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
apiVersion,
resourceGroupName,
expressRoutePortName,
context);
}
/**
* Deletes the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String expressRoutePortName) {
Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, expressRoutePortName);
return this
.client
.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
}
/**
* Deletes the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
String resourceGroupName, String expressRoutePortName, Context context) {
context = this.client.mergeContext(context);
Mono<Response<Flux<ByteBuffer>>> mono =
deleteWithResponseAsync(resourceGroupName, expressRoutePortName, context);
return this
.client
.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
}
/**
* Deletes the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String expressRoutePortName) {
return beginDeleteAsync(resourceGroupName, expressRoutePortName).getSyncPoller();
}
/**
* Deletes the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String expressRoutePortName, Context context) {
return beginDeleteAsync(resourceGroupName, expressRoutePortName, context).getSyncPoller();
}
/**
* Deletes the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> deleteAsync(String resourceGroupName, String expressRoutePortName) {
return beginDeleteAsync(resourceGroupName, expressRoutePortName)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
* Deletes the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> deleteAsync(String resourceGroupName, String expressRoutePortName, Context context) {
return beginDeleteAsync(resourceGroupName, expressRoutePortName, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
* Deletes the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String expressRoutePortName) {
deleteAsync(resourceGroupName, expressRoutePortName).block();
}
/**
* Deletes the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String expressRoutePortName, Context context) {
deleteAsync(resourceGroupName, expressRoutePortName, context).block();
}
/**
* Retrieves the requested ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of ExpressRoutePort.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<ExpressRoutePortInner>> getByResourceGroupWithResponseAsync(
String resourceGroupName, String expressRoutePortName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (expressRoutePortName == null) {
return Mono
.error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
return FluxUtil
.withContext(
context ->
service
.getByResourceGroup(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
apiVersion,
resourceGroupName,
expressRoutePortName,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
/**
* Retrieves the requested ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of ExpressRoutePort.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ExpressRoutePortInner>> getByResourceGroupWithResponseAsync(
String resourceGroupName, String expressRoutePortName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (expressRoutePortName == null) {
return Mono
.error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
context = this.client.mergeContext(context);
return service
.getByResourceGroup(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
apiVersion,
resourceGroupName,
expressRoutePortName,
context);
}
/**
* Retrieves the requested ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of ExpressRoutePort.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ExpressRoutePortInner> getByResourceGroupAsync(String resourceGroupName, String expressRoutePortName) {
return getByResourceGroupWithResponseAsync(resourceGroupName, expressRoutePortName)
.flatMap(
(Response<ExpressRoutePortInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
}
/**
* Retrieves the requested ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of ExpressRoutePort.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ExpressRoutePortInner getByResourceGroup(String resourceGroupName, String expressRoutePortName) {
return getByResourceGroupAsync(resourceGroupName, expressRoutePortName).block();
}
/**
* Retrieves the requested ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of ExpressRoutePort.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<ExpressRoutePortInner> getByResourceGroupWithResponse(
String resourceGroupName, String expressRoutePortName, Context context) {
return getByResourceGroupWithResponseAsync(resourceGroupName, expressRoutePortName, context).block();
}
/**
* Creates or updates the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param parameters ExpressRoutePort resource definition.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(
String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (expressRoutePortName == null) {
return Mono
.error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."));
}
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
final String apiVersion = "2020-05-01";
return FluxUtil
.withContext(
context ->
service
.createOrUpdate(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
apiVersion,
resourceGroupName,
expressRoutePortName,
parameters,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
/**
* Creates or updates the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param parameters ExpressRoutePort resource definition.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(
String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (expressRoutePortName == null) {
return Mono
.error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."));
}
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
final String apiVersion = "2020-05-01";
context = this.client.mergeContext(context);
return service
.createOrUpdate(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
apiVersion,
resourceGroupName,
expressRoutePortName,
parameters,
context);
}
/**
* Creates or updates the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param parameters ExpressRoutePort resource definition.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public PollerFlux<PollResult<ExpressRoutePortInner>, ExpressRoutePortInner> beginCreateOrUpdateAsync(
String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) {
Mono<Response<Flux<ByteBuffer>>> mono =
createOrUpdateWithResponseAsync(resourceGroupName, expressRoutePortName, parameters);
return this
.client
.<ExpressRoutePortInner, ExpressRoutePortInner>getLroResult(
mono,
this.client.getHttpPipeline(),
ExpressRoutePortInner.class,
ExpressRoutePortInner.class,
Context.NONE);
}
/**
* Creates or updates the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param parameters ExpressRoutePort resource definition.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux<PollResult<ExpressRoutePortInner>, ExpressRoutePortInner> beginCreateOrUpdateAsync(
String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, Context context) {
context = this.client.mergeContext(context);
Mono<Response<Flux<ByteBuffer>>> mono =
createOrUpdateWithResponseAsync(resourceGroupName, expressRoutePortName, parameters, context);
return this
.client
.<ExpressRoutePortInner, ExpressRoutePortInner>getLroResult(
mono, this.client.getHttpPipeline(), ExpressRoutePortInner.class, ExpressRoutePortInner.class, context);
}
/**
* Creates or updates the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param parameters ExpressRoutePort resource definition.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller<PollResult<ExpressRoutePortInner>, ExpressRoutePortInner> beginCreateOrUpdate(
String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) {
return beginCreateOrUpdateAsync(resourceGroupName, expressRoutePortName, parameters).getSyncPoller();
}
/**
* Creates or updates the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param parameters ExpressRoutePort resource definition.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller<PollResult<ExpressRoutePortInner>, ExpressRoutePortInner> beginCreateOrUpdate(
String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, Context context) {
return beginCreateOrUpdateAsync(resourceGroupName, expressRoutePortName, parameters, context).getSyncPoller();
}
/**
* Creates or updates the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param parameters ExpressRoutePort resource definition.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ExpressRoutePortInner> createOrUpdateAsync(
String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) {
return beginCreateOrUpdateAsync(resourceGroupName, expressRoutePortName, parameters)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
* Creates or updates the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param parameters ExpressRoutePort resource definition.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<ExpressRoutePortInner> createOrUpdateAsync(
String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, Context context) {
return beginCreateOrUpdateAsync(resourceGroupName, expressRoutePortName, parameters, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
* Creates or updates the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param parameters ExpressRoutePort resource definition.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ExpressRoutePortInner createOrUpdate(
String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters) {
return createOrUpdateAsync(resourceGroupName, expressRoutePortName, parameters).block();
}
/**
* Creates or updates the specified ExpressRoutePort resource.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param parameters ExpressRoutePort resource definition.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ExpressRoutePortInner createOrUpdate(
String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, Context context) {
return createOrUpdateAsync(resourceGroupName, expressRoutePortName, parameters, context).block();
}
/**
* Update ExpressRoutePort tags.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<ExpressRoutePortInner>> updateTagsWithResponseAsync(
String resourceGroupName, String expressRoutePortName, Map<String, String> tags) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (expressRoutePortName == null) {
return Mono
.error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
TagsObject parameters = new TagsObject();
parameters.withTags(tags);
return FluxUtil
.withContext(
context ->
service
.updateTags(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
apiVersion,
resourceGroupName,
expressRoutePortName,
parameters,
context))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
/**
* Update ExpressRoutePort tags.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param tags Resource tags.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ExpressRoutePortInner>> updateTagsWithResponseAsync(
String resourceGroupName, String expressRoutePortName, Map<String, String> tags, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (expressRoutePortName == null) {
return Mono
.error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
TagsObject parameters = new TagsObject();
parameters.withTags(tags);
context = this.client.mergeContext(context);
return service
.updateTags(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
apiVersion,
resourceGroupName,
expressRoutePortName,
parameters,
context);
}
/**
* Update ExpressRoutePort tags.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ExpressRoutePortInner> updateTagsAsync(
String resourceGroupName, String expressRoutePortName, Map<String, String> tags) {
return updateTagsWithResponseAsync(resourceGroupName, expressRoutePortName, tags)
.flatMap(
(Response<ExpressRoutePortInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
}
/**
* Update ExpressRoutePort tags.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ExpressRoutePortInner> updateTagsAsync(String resourceGroupName, String expressRoutePortName) {
final Map<String, String> tags = null;
return updateTagsWithResponseAsync(resourceGroupName, expressRoutePortName, tags)
.flatMap(
(Response<ExpressRoutePortInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
}
/**
* Update ExpressRoutePort tags.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public ExpressRoutePortInner updateTags(String resourceGroupName, String expressRoutePortName) {
final Map<String, String> tags = null;
return updateTagsAsync(resourceGroupName, expressRoutePortName, tags).block();
}
/**
* Update ExpressRoutePort tags.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @param tags Resource tags.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return expressRoutePort resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<ExpressRoutePortInner> updateTagsWithResponse(
String resourceGroupName, String expressRoutePortName, Map<String, String> tags, Context context) {
return updateTagsWithResponseAsync(resourceGroupName, expressRoutePortName, tags, context).block();
}
/**
* List all the ExpressRoutePort resources in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ExpressRoutePortInner>> listByResourceGroupSinglePageAsync(String resourceGroupName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
return FluxUtil
.withContext(
context ->
service
.listByResourceGroup(
this.client.getEndpoint(),
this.client.getSubscriptionId(),
apiVersion,
resourceGroupName,
context))
.<PagedResponse<ExpressRoutePortInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
/**
* List all the ExpressRoutePort resources in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ExpressRoutePortInner>> listByResourceGroupSinglePageAsync(
String resourceGroupName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
context = this.client.mergeContext(context);
return service
.listByResourceGroup(
this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, resourceGroupName, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
/**
* List all the ExpressRoutePort resources in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<ExpressRoutePortInner> listByResourceGroupAsync(String resourceGroupName) {
return new PagedFlux<>(
() -> listByResourceGroupSinglePageAsync(resourceGroupName),
nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
* List all the ExpressRoutePort resources in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ExpressRoutePortInner> listByResourceGroupAsync(String resourceGroupName, Context context) {
return new PagedFlux<>(
() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
}
/**
* List all the ExpressRoutePort resources in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ExpressRoutePortInner> listByResourceGroup(String resourceGroupName) {
return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
}
/**
* List all the ExpressRoutePort resources in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ExpressRoutePortInner> listByResourceGroup(String resourceGroupName, Context context) {
return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
}
/**
* List all the ExpressRoutePort resources in the specified subscription.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ExpressRoutePortInner>> listSinglePageAsync() {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
return FluxUtil
.withContext(
context ->
service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, context))
.<PagedResponse<ExpressRoutePortInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
/**
* List all the ExpressRoutePort resources in the specified subscription.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ExpressRoutePortInner>> listSinglePageAsync(Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
final String apiVersion = "2020-05-01";
context = this.client.mergeContext(context);
return service
.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
/**
* List all the ExpressRoutePort resources in the specified subscription.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<ExpressRoutePortInner> listAsync() {
return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
}
/**
* List all the ExpressRoutePort resources in the specified subscription.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ExpressRoutePortInner> listAsync(Context context) {
return new PagedFlux<>(
() -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
}
/**
* List all the ExpressRoutePort resources in the specified subscription.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ExpressRoutePortInner> list() {
return new PagedIterable<>(listAsync());
}
/**
* List all the ExpressRoutePort resources in the specified subscription.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ExpressRoutePortInner> list(Context context) {
return new PagedIterable<>(listAsync(context));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ExpressRoutePortInner>> listByResourceGroupNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
return FluxUtil
.withContext(context -> service.listByResourceGroupNext(nextLink, context))
.<PagedResponse<ExpressRoutePortInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ExpressRoutePortInner>> listByResourceGroupNextSinglePageAsync(
String nextLink, Context context) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
context = this.client.mergeContext(context);
return service
.listByResourceGroupNext(nextLink, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ExpressRoutePortInner>> listNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
return FluxUtil
.withContext(context -> service.listNext(nextLink, context))
.<PagedResponse<ExpressRoutePortInner>>map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null))
.subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
}
/**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response for ListExpressRoutePorts API service call.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ExpressRoutePortInner>> listNextSinglePageAsync(String nextLink, Context context) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
context = this.client.mergeContext(context);
return service
.listNext(nextLink, context)
.map(
res ->
new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
res.getHeaders(),
res.getValue().value(),
res.getValue().nextLink(),
null));
}
}
|
3e0081ff1b4c48c47ccddf2c1f497f411de9e5f3 | 3,753 | java | Java | src/br/com/social/DAO/contato/ContatoDAO.java | cleyssonazevedo/Rede-Social | 9a502bd7303f9045838d6ed104b8d6b4104cd86f | [
"MIT"
] | null | null | null | src/br/com/social/DAO/contato/ContatoDAO.java | cleyssonazevedo/Rede-Social | 9a502bd7303f9045838d6ed104b8d6b4104cd86f | [
"MIT"
] | null | null | null | src/br/com/social/DAO/contato/ContatoDAO.java | cleyssonazevedo/Rede-Social | 9a502bd7303f9045838d6ed104b8d6b4104cd86f | [
"MIT"
] | null | null | null | 28.007463 | 97 | 0.717026 | 212 | package br.com.social.DAO.contato;
import javax.persistence.NoResultException;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Path;
import javax.persistence.criteria.Root;
import org.springframework.stereotype.Component;
import br.com.social.DAO.Acesso;
import br.com.social.DAO.GenericDAO;
import br.com.social.exception.UnauthorizedException;
import br.com.social.model.contato.Contato;
import br.com.social.model.contato.enums.Perfil;
@Component
public class ContatoDAO extends GenericDAO<Long, Contato> implements IContatoDAO {
public ContatoDAO() {
// TODO Auto-generated constructor stub
super(Contato.class);
}
@Override
public Contato Logar(Contato contato) throws UnauthorizedException, Exception {
// TODO Auto-generated method stub
try {
CriteriaBuilder builder = super.getManager().getCriteriaBuilder();
CriteriaQuery<Contato> criteria = builder.createQuery(Contato.class);
Root<Contato> root = criteria.from(Contato.class);
criteria.select(root)
.where(
builder.and(
builder.equal(root.get("usuario"), contato.getUsuario()),
builder.equal(root.get("senha"), contato.getSenha())
)
);
return super.getManager().createQuery(criteria).getSingleResult();
} catch (NoResultException e) {
// TODO: handle exception
throw new UnauthorizedException(e);
} catch (Exception e) {
// TODO: handle exception
throw e;
}
}
@Override
public Contato Outro(Contato contato) throws UnauthorizedException, Exception {
// TODO Auto-generated method stub
contato.setId((long) 1);
contato.setConta("cleysson12");
contato.setNome("Cleysson");
contato.setSobrenome("Azevedo");
contato.setPerfil(Perfil.PUBLICO);
contato.setNascimento("08/04/1994");
return contato;
}
@Override
public Contato BuscarPorConta(String conta, Acesso acesso) throws NoResultException, Exception {
// TODO Auto-generated method stub
CriteriaBuilder builder = super.getManager().getCriteriaBuilder();
CriteriaQuery<Contato> criteria = builder.createQuery(Contato.class);
Root<Contato> root = criteria.from(Contato.class);
if(acesso.equals(Acesso.PARCIAL)){
criteria.select(root)
.where(
builder.and(
builder.equal(root.get("conta"), conta),
builder.equal(root.get("perfil"), Perfil.PUBLICO)
)
);
} else {
criteria.select(root)
.where(
builder.equal(root.get("conta"), conta)
);
}
return super.getManager().createQuery(criteria).getSingleResult();
}
@Override
public boolean LoginExiste (String usuario) {
try {
CriteriaBuilder builder = super.getManager().getCriteriaBuilder();
CriteriaQuery<Contato> criteria = builder.createQuery(Contato.class);
Root<Contato> root = criteria.from(Contato.class);
Path<String> path = root.get("usuario");
criteria.select(root)
.where(builder.equal(path, usuario));
if(super.getManager().createQuery(criteria)
.getSingleResult() != null)
return true;
else
return false;
} catch (Exception e) {
// TODO: handle exception
return false;
}
}
@Override
public boolean ContaExiste(String conta) {
try {
CriteriaBuilder builder = super.getManager().getCriteriaBuilder();
CriteriaQuery<Contato> criteria = builder.createQuery(Contato.class);
Root<Contato> root = criteria.from(Contato.class);
Path<String> path = root.get("conta");
criteria.select(root)
.where(
builder.equal(path, conta)
);
if(super.getManager().createQuery(criteria)
.getSingleResult() != null)
return true;
else
return false;
} catch (Exception e) {
// TODO: handle exception
return false;
}
}
}
|
3e0082603daef5b436cdfe02479bcaf59db81463 | 3,538 | java | Java | awtprograms/RadioButtonDemo.java | vibhgupta/awt | 69fdd1b92142524fa07162e488be7fc4dca0d376 | [
"MIT"
] | null | null | null | awtprograms/RadioButtonDemo.java | vibhgupta/awt | 69fdd1b92142524fa07162e488be7fc4dca0d376 | [
"MIT"
] | null | null | null | awtprograms/RadioButtonDemo.java | vibhgupta/awt | 69fdd1b92142524fa07162e488be7fc4dca0d376 | [
"MIT"
] | null | null | null | 35.029703 | 80 | 0.627473 | 213 | import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class RadioButtonDemo extends JPanel {
static JFrame frame;
static String birdString = "Bird";
static String catString = "Cat";
static String dogString = "Dog";
static String rabbitString = "Rabbit";
static String pigString = "Pig";
JLabel picture;
public RadioButtonDemo() {
// Create the radio buttons.
JRadioButton birdButton = new JRadioButton(birdString);
birdButton.setMnemonic(KeyEvent.VK_B);
birdButton.setActionCommand(birdString);
birdButton.setSelected(true);
JRadioButton catButton = new JRadioButton(catString);
catButton.setMnemonic(KeyEvent.VK_C);
catButton.setActionCommand(catString);
JRadioButton dogButton = new JRadioButton(dogString);
dogButton.setMnemonic(KeyEvent.VK_D);
dogButton.setActionCommand(dogString);
JRadioButton rabbitButton = new JRadioButton(rabbitString);
rabbitButton.setMnemonic(KeyEvent.VK_R);
rabbitButton.setActionCommand(rabbitString);
JRadioButton pigButton = new JRadioButton(pigString);
pigButton.setMnemonic(KeyEvent.VK_P);
pigButton.setActionCommand(pigString);
// Group the radio buttons.
ButtonGroup group = new ButtonGroup();
group.add(birdButton);
group.add(catButton);
group.add(dogButton);
group.add(rabbitButton);
group.add(pigButton);
// Register a listener for the radio buttons.
RadioListener myListener = new RadioListener();
birdButton.addActionListener(myListener);
catButton.addActionListener(myListener);
dogButton.addActionListener(myListener);
rabbitButton.addActionListener(myListener);
pigButton.addActionListener(myListener);
// Set up the picture label
picture = new JLabel(new ImageIcon("images/"
+ birdString
+ ".gif"));
// The preferred size is hard-coded to be the width of the
// widest image and the height of the tallest image.
// A real program would compute this.
picture.setPreferredSize(new Dimension(177, 122));
// Put the radio buttons in a column in a panel
JPanel radioPanel = new JPanel();
radioPanel.setLayout(new GridLayout(0, 1));
radioPanel.add(birdButton);
radioPanel.add(catButton);
radioPanel.add(dogButton);
radioPanel.add(rabbitButton);
radioPanel.add(pigButton);
setLayout(new BorderLayout());
add(radioPanel, BorderLayout.WEST);
add(picture, BorderLayout.CENTER);
setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
}
/** Listens to the radio buttons. */
class RadioListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
picture.setIcon(new ImageIcon("images/"
+ e.getActionCommand()
+ ".gif"));
}
}
public static void main(String s[]) {
frame = new JFrame("RadioButtonDemo");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {System.exit(0);}
});
frame.getContentPane().add(new RadioButtonDemo(), BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
}
}
|
3e0083656d3b5bd9cf50b6df465c99823bb09d1e | 5,637 | java | Java | vmware/ngc/NGC-Plugin/src/main/java/org/opensds/vmware/ngc/controller/DatastoreController.java | asifdxtreme/nbp | fb59da08f31134da1ff4d0e34847c74012863549 | [
"Apache-2.0"
] | 40 | 2017-08-04T07:30:15.000Z | 2019-10-29T15:51:39.000Z | vmware/ngc/NGC-Plugin/src/main/java/org/opensds/vmware/ngc/controller/DatastoreController.java | asifdxtreme/nbp | fb59da08f31134da1ff4d0e34847c74012863549 | [
"Apache-2.0"
] | 164 | 2017-08-08T07:33:54.000Z | 2020-02-07T11:01:30.000Z | vmware/ngc/NGC-Plugin/src/main/java/org/opensds/vmware/ngc/controller/DatastoreController.java | asifdxtreme/nbp | fb59da08f31134da1ff4d0e34847c74012863549 | [
"Apache-2.0"
] | 50 | 2017-08-04T07:13:27.000Z | 2020-02-07T03:34:16.000Z | 37.58 | 92 | 0.693099 | 214 | // Copyright 2019 The OpenSDS Authors.
//
// 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 org.opensds.vmware.ngc.controller;
import com.google.gson.Gson;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.opensds.vmware.ngc.common.Request;
import org.opensds.vmware.ngc.entity.ResultInfo;
import org.opensds.vmware.ngc.model.datastore.Datastore;
import org.opensds.vmware.ngc.service.DatastoreService;
import org.opensds.vmware.ngc.model.datastore.VMFSDatastore;
import com.vmware.vim25.ManagedObjectReference;
import com.vmware.vise.usersession.ServerInfo;
import org.opensds.vmware.ngc.service.Vmservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import static org.opensds.vmware.ngc.base.DatastoreTypeEnum.NFS_DATASTORE;
import static org.opensds.vmware.ngc.base.DatastoreTypeEnum.VMFS_DATASTORE;
@Controller
@RequestMapping(value = "/datastore")
public class DatastoreController {
private static final Log logger = LogFactory.getLog(DatastoreController.class);
@Autowired
private DatastoreService datastoreService;
/**
* Create Datastore
* @param hostMoRef ManagedObjectReference
* @param serverInfo ServerInfo
* @param json String
* @return ResultInfo
* @throws Exception
*/
@RequestMapping(value = "/create", method = RequestMethod.POST)
@ResponseBody
public ResultInfo create(
@RequestParam(value = "actionUid") String actionUid,
@RequestParam(value = "objectId") ManagedObjectReference[] hostMoRef,
@RequestParam(value = "serverGuid") ServerInfo serverInfo,
@RequestParam(value = "json") String json)
throws Exception {
Datastore datastore = convertToDatastore(json);
ResultInfo resultInfo = datastoreService.create(hostMoRef, serverInfo, datastore);
return resultInfo;
}
/**
* Extend NFS/VMFS datastore size
* @param serverInfo ServerInfo
* @param json String
* @return ResultInfo
* @throws Exception
*/
@RequestMapping(value = "/extend", method = RequestMethod.POST)
@ResponseBody
public ResultInfo extend(
@RequestParam(value = "serverGuid") ServerInfo serverInfo,
@RequestParam(value = "json") String json)
throws Exception {
Datastore datastore = convertToDatastore(json);
ResultInfo resultInfo = datastoreService.extendSize(serverInfo, datastore);
return resultInfo;
}
/**
* Delete datastore
* @param datastoreMo ManagedObjectReference
* @param serverInfo ServerInfo
* @return ResultInfo
* @throws Exception
*/
@RequestMapping(value = "/delete", method = RequestMethod.POST)
@ResponseBody
public ResultInfo delete(
@RequestParam(value = "serverGuid") ServerInfo serverInfo,
@RequestParam(value = "moref") ManagedObjectReference datastoreMo,
@RequestParam(value = "json") String json)
throws Exception {
Datastore datastore = convertToDatastore(json);
ResultInfo resultInfo = datastoreService.delete(serverInfo, datastoreMo, datastore);
return resultInfo;
}
/**
* Reduce nfs datastore size
* @param serverInfo ServerInfo
* @param json String
* @return ResultInfo
*/
@RequestMapping(value = "/nfsreduce", method = RequestMethod.POST)
@ResponseBody
public ResultInfo nfsreduce(
@RequestParam(value = "serverGuid") ServerInfo serverInfo,
@RequestParam(value = "json") String json) {
Datastore datastoreInfo = convertToDatastore(json);
// todo: Reduce the NFS datastore
ResultInfo resultInfo = datastoreService.extendSize(serverInfo, datastoreInfo);
return resultInfo;
}
/**
* get volumes info with datastore
* @param dsMo
* @param serverInfo
* @return
*/
@RequestMapping(value = "/getInfo/{datastoreId}", method = RequestMethod.GET)
@ResponseBody
public ResultInfo getInfo(
@PathVariable("datastoreId") ManagedObjectReference dsMo,
@RequestParam(value = "serverGuid") ServerInfo serverInfo) {
ResultInfo resultInfo = datastoreService.getInfo(dsMo, serverInfo);
return resultInfo;
}
// convert json to datastoreInfo
public static Datastore convertToDatastore(String json) {
logger.info("----------Begin convert mo to datastore!");
Gson gson = new Gson();
Datastore datastore = gson.fromJson(json, Datastore.class);
if (datastore.getType().equals(VMFS_DATASTORE.getType())) {
datastore = gson.fromJson(json, VMFSDatastore.class);
} else if (datastore.getType().equals(NFS_DATASTORE.getType())) {
datastore = gson.fromJson(json, VMFSDatastore.class);
} else {
throw new IllegalArgumentException("Datastore type is not surpport!");
}
return datastore;
}
}
|
3e00839364d7695af336ef6177086c0f55c4b5ae | 3,894 | java | Java | trade-system/trade-dao/src/main/java/com/pan/bean/TradeGoods.java | panGod/rocketmq-trade | e22be7a8982945e5cded16140cc5b4c9733fdf92 | [
"Apache-2.0"
] | 4 | 2018-10-07T07:37:17.000Z | 2019-09-02T06:13:19.000Z | trade-system/trade-dao/src/main/java/com/pan/bean/TradeGoods.java | panGod/rocketmq-trade | e22be7a8982945e5cded16140cc5b4c9733fdf92 | [
"Apache-2.0"
] | null | null | null | trade-system/trade-dao/src/main/java/com/pan/bean/TradeGoods.java | panGod/rocketmq-trade | e22be7a8982945e5cded16140cc5b4c9733fdf92 | [
"Apache-2.0"
] | null | null | null | 32.722689 | 134 | 0.607601 | 215 | package com.pan.bean;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
public class TradeGoods implements Serializable {
private Integer goodsId;
private String goodsName;
private Integer goodsNumber;
private BigDecimal goodsPrice;
private String goodsDesc;
private Date createTime;
private static final long serialVersionUID = 1L;
public Integer getGoodsId() {
return goodsId;
}
public void setGoodsId(Integer goodsId) {
this.goodsId = goodsId;
}
public String getGoodsName() {
return goodsName;
}
public void setGoodsName(String goodsName) {
this.goodsName = goodsName == null ? null : goodsName.trim();
}
public Integer getGoodsNumber() {
return goodsNumber;
}
public void setGoodsNumber(Integer goodsNumber) {
this.goodsNumber = goodsNumber;
}
public BigDecimal getGoodsPrice() {
return goodsPrice;
}
public void setGoodsPrice(BigDecimal goodsPrice) {
this.goodsPrice = goodsPrice;
}
public String getGoodsDesc() {
return goodsDesc;
}
public void setGoodsDesc(String goodsDesc) {
this.goodsDesc = goodsDesc == null ? null : goodsDesc.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
TradeGoods other = (TradeGoods) that;
return (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
&& (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
&& (this.getGoodsNumber() == null ? other.getGoodsNumber() == null : this.getGoodsNumber().equals(other.getGoodsNumber()))
&& (this.getGoodsPrice() == null ? other.getGoodsPrice() == null : this.getGoodsPrice().equals(other.getGoodsPrice()))
&& (this.getGoodsDesc() == null ? other.getGoodsDesc() == null : this.getGoodsDesc().equals(other.getGoodsDesc()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
result = prime * result + ((getGoodsNumber() == null) ? 0 : getGoodsNumber().hashCode());
result = prime * result + ((getGoodsPrice() == null) ? 0 : getGoodsPrice().hashCode());
result = prime * result + ((getGoodsDesc() == null) ? 0 : getGoodsDesc().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", goodsId=").append(goodsId);
sb.append(", goodsName=").append(goodsName);
sb.append(", goodsNumber=").append(goodsNumber);
sb.append(", goodsPrice=").append(goodsPrice);
sb.append(", goodsDesc=").append(goodsDesc);
sb.append(", createTime=").append(createTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
} |
3e0083d5cd2741ffa990587d49f5590707539aed | 1,780 | java | Java | litho-intellij-plugin/src/test/java/com/facebook/litho/intellij/completion/OnEventGenerateUtilsTest.java | selat/litho | 8f4429b78d7bb8e6d9125659368507b6ce3955fd | [
"Apache-2.0"
] | null | null | null | litho-intellij-plugin/src/test/java/com/facebook/litho/intellij/completion/OnEventGenerateUtilsTest.java | selat/litho | 8f4429b78d7bb8e6d9125659368507b6ce3955fd | [
"Apache-2.0"
] | null | null | null | litho-intellij-plugin/src/test/java/com/facebook/litho/intellij/completion/OnEventGenerateUtilsTest.java | selat/litho | 8f4429b78d7bb8e6d9125659368507b6ce3955fd | [
"Apache-2.0"
] | null | null | null | 30.169492 | 100 | 0.723596 | 216 | /*
* Copyright 2019-present Facebook, Inc.
*
* 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.facebook.litho.intellij.completion;
import com.facebook.litho.intellij.LithoPluginTestHelper;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiMethod;
import java.util.Collections;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class OnEventGenerateUtilsTest {
private final LithoPluginTestHelper testHelper = new LithoPluginTestHelper("testdata/completion");
@Before
public void setUp() throws Exception {
testHelper.setUp();
}
@After
public void tearDown() throws Exception {
testHelper.tearDown();
}
@Test
public void createOnEventMethod() {
testHelper.getPsiClass(
psiClasses -> {
Assert.assertNotNull(psiClasses);
PsiClass psiEvent = psiClasses.get(0);
PsiMethod onEventMethod =
OnEventGenerateUtils.createOnEventMethod(psiEvent, psiEvent, Collections.emptyList());
Assert.assertEquals(2, onEventMethod.getParameters().length);
Assert.assertEquals("boolean", onEventMethod.getReturnType().getCanonicalText());
return true;
},
"ReturnEvent.java");
}
}
|
3e008450dc824e8369d3b9c8fd5791c784db99ff | 10,347 | java | Java | sofa/src/com/tehforce/sofa/parser/SofaLangLexer.java | mockillo/sofa | 12358e63f93bf80ca61b28e9c47edfacc8707041 | [
"MIT"
] | 1 | 2016-12-01T13:50:16.000Z | 2016-12-01T13:50:16.000Z | sofa/src/com/tehforce/sofa/parser/SofaLangLexer.java | mockillo/sofa | 12358e63f93bf80ca61b28e9c47edfacc8707041 | [
"MIT"
] | null | null | null | sofa/src/com/tehforce/sofa/parser/SofaLangLexer.java | mockillo/sofa | 12358e63f93bf80ca61b28e9c47edfacc8707041 | [
"MIT"
] | 1 | 2021-11-26T14:46:36.000Z | 2021-11-26T14:46:36.000Z | 59.125714 | 89 | 0.605296 | 217 | // Generated from SofaLang.g4 by ANTLR 4.1
package com.tehforce.sofa.parser;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class SofaLangLexer extends Lexer {
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__37=1, T__36=2, T__35=3, T__34=4, T__33=5, T__32=6, T__31=7, T__30=8,
T__29=9, T__28=10, T__27=11, T__26=12, T__25=13, T__24=14, T__23=15, T__22=16,
T__21=17, T__20=18, T__19=19, T__18=20, T__17=21, T__16=22, T__15=23,
T__14=24, T__13=25, T__12=26, T__11=27, T__10=28, T__9=29, T__8=30, T__7=31,
T__6=32, T__5=33, T__4=34, T__3=35, T__2=36, T__1=37, T__0=38, INT=39,
ID=40, ARROW=41;
public static String[] modeNames = {
"DEFAULT_MODE"
};
public static final String[] tokenNames = {
"<INVALID>",
"'Heal'", "'wounded'", "'Warrior'", "'('", "'alive'", "'Any'", "'<'",
"'!='", "'Down'", "'<='", "'Enemy'", "'otherwise'", "'range'", "'{'",
"'Healer'", "'Right'", "'closest'", "'maxhealth'", "'Roam'", "'}'", "'Up'",
"'Move'", "'.'", "')'", "'Friendly'", "'health'", "'Attack'", "'distance'",
"'>'", "'Left'", "'Ranger'", "'inRange'", "'=='", "'farthest'", "'oppositeDirection'",
"'direction'", "'>='", "'Defend'", "INT", "ID", "'->'"
};
public static final String[] ruleNames = {
"T__37", "T__36", "T__35", "T__34", "T__33", "T__32", "T__31", "T__30",
"T__29", "T__28", "T__27", "T__26", "T__25", "T__24", "T__23", "T__22",
"T__21", "T__20", "T__19", "T__18", "T__17", "T__16", "T__15", "T__14",
"T__13", "T__12", "T__11", "T__10", "T__9", "T__8", "T__7", "T__6", "T__5",
"T__4", "T__3", "T__2", "T__1", "T__0", "INT", "ID", "ARROW"
};
public SofaLangLexer(CharStream input) {
super(input);
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
removeErrorListeners();
addErrorListener(new ErrorHandler());
}
@Override
public String getGrammarFileName() { return "SofaLang.g4"; }
@Override
public String[] getTokenNames() { return tokenNames; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String[] getModeNames() { return modeNames; }
@Override
public ATN getATN() { return _ATN; }
public static final String _serializedATN =
"\3\uacf5\uee8c\u4f5d\u8b0d\u4a45\u78bd\u1b2f\u3378\2+\u0142\b\1\4\2\t"+
"\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+
"\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\3\2\3\2"+
"\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3"+
"\4\3\4\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\b\3\b\3\t\3\t"+
"\3\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3"+
"\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\17"+
"\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\21"+
"\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23"+
"\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\26\3\26\3\26"+
"\3\27\3\27\3\27\3\27\3\27\3\30\3\30\3\31\3\31\3\32\3\32\3\32\3\32\3\32"+
"\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3\34"+
"\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\36"+
"\3\36\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3!"+
"\3!\3!\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3$\3$\3$"+
"\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&"+
"\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3(\6(\u0137\n(\r(\16(\u0138\3)\6)\u013c\n"+
")\r)\16)\u013d\3*\3*\3*\2+\3\3\1\5\4\1\7\5\1\t\6\1\13\7\1\r\b\1\17\t\1"+
"\21\n\1\23\13\1\25\f\1\27\r\1\31\16\1\33\17\1\35\20\1\37\21\1!\22\1#\23"+
"\1%\24\1\'\25\1)\26\1+\27\1-\30\1/\31\1\61\32\1\63\33\1\65\34\1\67\35"+
"\19\36\1;\37\1= \1?!\1A\"\1C#\1E$\1G%\1I&\1K\'\1M(\1O)\1Q*\1S+\1\3\2\4"+
"\3\2\62;\4\2C\\c|\u0143\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2"+
"\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25"+
"\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2"+
"\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2"+
"\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3"+
"\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2"+
"\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2"+
"Q\3\2\2\2\2S\3\2\2\2\3U\3\2\2\2\5Z\3\2\2\2\7b\3\2\2\2\tj\3\2\2\2\13l\3"+
"\2\2\2\rr\3\2\2\2\17v\3\2\2\2\21x\3\2\2\2\23{\3\2\2\2\25\u0080\3\2\2\2"+
"\27\u0083\3\2\2\2\31\u0089\3\2\2\2\33\u0093\3\2\2\2\35\u0099\3\2\2\2\37"+
"\u009b\3\2\2\2!\u00a2\3\2\2\2#\u00a8\3\2\2\2%\u00b0\3\2\2\2\'\u00ba\3"+
"\2\2\2)\u00bf\3\2\2\2+\u00c1\3\2\2\2-\u00c4\3\2\2\2/\u00c9\3\2\2\2\61"+
"\u00cb\3\2\2\2\63\u00cd\3\2\2\2\65\u00d6\3\2\2\2\67\u00dd\3\2\2\29\u00e4"+
"\3\2\2\2;\u00ed\3\2\2\2=\u00ef\3\2\2\2?\u00f4\3\2\2\2A\u00fb\3\2\2\2C"+
"\u0103\3\2\2\2E\u0106\3\2\2\2G\u010f\3\2\2\2I\u0121\3\2\2\2K\u012b\3\2"+
"\2\2M\u012e\3\2\2\2O\u0136\3\2\2\2Q\u013b\3\2\2\2S\u013f\3\2\2\2UV\7J"+
"\2\2VW\7g\2\2WX\7c\2\2XY\7n\2\2Y\4\3\2\2\2Z[\7y\2\2[\\\7q\2\2\\]\7w\2"+
"\2]^\7p\2\2^_\7f\2\2_`\7g\2\2`a\7f\2\2a\6\3\2\2\2bc\7Y\2\2cd\7c\2\2de"+
"\7t\2\2ef\7t\2\2fg\7k\2\2gh\7q\2\2hi\7t\2\2i\b\3\2\2\2jk\7*\2\2k\n\3\2"+
"\2\2lm\7c\2\2mn\7n\2\2no\7k\2\2op\7x\2\2pq\7g\2\2q\f\3\2\2\2rs\7C\2\2"+
"st\7p\2\2tu\7{\2\2u\16\3\2\2\2vw\7>\2\2w\20\3\2\2\2xy\7#\2\2yz\7?\2\2"+
"z\22\3\2\2\2{|\7F\2\2|}\7q\2\2}~\7y\2\2~\177\7p\2\2\177\24\3\2\2\2\u0080"+
"\u0081\7>\2\2\u0081\u0082\7?\2\2\u0082\26\3\2\2\2\u0083\u0084\7G\2\2\u0084"+
"\u0085\7p\2\2\u0085\u0086\7g\2\2\u0086\u0087\7o\2\2\u0087\u0088\7{\2\2"+
"\u0088\30\3\2\2\2\u0089\u008a\7q\2\2\u008a\u008b\7v\2\2\u008b\u008c\7"+
"j\2\2\u008c\u008d\7g\2\2\u008d\u008e\7t\2\2\u008e\u008f\7y\2\2\u008f\u0090"+
"\7k\2\2\u0090\u0091\7u\2\2\u0091\u0092\7g\2\2\u0092\32\3\2\2\2\u0093\u0094"+
"\7t\2\2\u0094\u0095\7c\2\2\u0095\u0096\7p\2\2\u0096\u0097\7i\2\2\u0097"+
"\u0098\7g\2\2\u0098\34\3\2\2\2\u0099\u009a\7}\2\2\u009a\36\3\2\2\2\u009b"+
"\u009c\7J\2\2\u009c\u009d\7g\2\2\u009d\u009e\7c\2\2\u009e\u009f\7n\2\2"+
"\u009f\u00a0\7g\2\2\u00a0\u00a1\7t\2\2\u00a1 \3\2\2\2\u00a2\u00a3\7T\2"+
"\2\u00a3\u00a4\7k\2\2\u00a4\u00a5\7i\2\2\u00a5\u00a6\7j\2\2\u00a6\u00a7"+
"\7v\2\2\u00a7\"\3\2\2\2\u00a8\u00a9\7e\2\2\u00a9\u00aa\7n\2\2\u00aa\u00ab"+
"\7q\2\2\u00ab\u00ac\7u\2\2\u00ac\u00ad\7g\2\2\u00ad\u00ae\7u\2\2\u00ae"+
"\u00af\7v\2\2\u00af$\3\2\2\2\u00b0\u00b1\7o\2\2\u00b1\u00b2\7c\2\2\u00b2"+
"\u00b3\7z\2\2\u00b3\u00b4\7j\2\2\u00b4\u00b5\7g\2\2\u00b5\u00b6\7c\2\2"+
"\u00b6\u00b7\7n\2\2\u00b7\u00b8\7v\2\2\u00b8\u00b9\7j\2\2\u00b9&\3\2\2"+
"\2\u00ba\u00bb\7T\2\2\u00bb\u00bc\7q\2\2\u00bc\u00bd\7c\2\2\u00bd\u00be"+
"\7o\2\2\u00be(\3\2\2\2\u00bf\u00c0\7\177\2\2\u00c0*\3\2\2\2\u00c1\u00c2"+
"\7W\2\2\u00c2\u00c3\7r\2\2\u00c3,\3\2\2\2\u00c4\u00c5\7O\2\2\u00c5\u00c6"+
"\7q\2\2\u00c6\u00c7\7x\2\2\u00c7\u00c8\7g\2\2\u00c8.\3\2\2\2\u00c9\u00ca"+
"\7\60\2\2\u00ca\60\3\2\2\2\u00cb\u00cc\7+\2\2\u00cc\62\3\2\2\2\u00cd\u00ce"+
"\7H\2\2\u00ce\u00cf\7t\2\2\u00cf\u00d0\7k\2\2\u00d0\u00d1\7g\2\2\u00d1"+
"\u00d2\7p\2\2\u00d2\u00d3\7f\2\2\u00d3\u00d4\7n\2\2\u00d4\u00d5\7{\2\2"+
"\u00d5\64\3\2\2\2\u00d6\u00d7\7j\2\2\u00d7\u00d8\7g\2\2\u00d8\u00d9\7"+
"c\2\2\u00d9\u00da\7n\2\2\u00da\u00db\7v\2\2\u00db\u00dc\7j\2\2\u00dc\66"+
"\3\2\2\2\u00dd\u00de\7C\2\2\u00de\u00df\7v\2\2\u00df\u00e0\7v\2\2\u00e0"+
"\u00e1\7c\2\2\u00e1\u00e2\7e\2\2\u00e2\u00e3\7m\2\2\u00e38\3\2\2\2\u00e4"+
"\u00e5\7f\2\2\u00e5\u00e6\7k\2\2\u00e6\u00e7\7u\2\2\u00e7\u00e8\7v\2\2"+
"\u00e8\u00e9\7c\2\2\u00e9\u00ea\7p\2\2\u00ea\u00eb\7e\2\2\u00eb\u00ec"+
"\7g\2\2\u00ec:\3\2\2\2\u00ed\u00ee\7@\2\2\u00ee<\3\2\2\2\u00ef\u00f0\7"+
"N\2\2\u00f0\u00f1\7g\2\2\u00f1\u00f2\7h\2\2\u00f2\u00f3\7v\2\2\u00f3>"+
"\3\2\2\2\u00f4\u00f5\7T\2\2\u00f5\u00f6\7c\2\2\u00f6\u00f7\7p\2\2\u00f7"+
"\u00f8\7i\2\2\u00f8\u00f9\7g\2\2\u00f9\u00fa\7t\2\2\u00fa@\3\2\2\2\u00fb"+
"\u00fc\7k\2\2\u00fc\u00fd\7p\2\2\u00fd\u00fe\7T\2\2\u00fe\u00ff\7c\2\2"+
"\u00ff\u0100\7p\2\2\u0100\u0101\7i\2\2\u0101\u0102\7g\2\2\u0102B\3\2\2"+
"\2\u0103\u0104\7?\2\2\u0104\u0105\7?\2\2\u0105D\3\2\2\2\u0106\u0107\7"+
"h\2\2\u0107\u0108\7c\2\2\u0108\u0109\7t\2\2\u0109\u010a\7v\2\2\u010a\u010b"+
"\7j\2\2\u010b\u010c\7g\2\2\u010c\u010d\7u\2\2\u010d\u010e\7v\2\2\u010e"+
"F\3\2\2\2\u010f\u0110\7q\2\2\u0110\u0111\7r\2\2\u0111\u0112\7r\2\2\u0112"+
"\u0113\7q\2\2\u0113\u0114\7u\2\2\u0114\u0115\7k\2\2\u0115\u0116\7v\2\2"+
"\u0116\u0117\7g\2\2\u0117\u0118\7F\2\2\u0118\u0119\7k\2\2\u0119\u011a"+
"\7t\2\2\u011a\u011b\7g\2\2\u011b\u011c\7e\2\2\u011c\u011d\7v\2\2\u011d"+
"\u011e\7k\2\2\u011e\u011f\7q\2\2\u011f\u0120\7p\2\2\u0120H\3\2\2\2\u0121"+
"\u0122\7f\2\2\u0122\u0123\7k\2\2\u0123\u0124\7t\2\2\u0124\u0125\7g\2\2"+
"\u0125\u0126\7e\2\2\u0126\u0127\7v\2\2\u0127\u0128\7k\2\2\u0128\u0129"+
"\7q\2\2\u0129\u012a\7p\2\2\u012aJ\3\2\2\2\u012b\u012c\7@\2\2\u012c\u012d"+
"\7?\2\2\u012dL\3\2\2\2\u012e\u012f\7F\2\2\u012f\u0130\7g\2\2\u0130\u0131"+
"\7h\2\2\u0131\u0132\7g\2\2\u0132\u0133\7p\2\2\u0133\u0134\7f\2\2\u0134"+
"N\3\2\2\2\u0135\u0137\t\2\2\2\u0136\u0135\3\2\2\2\u0137\u0138\3\2\2\2"+
"\u0138\u0136\3\2\2\2\u0138\u0139\3\2\2\2\u0139P\3\2\2\2\u013a\u013c\t"+
"\3\2\2\u013b\u013a\3\2\2\2\u013c\u013d\3\2\2\2\u013d\u013b\3\2\2\2\u013d"+
"\u013e\3\2\2\2\u013eR\3\2\2\2\u013f\u0140\7/\2\2\u0140\u0141\7@\2\2\u0141"+
"T\3\2\2\2\5\2\u0138\u013d";
public static final ATN _ATN =
ATNSimulator.deserialize(_serializedATN.toCharArray());
static {
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
}
}
} |
3e0084ba75c4f221b9f5ffb582153a0e79b9c5d9 | 19,260 | java | Java | src/main/java/com/davewhitesoftware/woodsywalk/WoodsyGameData.java | dave4mpls/WoodsyWalk | d3d2df76e85f68f1c7bfa89072d10534e6b61513 | [
"MIT"
] | null | null | null | src/main/java/com/davewhitesoftware/woodsywalk/WoodsyGameData.java | dave4mpls/WoodsyWalk | d3d2df76e85f68f1c7bfa89072d10534e6b61513 | [
"MIT"
] | null | null | null | src/main/java/com/davewhitesoftware/woodsywalk/WoodsyGameData.java | dave4mpls/WoodsyWalk | d3d2df76e85f68f1c7bfa89072d10534e6b61513 | [
"MIT"
] | null | null | null | 54.871795 | 274 | 0.666303 | 218 | package com.davewhitesoftware.woodsywalk;
//
// Class to represent an entire game of Woodsy Walk. The toByteArray method produces a
// serialized version which is what we pass to Google Play Game Services as our game state.
// So this object should contain everything needed to play a game, by passing back and forth
// all the pieces in their shuffled order, which piece we are on, everyone's game boards,
// which colors of houses and people pieces have been placed, etc.
//
import android.content.Context;
import android.text.TextUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
public class WoodsyGameData implements Serializable {
static final long serialVersionUID = 1L;
private ArrayList<String> participantIds = new ArrayList<String>();
private String winner = ""; // when a game is completed, this is the participantId of the winner in the participant array above
private ArrayList<Integer> remainingHouses = new ArrayList<Integer>();
private ArrayList<Integer> remainingPersons = new ArrayList<Integer>();
private HashMap<String, ArrayList<Integer>> piecesToPlay = new HashMap<String,ArrayList<Integer>>(); // all the remaining pieces to play for each player.
private HashMap<String, WoodsyBoardData> boards = new HashMap<String, WoodsyBoardData>(); // all the boards for the players
private HashMap<String, Integer> scores = new HashMap<String, Integer>(); // all the player scores
private int[] pieceBag; // the bag of pieces shuffled in random order, that gets assigned to each new participant.
private int minPiecesLeft; // when we play a piece, if our individual player piece bag has fewer than this, we update the value. If a new player enters, they discard pieces from the front until they have this number. This keeps all the players playing the same piece.
private int[] personScores; // when a person meets a house, you get this number of points, and then the # of points is decremented until it is zero.
private transient String currentParticipant;
private transient WoodsyBoardData currentBoard = new WoodsyBoardData(); // the current board while we are making changes
private transient ArrayList<Integer> currentTurnPieces = new ArrayList<Integer>();
private transient ArrayList<Integer> currentTurnPlayedPieces = new ArrayList<Integer>();
private transient boolean movingPerson = false; // true if the current turn has become moving a person
private transient int personMovesLeft = 0; // During person moves, number of moves left.
private transient boolean turnFinished = false;
private transient Coordinates personCoordinates = new Coordinates(0,0); // track where the person is during person move
private transient String lastErrorMessage = "";
private transient Context currentContext; // used for extracting string resources
WoodsyGameData(ArrayList<String> inputParticipantIds) {
// Constructor: create a Woodsy game data structure based on the supplied player ID's.
this.lastErrorMessage = "";
this.participantIds.clear();
this.remainingHouses.clear();
this.remainingPersons.clear();
this.personScores = new int[Pieces.numberOfPeople()];
for (int i = 1; i <= Pieces.numberOfPeople(); i++) {
this.remainingHouses.add(Pieces.createHousePiece(i));
this.remainingPersons.add(Pieces.createPersonPiece(i));
this.personScores[i-1] = this.maxPointsForGoal();
}
this.piecesToPlay.clear();
this.boards.clear();
this.scores.clear();
//
// prepare the piece bag
this.pieceBag = Pieces.pieces();
this.minPiecesLeft = this.pieceBag.length;
//
// now, add all the known participants.
//
for(String thisParticipantId : inputParticipantIds) {
if (thisParticipantId != null) this.addParticipantIfNeeded(thisParticipantId);
}
}
// methods that return game parameters-- currently constants
public int pointsForGold() { return 2; }
public int pointsForSilver() { return 1; }
public int maxPointsForGoal() { return 5; }
// private methods
private void addParticipantIfNeeded(String participantId) {
// Checks to see if a participant is already in the game and, if not, adds their
// information.
if (this.participantIds.contains(participantId)) return; // already exists
this.participantIds.add(participantId);
this.scores.put(participantId, 0);
this.boards.put(participantId, new WoodsyBoardData());
this.piecesToPlay.put(participantId, new ArrayList<Integer>());
// The board manages itself, but for Pieces to Play, we have to copy the piece bag.
// If other players have played pieces, we remove the ones they played from the front.
for (int thisPiece : this.pieceBag) this.piecesToPlay.get(participantId).add(thisPiece);
while (this.piecesToPlay.get(participantId).size() > this.minPiecesLeft)
this.piecesToPlay.get(participantId).remove(0);
}
// methods for accessing data and modifying it during the game
public WoodsyBoardData getBoard(String participantId) {
// returns the board corresponding to a participant ID, or null if not found
return this.boards.get(participantId);
}
public void beginTurn(String participantId, Context contextSource) {
// Begin the current turn by copying the current player's board to the current board property.
// When you begin a turn, you also link the game data to an Android context that can get string resources.
this.addParticipantIfNeeded(participantId);
this.currentParticipant = participantId;
this.currentBoard.copyFrom(this.getBoard(participantId));
this.currentContext = contextSource;
// Also determine the current pieces to play on this turn, based on
// availability of house/person pieces and number of players (2 player game:
// each player plays 2 houses and 2 persons at the start)
this.currentTurnPieces.clear();
this.currentTurnPlayedPieces.clear();
if (this.remainingPersons.size() > 0) {
int numPairs = 1;
if (this.participantIds.size() == 2) numPairs = 2;
for (int i = 0; i < numPairs; i++) {
if (i < this.remainingPersons.size())
this.currentTurnPieces.add(this.remainingPersons.get(i));
if (i < this.remainingHouses.size())
this.currentTurnPieces.add(this.remainingHouses.get(i));
}
}
if (this.currentTurnPieces.size() == 0) {
// if no people or houses to place, place the next regular piece
if (this.piecesToPlay.get(participantId).size() > 0)
this.currentTurnPieces.add(this.piecesToPlay.get(participantId).get(0));
}
// Prepare various turn related transient properties.
this.movingPerson = false;
this.personMovesLeft = 0;
this.turnFinished = false;
this.personCoordinates = new Coordinates(0,0);
this.lastErrorMessage = "";
}
public void rewindTurn() {
// use this if the user rewinds their turn to the beginning.
this.beginTurn(this.currentParticipant, this.currentContext);
}
public boolean piecesLeftThisTurn() {
// returns whether there are pieces left to play this turn.
if (this.currentTurnPieces.size() == 0) this.turnFinished = true;
if (this.turnFinished) return false;
return true;
}
public int getNextPiece() {
// during a turn, this returns the next piece to play, which can be displayed
// in the next piece area. Returns the End of Turn piece if none remain.
if (this.movingPerson) return Pieces.getPersonPieceFrom(this.currentBoard.getCell(this.personCoordinates));
if (!this.piecesLeftThisTurn()) return Pieces.createEndOfTurnPiece();
return this.currentTurnPieces.get(0);
}
public String getLastErrorMessage() {
// returns the last error message generally produced by playPieceAt.
return this.lastErrorMessage;
}
private int setFailure(String msg) {
// Sets the last error message to msg, and returns the failure piece.
this.lastErrorMessage = msg;
return Pieces.createFailurePiece();
}
private String getString(int resId) {
// uses the current context, set during beginTurn, to get a string resource.
return this.currentContext.getString(resId);
}
private void setCurrentPiecePlayed() {
// used inside of playPieceAt to move a piece that was played from the "to-play" array to the "played" array.
if (this.currentTurnPieces.size()==0) return;
this.currentTurnPlayedPieces.add(this.currentTurnPieces.get(0));
this.currentTurnPieces.remove(0);
}
private void incrementScore(int x) {
// Increments the score of the current player.
int newScore = this.scores.get(this.currentParticipant) + x;
this.scores.put(this.currentParticipant, newScore);
}
public int playPieceAt(int p, int x, int y) {
// Plays the valid piece P at (x,y) on the board. Returns the Success piece on regular success
// (with the board updated), the Failure piece if the move is invalid, or, if a person has
// begun moving, it returns a pure Person piece to indicate which person is moving.
// If you get a failure piece, you can get an error message using getLastErrorMessage.
Coordinates c = new Coordinates(x,y);
// check if there are no moves left
if (this.movingPerson && this.personMovesLeft <= 0) return this.setFailure(getString(R.string.all_moves_finished));
if (!this.piecesLeftThisTurn()) return this.setFailure(getString(R.string.turn_finished));
// check for valid coordinates, retrieve the current piece on the board.
if (!this.currentBoard.isValidCoords(c)) return this.setFailure(getString(R.string.invalid_coords));
int currentPiece = this.currentBoard.getCell(c);
// check game rules and place piece based on which kind it is.
if (Pieces.isPerson(p) && this.movingPerson) {
// Playing a single step in moving a person. First, see if there is a path to move the person.
// (The situation of having no moves left was already handled up top.)
int sourcePiece = this.currentBoard.getCell(this.personCoordinates);
int thisPersonPiece = Pieces.getPersonPieceFrom(sourcePiece);
int thisPersonNumber = Pieces.personNumber(thisPersonPiece);
int goalPiece = this.currentBoard.createGoalPiece(thisPersonNumber,0,c);
boolean reachedGoal = (goalPiece == currentPiece);
if (Pieces.personNumber(currentPiece) > 0)
return this.setFailure(getString(R.string.only_one_person_in_square_at_time));
if (!Pieces.piecesConnect(this.currentBoard.getCell(this.personCoordinates), currentPiece, this.personCoordinates.x(), this.personCoordinates.y(), x, y))
return this.setFailure(getString(R.string.person_has_no_path));
if (this.currentBoard.isOnEdge(c) && !reachedGoal)
return this.setFailure(getString(R.string.person_on_edge_can_only_go_to_their_house));
//-- it appears that we now have a valid move.
//-- move the person
sourcePiece = Pieces.setPersonNumber(sourcePiece,0);
currentPiece = Pieces.setPersonNumber(currentPiece,thisPersonNumber);
this.currentBoard.setCell(this.personCoordinates,sourcePiece);
this.personMovesLeft--;
this.personCoordinates = c;
//-- check for coins
if (Pieces.gold(currentPiece) || Pieces.silver(currentPiece)) {
if (Pieces.gold(currentPiece)) this.incrementScore(this.pointsForGold());
if (Pieces.silver(currentPiece)) this.incrementScore(this.pointsForSilver());
currentPiece = Pieces.setCoins(currentPiece,false,false);
}
//-- check for reaching goal
if (reachedGoal) {
this.incrementScore(this.personScores[thisPersonNumber]);
this.personScores[thisPersonNumber]--;
if (this.personScores[thisPersonNumber]<0) this.personScores[thisPersonNumber] = 0;
//-- check: have we won by finding all the goals?
if (this.currentBoard.isWinningBoard()) this.winner = this.currentParticipant;
}
//-- now our piece is ready to store and we can return.
this.currentBoard.setCell(c, currentPiece);
return Pieces.createSuccessPiece();
}
else if (Pieces.isPerson(p) || Pieces.isHouse(p)) {
// Playing a person piece or house piece when you're not moving a person.
if (!this.currentBoard.isOnEdge(c)) return this.setFailure(getString(R.string.people_and_houses_edge_only)); // person piece has to be placed on edge
if (this.currentBoard.distanceToPartner(p, c) < 5) return this.setFailure(getString(R.string.house_person_too_close)); // person piece can't be too close to house piece
if (!Pieces.isGreenGrassPiece(currentPiece)) return this.setFailure(getString(R.string.houses_and_people_only_on_green_grass)); // have to put house or person on green grass.
// combine the pieces and store the result
int newPiece = Pieces.combinePieces(currentPiece, p);
if (Pieces.isFailurePiece(newPiece)) return this.setFailure(getString(R.string.unexpected_problem));
this.currentBoard.setCell(c, newPiece);
this.setCurrentPiecePlayed();
return Pieces.createSuccessPiece();
} else {
// Playing a regular piece. If you play it against an existing piece with a person on it,
// it starts person-moving mode. If you play it on a blank square, it places the piece.
// Other moves are invalid.
if (this.currentBoard.isOnEdge(c))
return this.setFailure(getString(R.string.cant_play_path_piece_on_edge));
if (Pieces.personNumber(currentPiece) > 0) {
// Begin person moving mode
this.movingPerson = true;
this.personCoordinates = c;
this.personMovesLeft = Pieces.numberMoves(currentPiece);
this.setCurrentPiecePlayed();
return Pieces.createSuccessPiece();
}
else if (Pieces.isBlank(currentPiece)) {
// Placing tile in blank space
this.currentBoard.setCell(c, p);
this.setCurrentPiecePlayed();
return Pieces.createSuccessPiece();
}
else
return this.setFailure(getString(R.string.cant_move_there));
}
// Shouldn't get here, and indeed, the compiler says you can't get here.
}
public int playPieceDiscard(int p) {
// Discards a piece. Of course you can't discard people or house pieces, and discarding
// doesn't work if you started moving a person.
// Returns the success or failure piece.
if (this.movingPerson) return this.setFailure(getString(R.string.cant_discard_moving_person));
if (Pieces.isHouse(p)) return this.setFailure(getString(R.string.cant_discard_house));
if (Pieces.isPerson(p)) return this.setFailure(getString(R.string.cant_discard_person));
this.setCurrentPiecePlayed(); // put the piece in the played pile
return Pieces.createSuccessPiece();
}
public boolean movingPerson() {
// True if a person is moving as a result of the last play.
return this.movingPerson;
}
public int movingPersonMovesLeft() {
if (!this.movingPerson) return 0;
return this.personMovesLeft;
}
public int piecesLeftInBag() {
// For display purposes, you might want to know how many pieces are left in the whole bag.
return this.piecesToPlay.get(this.currentParticipant).size();
}
public WoodsyBoardData getCurrentBoard() {
// retrieve the current board, which is the one that has any modifications during the turn.
return this.currentBoard;
}
public void endTurn() {
// call this when the turn is complete, right before serializing the data.
// it saves the proposed turn into the actual current participant's board.
// it also removes all the played pieces permanently from where they came from.
if (this.movingPerson) this.setCurrentPiecePlayed(); // if we were moving a person, we didn't actually put the piece in the played pile till now.
for (int thisPlayedPiece : this.currentTurnPlayedPieces) {
if (Pieces.isPerson(thisPlayedPiece))
this.remainingPersons.remove(Integer.valueOf(Pieces.personNumber(thisPlayedPiece)));
else if (Pieces.isHouse(thisPlayedPiece))
this.remainingHouses.remove(Integer.valueOf(Pieces.houseNumber(thisPlayedPiece)));
else
this.piecesToPlay.get(this.currentParticipant).remove(Integer.valueOf(thisPlayedPiece));
}
//-- check if there is now a new minimum number of pieces
if (this.piecesLeftInBag() < this.minPiecesLeft) this.minPiecesLeft = this.piecesLeftInBag();
//-- now check to see if anybody has pieces left!
int participantsWithPieces = 0;
for (String thisParticipantId : this.participantIds) {
if (this.piecesToPlay.get(thisParticipantId).size() > 0) participantsWithPieces++;
}
if (participantsWithPieces == 0) {
// nobody has pieces-- game is over! find and declare the winner.
int maxScore = 0; ArrayList<String> playersWithMaxScore = new ArrayList<String>();
playersWithMaxScore.clear();
for (String thisParticipantId : this.participantIds) {
if (this.scores.get(thisParticipantId) == maxScore)
playersWithMaxScore.add(thisParticipantId);
if (this.scores.get(thisParticipantId) > maxScore) {
maxScore = this.scores.get(thisParticipantId);
playersWithMaxScore.clear();
playersWithMaxScore.add(thisParticipantId);
}
}
this.winner = TextUtils.join(", ", playersWithMaxScore);
}
//--- now that we've removed played pieces, save the board.
this.boards.get(this.currentParticipant).copyFrom(this.currentBoard);
}
public String getWinner() {
// gets the winner participant ID, or "" if no winner yet
return this.winner;
}
public boolean gameOver() {
// returns true if the game is over (determined by whether a winner has been set)
return (this.winner.length() == 0);
}
}
|
3e0084f19f0d52b0a198def500446448ddbb9980 | 1,479 | java | Java | Data/Juliet-Java/Juliet-Java-v103/000/131/030/CWE191_Integer_Underflow__byte_console_readLine_multiply_54b.java | b19e93n/PLC-Pyramid | 6d5b57be6995a94ef7402144cee965862713b031 | [
"MIT"
] | null | null | null | Data/Juliet-Java/Juliet-Java-v103/000/131/030/CWE191_Integer_Underflow__byte_console_readLine_multiply_54b.java | b19e93n/PLC-Pyramid | 6d5b57be6995a94ef7402144cee965862713b031 | [
"MIT"
] | null | null | null | Data/Juliet-Java/Juliet-Java-v103/000/131/030/CWE191_Integer_Underflow__byte_console_readLine_multiply_54b.java | b19e93n/PLC-Pyramid | 6d5b57be6995a94ef7402144cee965862713b031 | [
"MIT"
] | null | null | null | 36.975 | 171 | 0.734956 | 219 | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE191_Integer_Underflow__byte_console_readLine_multiply_54b.java
Label Definition File: CWE191_Integer_Underflow.label.xml
Template File: sources-sinks-54b.tmpl.java
*/
/*
* @description
* CWE: 191 Integer Underflow
* BadSource: console_readLine Read data from the console using readLine
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: multiply
* GoodSink: Ensure there will not be an underflow before multiplying data by 2
* BadSink : If data is negative, multiply by 2, which can cause an underflow
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
public class CWE191_Integer_Underflow__byte_console_readLine_multiply_54b
{
public void badSink(byte data ) throws Throwable
{
(new CWE191_Integer_Underflow__byte_console_readLine_multiply_54c()).badSink(data );
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(byte data ) throws Throwable
{
(new CWE191_Integer_Underflow__byte_console_readLine_multiply_54c()).goodG2BSink(data );
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(byte data ) throws Throwable
{
(new CWE191_Integer_Underflow__byte_console_readLine_multiply_54c()).goodB2GSink(data );
}
}
|
3e0087d96c53a1d65e39c972c3b79ba603ce304c | 518 | java | Java | src/main/java/com/fw/beans/NotesBean.java | Sumit2792/logisticsApplication | 98d926c26b8ed113c1401f7781768fde8fb217fc | [
"Apache-2.0"
] | null | null | null | src/main/java/com/fw/beans/NotesBean.java | Sumit2792/logisticsApplication | 98d926c26b8ed113c1401f7781768fde8fb217fc | [
"Apache-2.0"
] | null | null | null | src/main/java/com/fw/beans/NotesBean.java | Sumit2792/logisticsApplication | 98d926c26b8ed113c1401f7781768fde8fb217fc | [
"Apache-2.0"
] | null | null | null | 15.69697 | 47 | 0.708494 | 220 | package com.fw.beans;
import java.util.Date;
public class NotesBean {
private String note;
private String userId;
private Date createdDate;
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
}
|
3e0087f185c849eff912db9d6d6d15a4018a81db | 4,593 | java | Java | order/order-rest/src/main/java/cn/iocoder/mall/order/rest/controller/order/UsersOrderController.java | stpangst/onemall | 671d4ad2461cd404c5d154d84115e12786edcb3f | [
"MulanPSL-1.0"
] | 1 | 2021-01-27T13:58:47.000Z | 2021-01-27T13:58:47.000Z | order/order-rest/src/main/java/cn/iocoder/mall/order/rest/controller/order/UsersOrderController.java | stpangst/onemall | 671d4ad2461cd404c5d154d84115e12786edcb3f | [
"MulanPSL-1.0"
] | 1 | 2022-01-12T23:06:20.000Z | 2022-01-12T23:06:20.000Z | order/order-rest/src/main/java/cn/iocoder/mall/order/rest/controller/order/UsersOrderController.java | stpangst/onemall | 671d4ad2461cd404c5d154d84115e12786edcb3f | [
"MulanPSL-1.0"
] | 1 | 2021-01-18T05:09:18.000Z | 2021-01-18T05:09:18.000Z | 43.330189 | 138 | 0.653821 | 221 | package cn.iocoder.mall.order.rest.controller.order;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 订单API(users)
*
* @author Sin
* @time 2019-03-24 11:24
*/
@RestController
@RequestMapping("users/order")
@Api(description = "用户订单") // TODO FROM 芋艿 to 小范,description 已经废弃啦
public class UsersOrderController {
// @Reference(validation = "true", version = "${dubbo.provider.OrderReturnService.version}")
// private OrderService orderService;
//
// @Reference(validation = "true", version = "${dubbo.provider.CartService.version}")
// private CartService cartService;
//
// @Reference(validation = "true", version = "${dubbo.consumer.DataDictService.version}")
// private DataDictService dataDictService;
//
// @Reference(validation = "true", version = "${dubbo.consumer.CouponService.version}")
// private CouponService couponService;
//
// @GetMapping("order_page")
// @RequiresLogin
// @ApiOperation("订单分页")
// public CommonResult<OrderPageBO> getOrderPage(@Validated OrderQueryDTO orderQueryDTO) {
// Integer userId = UserSecurityContextHolder.getContext().getUserId();
// orderQueryDTO.setUserId(userId);
// return orderService.getOrderPage(orderQueryDTO);
// }
//
// @PostMapping("create_order")
// @RequiresLogin
// @ApiOperation("创建订单")
// public CommonResult<OrderCreateBO> createOrder(@RequestBody @Validated OrderCreatePO orderCreatePO,
// HttpServletRequest request) {
// Integer userId = UserSecurityContextHolder.getContext().getUserId();
// OrderCreateDTO orderCreateDTO = OrderConvertAPP.INSTANCE.convert(orderCreatePO);
// orderCreateDTO.setUserId(userId).setIp(HttpUtil.getIp(request));
// return orderService.createOrder(orderCreateDTO);
// }
//
// @PostMapping("create_order_from_cart")
// @RequiresLogin
// @ApiOperation("创建订单购物车")
// public CommonResult<OrderCreateBO> createOrderFromCart(@RequestParam("userAddressId") Integer userAddressId,
// @RequestParam(value = "couponCardId", required = false) Integer couponCardId,
// @RequestParam(value = "remark", required = false) String remark,
// HttpServletRequest request) {
// Integer userId = UserSecurityContextHolder.getContext().getUserId();
// // 获得购物车中选中的商品
// List<CartItemBO> cartItems = cartService.list(userId, true);
// if (cartItems.isEmpty()) {
// return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_CREATE_CART_IS_EMPTY.getCode());
// }
// // 创建 OrderCreateDTO 对象
// OrderCreateDTO orderCreateDTO = OrderConvertAPP.INSTANCE.createOrderCreateDTO(userId, userAddressId,
// remark, HttpUtil.getIp(request),
// cartItems, couponCardId);
// // 创建订单
// CommonResult<OrderCreateBO> createResult = orderService.createOrder(orderCreateDTO);
// if (createResult.isError()) {
// return CommonResult.error(createResult);
// }
// // 清空购物车 // TODO 芋艿,需要标记删除的原因,即结果为创建为某个订单。
// cartService.deleteList(userId, cartItems.stream().map(CartItemBO::getSkuId).collect(Collectors.toList()));
// // 返回结果
// return createResult;
// }
//
//
// @PostMapping("confirm_receiving")
// @RequiresLogin
// @ApiOperation("确认收货")
// public CommonResult confirmReceiving(@RequestParam("orderId") Integer orderId) {
// Integer userId = UserSecurityContextHolder.getContext().getUserId();
// return orderService.confirmReceiving(userId, orderId);
// }
//
// @GetMapping("info")
// @RequiresLogin
// @ApiOperation("订单详情")
// public CommonResult<OrderInfoBO> orderInfo(@RequestParam("orderId") Integer orderId) {
// Integer userId = UserSecurityContextHolder.getContext().getUserId();
// CommonResult<OrderInfoBO> commonResult = orderService.info(userId, orderId);
//
// OrderInfoBO orderInfoBO = commonResult.getData();
// if (orderInfoBO != null) {
// CommonResult<DataDictBO> dictResult = dataDictService
// .getDataDict(DictKeyConstants.ORDER_STATUS, orderInfoBO.getStatus());
// orderInfoBO.setStatusText(dictResult.getData().getDisplayName());
// }
// return commonResult;
// }
}
|
3e0088c02e0f99489330015fc6679016482eb75d | 1,037 | java | Java | src/main/java/nl/utwente/simulator/entities/species/structured/CrossLink.java | dijkpah/C-L-RAFT-CC-Simulator | f2549ba94e96e5d16764c2f9f904fdf77e5f438b | [
"Apache-2.0"
] | null | null | null | src/main/java/nl/utwente/simulator/entities/species/structured/CrossLink.java | dijkpah/C-L-RAFT-CC-Simulator | f2549ba94e96e5d16764c2f9f904fdf77e5f438b | [
"Apache-2.0"
] | 1 | 2018-06-05T10:41:28.000Z | 2018-06-05T10:41:28.000Z | src/main/java/nl/utwente/simulator/entities/species/structured/CrossLink.java | dijkpah/C-L-RAFT-CC-Simulator | f2549ba94e96e5d16764c2f9f904fdf77e5f438b | [
"Apache-2.0"
] | null | null | null | 30.5 | 96 | 0.661524 | 222 | package nl.utwente.simulator.entities.species.structured;
import javax.annotation.Nonnull;
public class CrossLink {
public final Pointer firstHalf;
public final Pointer secondHalf;
public CrossLink(@Nonnull Pointer firstHalf, @Nonnull Pointer secondHalf) {
this.firstHalf = firstHalf;
this.secondHalf = secondHalf;
}
/**
* This is a pointer to the one part of a cross-linker within a particle.
* The chain number is used to decide in which chain we should look for the CrossLinkerHalf,
* as multiple chains can contain a reference to the same CrossLinkerHalf object
*/
public static class Pointer {
public final Crosslinker molecule;
public final int chainNr;
public Pointer(Pointer p, int offset){
this.molecule = p.molecule;
this.chainNr = p.chainNr +offset;
}
public Pointer(Crosslinker molecule, int chainNr) {
this.molecule = molecule;
this.chainNr = chainNr;
}
}
}
|
3e0089254c965d53b9d30789114f2d0e055ce654 | 959 | java | Java | src/main/java/com/github/pscheidl/fortee/failsafe/FailsafeInterceptor.java | Pscheidl/FortEE | ad47870946608978466a4af6c59cc94343c59426 | [
"MIT"
] | 15 | 2017-04-17T17:52:15.000Z | 2020-10-06T16:17:07.000Z | src/main/java/com/github/pscheidl/fortee/failsafe/FailsafeInterceptor.java | Pscheidl/FortEE | ad47870946608978466a4af6c59cc94343c59426 | [
"MIT"
] | 15 | 2017-04-14T02:53:05.000Z | 2020-02-16T14:04:24.000Z | src/main/java/com/github/pscheidl/fortee/failsafe/FailsafeInterceptor.java | Pscheidl/FortEE | ad47870946608978466a4af6c59cc94343c59426 | [
"MIT"
] | 3 | 2017-07-11T19:41:33.000Z | 2019-09-27T13:19:08.000Z | 34.25 | 112 | 0.754953 | 223 | package com.github.pscheidl.fortee.failsafe;
import javax.enterprise.event.Event;
import javax.inject.Inject;
import javax.interceptor.InvocationContext;
import java.time.LocalDateTime;
/**
* Abstract Failsafe interceptor converting unexpected erroneous states into an empty {@link java.util.Optional}
*/
public abstract class FailsafeInterceptor {
@Inject
private Event<ExecutionErrorEvent> executionErrorEvent;
/**
* Assembles and fires ExecutionError event.
*
* @param invocationContext Interceptor's invocation context
* @param throwable Throwable catched by the interceptor
*/
protected void throwExecutionErrorEvent(InvocationContext invocationContext, Throwable throwable) {
ExecutionErrorEvent executionErrorEvent = new ExecutionErrorEvent(invocationContext.getMethod(),
throwable, LocalDateTime.now());
this.executionErrorEvent.fire(executionErrorEvent);
}
}
|
3e008aa7cc624dfa4c12d51d974501b49080fcb8 | 284 | java | Java | app/src/androidTest/java/com/szymongrochowiak/androidstarterpack/test/utils/HttpTestUtils.java | SzymonGrochowiak/Best-Android-libraries | e9c96104b5819d1beba5b15fccd617000040e4a8 | [
"Apache-2.0"
] | 2 | 2018-01-30T04:08:13.000Z | 2020-04-25T13:56:06.000Z | app/src/androidTest/java/com/szymongrochowiak/androidstarterpack/test/utils/HttpTestUtils.java | SzymonGrochowiak/Android-my-starter-pack | e9c96104b5819d1beba5b15fccd617000040e4a8 | [
"Apache-2.0"
] | null | null | null | app/src/androidTest/java/com/szymongrochowiak/androidstarterpack/test/utils/HttpTestUtils.java | SzymonGrochowiak/Android-my-starter-pack | e9c96104b5819d1beba5b15fccd617000040e4a8 | [
"Apache-2.0"
] | null | null | null | 20.285714 | 63 | 0.739437 | 224 | package com.szymongrochowiak.androidstarterpack.test.utils;
/**
* @author Szymon Grochowiak
*/
public class HttpTestUtils {
public static final int HTTP_CODE_SUCCESS = 200;
public static final int HTTP_CODE_FAIL_AUTHORIZATION = 401;
private HttpTestUtils() {
}
}
|
3e008b0af00af2ad41738ba14bf5779067ad8669 | 4,149 | java | Java | odata-core/src/main/java/org/odata4j/expression/AbstractExpressionVisitor.java | vhalbert/oreva | 39b6c90c432bcefc410894c04fb831178d560272 | [
"Apache-2.0"
] | 5 | 2015-03-27T20:00:25.000Z | 2020-07-01T10:46:59.000Z | odata-core/src/main/java/org/odata4j/expression/AbstractExpressionVisitor.java | vhalbert/oreva | 39b6c90c432bcefc410894c04fb831178d560272 | [
"Apache-2.0"
] | 3 | 2015-04-01T18:17:39.000Z | 2020-01-21T20:13:37.000Z | odata-core/src/main/java/org/odata4j/expression/AbstractExpressionVisitor.java | vhalbert/oreva | 39b6c90c432bcefc410894c04fb831178d560272 | [
"Apache-2.0"
] | 7 | 2015-03-16T15:58:36.000Z | 2016-12-25T22:10:29.000Z | 15.957692 | 69 | 0.706435 | 225 | package org.odata4j.expression;
import org.odata4j.expression.OrderByExpression.Direction;
public class AbstractExpressionVisitor implements ExpressionVisitor {
@Override
public void beforeDescend() {
}
@Override
public void afterDescend() {
}
@Override
public void betweenDescend() {
}
@Override
public void visit(String type) {
}
@Override
public void visit(OrderByExpression expr) {
}
@Override
public void visit(Direction direction) {
}
@Override
public void visit(AddExpression expr) {
}
@Override
public void visit(AndExpression expr) {
}
@Override
public void visit(BooleanLiteral expr) {
}
@Override
public void visit(CastExpression expr) {
}
@Override
public void visit(ConcatMethodCallExpression expr) {
}
@Override
public void visit(DateTimeLiteral expr) {
}
@Override
public void visit(DateTimeOffsetLiteral expr) {
}
@Override
public void visit(DecimalLiteral expr) {
}
@Override
public void visit(DivExpression expr) {
}
@Override
public void visit(EndsWithMethodCallExpression expr) {
}
@Override
public void visit(EntitySimpleProperty expr) {
}
@Override
public void visit(EqExpression expr) {
}
@Override
public void visit(GeExpression expr) {
}
@Override
public void visit(GtExpression expr) {
}
@Override
public void visit(GuidLiteral expr) {
}
@Override
public void visit(BinaryLiteral expr) {
}
@Override
public void visit(ByteLiteral expr) {
}
@Override
public void visit(SByteLiteral expr) {
}
@Override
public void visit(IndexOfMethodCallExpression expr) {
}
@Override
public void visit(SingleLiteral expr) {
}
@Override
public void visit(DoubleLiteral expr) {
}
@Override
public void visit(IntegralLiteral expr) {
}
@Override
public void visit(Int64Literal expr) {
}
@Override
public void visit(IsofExpression expr) {
}
@Override
public void visit(LeExpression expr) {
}
@Override
public void visit(LengthMethodCallExpression expr) {
}
@Override
public void visit(LtExpression expr) {
}
@Override
public void visit(ModExpression expr) {
}
@Override
public void visit(MulExpression expr) {
}
@Override
public void visit(NeExpression expr) {
}
@Override
public void visit(NegateExpression expr) {
}
@Override
public void visit(NotExpression expr) {
}
@Override
public void visit(NullLiteral expr) {
}
@Override
public void visit(OrExpression expr) {
}
@Override
public void visit(ParenExpression expr) {
}
@Override
public void visit(BoolParenExpression expr) {
}
@Override
public void visit(ReplaceMethodCallExpression expr) {
}
@Override
public void visit(StartsWithMethodCallExpression expr) {
}
@Override
public void visit(StringLiteral expr) {
}
@Override
public void visit(SubExpression expr) {
}
@Override
public void visit(SubstringMethodCallExpression expr) {
}
@Override
public void visit(SubstringOfMethodCallExpression expr) {
}
@Override
public void visit(TimeLiteral expr) {
}
@Override
public void visit(ToLowerMethodCallExpression expr) {
}
@Override
public void visit(ToUpperMethodCallExpression expr) {
}
@Override
public void visit(TrimMethodCallExpression expr) {
}
@Override
public void visit(YearMethodCallExpression expr) {
}
@Override
public void visit(MonthMethodCallExpression expr) {
}
@Override
public void visit(DayMethodCallExpression expr) {
}
@Override
public void visit(HourMethodCallExpression expr) {
}
@Override
public void visit(MinuteMethodCallExpression expr) {
}
@Override
public void visit(SecondMethodCallExpression expr) {
}
@Override
public void visit(RoundMethodCallExpression expr) {
}
@Override
public void visit(FloorMethodCallExpression expr) {
}
@Override
public void visit(CeilingMethodCallExpression expr) {
}
@Override
public void visit(AggregateAnyFunction expr) {
}
@Override
public void visit(AggregateAllFunction expr) {
}
}
|
3e008c55d75c7ac87277c2032e9d66c4c7808180 | 2,261 | java | Java | ph-oton-security/src/main/java/com/helger/photon/security/lock/LockInfo.java | phax/ph-oton | 13c6c707641bc32c77e36b157179dd209f8f5e0f | [
"Apache-2.0"
] | 4 | 2017-05-02T14:12:09.000Z | 2022-01-13T00:27:10.000Z | ph-oton-security/src/main/java/com/helger/photon/security/lock/LockInfo.java | phax/ph-oton | 13c6c707641bc32c77e36b157179dd209f8f5e0f | [
"Apache-2.0"
] | 11 | 2016-02-15T19:23:23.000Z | 2021-09-01T17:48:38.000Z | ph-oton-security/src/main/java/com/helger/photon/security/lock/LockInfo.java | phax/ph-oton | 13c6c707641bc32c77e36b157179dd209f8f5e0f | [
"Apache-2.0"
] | 4 | 2015-11-02T13:46:38.000Z | 2022-01-13T00:27:31.000Z | 27.240964 | 117 | 0.725785 | 226 | /*
* Copyright (C) 2014-2021 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* 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.helger.photon.security.lock;
import java.time.LocalDateTime;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;
import com.helger.commons.ValueEnforcer;
import com.helger.commons.annotation.Nonempty;
import com.helger.commons.datetime.PDTFactory;
import com.helger.commons.hashcode.HashCodeGenerator;
import com.helger.commons.string.ToStringGenerator;
/**
* Default implementation of the {@link ILockInfo} interface.
*
* @author Philip Helger
*/
@Immutable
public final class LockInfo implements ILockInfo
{
private final String m_sUserID;
private final LocalDateTime m_aLockTime;
public LockInfo (@Nonnull @Nonempty final String sUserID)
{
m_sUserID = ValueEnforcer.notEmpty (sUserID, "UserID");
m_aLockTime = PDTFactory.getCurrentLocalDateTime ();
}
@Nonnull
@Nonempty
public String getLockUserID ()
{
return m_sUserID;
}
@Nonnull
public LocalDateTime getLockDateTime ()
{
return m_aLockTime;
}
@Override
public boolean equals (final Object o)
{
if (o == this)
return true;
if (o == null || !getClass ().equals (o.getClass ()))
return false;
final LockInfo rhs = (LockInfo) o;
return m_sUserID.equals (rhs.m_sUserID) && m_aLockTime.equals (rhs.m_aLockTime);
}
@Override
public int hashCode ()
{
return new HashCodeGenerator (this).append (m_sUserID).append (m_aLockTime).getHashCode ();
}
@Override
public String toString ()
{
return new ToStringGenerator (this).append ("userID", m_sUserID).append ("lockTime", m_aLockTime).getToString ();
}
}
|
3e008cb97627f0bae692df8ed478e7c22192ae78 | 103 | java | Java | 12-01-BelfastEventsSimple/src/main/java/uk/ac/belfastmet/BelfastEvents/Controller/package-info.java | daveburns7/neueda-springboot | 93b30014805ab644f4cd3a6cad54408811815e35 | [
"MIT"
] | null | null | null | 12-01-BelfastEventsSimple/src/main/java/uk/ac/belfastmet/BelfastEvents/Controller/package-info.java | daveburns7/neueda-springboot | 93b30014805ab644f4cd3a6cad54408811815e35 | [
"MIT"
] | null | null | null | 12-01-BelfastEventsSimple/src/main/java/uk/ac/belfastmet/BelfastEvents/Controller/package-info.java | daveburns7/neueda-springboot | 93b30014805ab644f4cd3a6cad54408811815e35 | [
"MIT"
] | null | null | null | 12.875 | 50 | 0.592233 | 227 | /**
*
*/
/**
* @author BUR14091750
*
*/
package uk.ac.belfastmet.BelfastEvents.Controller; |
3e008cdf326af1bc4c126dccfe4033f9418c9d87 | 3,671 | java | Java | clients/java-pkmst/generated/src/main/java/com/prokarma/pkmst/model/CauseUserIdCause.java | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/java-pkmst/generated/src/main/java/com/prokarma/pkmst/model/CauseUserIdCause.java | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/java-pkmst/generated/src/main/java/com/prokarma/pkmst/model/CauseUserIdCause.java | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | 24.637584 | 143 | 0.686189 | 228 | package com.prokarma.pkmst.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Response class to be returned by Api
* @author pkmst
*
*/
/**
* CauseUserIdCause
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPKMSTServerCodegen", date = "2022-02-13T02:17:32.113478Z[Etc/UTC]")
public class CauseUserIdCause {
@JsonProperty("_class")
private String propertyClass;
@JsonProperty("shortDescription")
private String shortDescription;
@JsonProperty("userId")
private String userId;
@JsonProperty("userName")
private String userName;
public CauseUserIdCause propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
/**
* Get propertyClass
* @return propertyClass
**/
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
}
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
public CauseUserIdCause shortDescription(String shortDescription) {
this.shortDescription = shortDescription;
return this;
}
/**
* Get shortDescription
* @return shortDescription
**/
@ApiModelProperty(value = "")
public String getShortDescription() {
return shortDescription;
}
public void setShortDescription(String shortDescription) {
this.shortDescription = shortDescription;
}
public CauseUserIdCause userId(String userId) {
this.userId = userId;
return this;
}
/**
* Get userId
* @return userId
**/
@ApiModelProperty(value = "")
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public CauseUserIdCause userName(String userName) {
this.userName = userName;
return this;
}
/**
* Get userName
* @return userName
**/
@ApiModelProperty(value = "")
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CauseUserIdCause causeUserIdCause = (CauseUserIdCause) o;
return Objects.equals(this.propertyClass, causeUserIdCause.propertyClass) &&
Objects.equals(this.shortDescription, causeUserIdCause.shortDescription) &&
Objects.equals(this.userId, causeUserIdCause.userId) &&
Objects.equals(this.userName, causeUserIdCause.userName);
}
@Override
public int hashCode() {
return Objects.hash(propertyClass, shortDescription, userId, userName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CauseUserIdCause {\n");
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
sb.append(" shortDescription: ").append(toIndentedString(shortDescription)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
sb.append(" userName: ").append(toIndentedString(userName)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
3e008ec40e3f2bbb89b73a33a902b3f0c3a2230b | 834 | java | Java | src/main/java/io/snow/core/nio/IoFilterAdapter.java | tulipR/Snow | 713caf53326fa1eb9f2513c815bee5d389ca5ff4 | [
"Apache-2.0"
] | 2 | 2019-02-18T17:05:03.000Z | 2019-02-20T06:35:57.000Z | src/main/java/io/snow/core/nio/IoFilterAdapter.java | tulipR/Snow | 713caf53326fa1eb9f2513c815bee5d389ca5ff4 | [
"Apache-2.0"
] | null | null | null | src/main/java/io/snow/core/nio/IoFilterAdapter.java | tulipR/Snow | 713caf53326fa1eb9f2513c815bee5d389ca5ff4 | [
"Apache-2.0"
] | null | null | null | 26.0625 | 106 | 0.803357 | 229 | package io.snow.core.nio;
public class IoFilterAdapter implements IoFilter {
@Override
public void messageReceived(NioConnect connect, NextFilter nextFilter, Object message) throws Exception {
nextFilter.messageReceived(connect, message);
}
@Override
public void messageWrite(NioConnect connect, NextFilter nextFilter, Object message) throws Exception {
nextFilter.messageWrite(connect, message);
}
@Override
public void connectCreated(NioConnect connect,NextFilter nextFilter) {
nextFilter.connectCreated(connect);
}
@Override
public void connectClosed(NioConnect connect,NextFilter nextFilter) {
nextFilter.connectClosed(connect);
}
@Override
public void connectAbnomalClosed(NioConnect connect,NextFilter nextFilter, Exception exception) {
nextFilter.connectAbnormalClosed(connect, exception);
}
}
|
3e009003c1ece0367a3fc17bd7e0c01ba07cf2fa | 540 | java | Java | Spring Core/Basic/src/main/java/Chapter_1_Collection_Injection/Ex_1_Map_Injection.java | zaleslaw/Spring-Tutorial | d10fdc414274e898424ac05045bf8a30caaf8356 | [
"MIT"
] | 5 | 2017-07-18T01:22:04.000Z | 2019-11-22T15:09:19.000Z | Spring Core/Basic/src/main/java/Chapter_1_Collection_Injection/Ex_1_Map_Injection.java | zaleslaw/Spring-Tutorial | d10fdc414274e898424ac05045bf8a30caaf8356 | [
"MIT"
] | 2 | 2017-10-27T17:41:37.000Z | 2017-10-27T17:45:42.000Z | Spring Core/Basic/src/main/java/Chapter_1_Collection_Injection/Ex_1_Map_Injection.java | zaleslaw/Spring-Tutorial | d10fdc414274e898424ac05045bf8a30caaf8356 | [
"MIT"
] | null | null | null | 31.764706 | 95 | 0.762963 | 230 | package Chapter_1_Collection_Injection;
import beans.Developer;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Created by Alexey_Zinovyev on 19-Mar-17.
*/
public class Ex_1_Map_Injection {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("Chapter_1_Beans.xml");
Developer dev = context.getBean("dev", Developer.class);
System.out.println(dev.toString());
}
}
|
3e009024f2db803f6096cbf76ee8b7de92c0d7ba | 3,212 | java | Java | src/main/java/com/feeyo/kafka/protocol/CommonFields.java | beifuyiqiedeqilin/feeyo-redisproxy | 44cdac3b3aad757fa420b546e6444c007b80818e | [
"BSD-3-Clause"
] | 75 | 2017-09-13T10:13:56.000Z | 2021-12-24T06:42:49.000Z | src/main/java/com/feeyo/kafka/protocol/CommonFields.java | beifuyiqiedeqilin/feeyo-redisproxy | 44cdac3b3aad757fa420b546e6444c007b80818e | [
"BSD-3-Clause"
] | 18 | 2017-09-27T05:44:24.000Z | 2022-02-10T01:30:46.000Z | src/main/java/com/feeyo/kafka/protocol/CommonFields.java | beifuyiqiedeqilin/feeyo-redisproxy | 44cdac3b3aad757fa420b546e6444c007b80818e | [
"BSD-3-Clause"
] | 45 | 2017-09-13T06:59:30.000Z | 2021-09-27T09:09:19.000Z | 64.24 | 145 | 0.739726 | 231 | package com.feeyo.kafka.protocol;
import com.feeyo.kafka.protocol.types.Field;
/**
@see https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/protocol/CommonFields.java
*
*/
public class CommonFields {
public static final Field.Int32 THROTTLE_TIME_MS = new Field.Int32("throttle_time_ms",
"Duration in milliseconds for which the request was throttled due to quota violation (Zero if the " +
"request did not violate any quota)", 0);
public static final Field.Str TOPIC_NAME = new Field.Str("topic", "Name of topic");
public static final Field.Int32 PARTITION_ID = new Field.Int32("partition", "Topic partition id");
public static final Field.Int16 ERROR_CODE = new Field.Int16("error_code", "Response error code");
public static final Field.NullableStr ERROR_MESSAGE = new Field.NullableStr("error_message", "Response error message");
// Group APIs
public static final Field.Str GROUP_ID = new Field.Str("group_id", "The unique group identifier");
public static final Field.Int32 GENERATION_ID = new Field.Int32("generation_id", "The generation of the group.");
public static final Field.Str MEMBER_ID = new Field.Str("member_id", "The member id assigned by the group " +
"coordinator or null if joining for the first time.");
// Transactional APIs
public static final Field.Str TRANSACTIONAL_ID = new Field.Str("transactional_id", "The transactional id corresponding to the transaction.");
public static final Field.NullableStr NULLABLE_TRANSACTIONAL_ID = new Field.NullableStr("transactional_id",
"The transactional id or null if the producer is not transactional");
public static final Field.Int64 PRODUCER_ID = new Field.Int64("producer_id", "Current producer id in use by the transactional id.");
public static final Field.Int16 PRODUCER_EPOCH = new Field.Int16("producer_epoch", "Current epoch associated with the producer id.");
// ACL APIs
public static final Field.Int8 RESOURCE_TYPE = new Field.Int8("resource_type", "The resource type");
public static final Field.Str RESOURCE_NAME = new Field.Str("resource_name", "The resource name");
public static final Field.NullableStr RESOURCE_NAME_FILTER = new Field.NullableStr("resource_name", "The resource name filter");
public static final Field.Str PRINCIPAL = new Field.Str("principal", "The ACL principal");
public static final Field.NullableStr PRINCIPAL_FILTER = new Field.NullableStr("principal", "The ACL principal filter");
public static final Field.Str HOST = new Field.Str("host", "The ACL host");
public static final Field.NullableStr HOST_FILTER = new Field.NullableStr("host", "The ACL host filter");
public static final Field.Int8 OPERATION = new Field.Int8("operation", "The ACL operation");
public static final Field.Int8 PERMISSION_TYPE = new Field.Int8("permission_type", "The ACL permission type");
public static final Field.Str PRINCIPAL_TYPE = new Field.Str("principal_type", "principalType of the Kafka principal");
public static final Field.Str PRINCIPAL_NAME = new Field.Str("name", "name of the Kafka principal");
}
|
3e0090a07033622d02f24d1e01783ea40d0bf504 | 2,979 | java | Java | dc3-api/dc3-api-device/src/main/java/com/pnoker/api/center/device/feign/DriverClient.java | IoTFinal/iot-dc3 | c4e33f2c54fb8fd076e109eb528d784b4b32ce4e | [
"Apache-2.0"
] | 1 | 2020-02-18T17:30:37.000Z | 2020-02-18T17:30:37.000Z | dc3-api/dc3-api-device/src/main/java/com/pnoker/api/center/device/feign/DriverClient.java | IoTFinal/iot-dc3 | c4e33f2c54fb8fd076e109eb528d784b4b32ce4e | [
"Apache-2.0"
] | null | null | null | dc3-api/dc3-api-device/src/main/java/com/pnoker/api/center/device/feign/DriverClient.java | IoTFinal/iot-dc3 | c4e33f2c54fb8fd076e109eb528d784b4b32ce4e | [
"Apache-2.0"
] | null | null | null | 27.841121 | 143 | 0.684458 | 232 | /*
* Copyright 2019 Pnoker. All Rights Reserved.
*
* 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.pnoker.api.center.device.feign;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pnoker.api.center.device.hystrix.DriverClientHystrix;
import com.pnoker.common.bean.R;
import com.pnoker.common.constant.Common;
import com.pnoker.common.dto.DriverDto;
import com.pnoker.common.model.Dic;
import com.pnoker.common.model.Driver;
import com.pnoker.common.valid.Insert;
import com.pnoker.common.valid.Update;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* <p>驱动 FeignClient
*
* @author pnoker
*/
@FeignClient(path = Common.Service.DC3_DEVICE_DRIVER_URL_PREFIX, name = Common.Service.DC3_DEVICE, fallbackFactory = DriverClientHystrix.class)
public interface DriverClient {
/**
* 新增 Driver 记录
*
* @param driver
* @return Driver
*/
@PostMapping("/add")
R<Driver> add(@Validated(Insert.class) @RequestBody Driver driver);
/**
* 根据 ID 删除 Driver
*
* @param id driverId
* @return Boolean
*/
@PostMapping("/delete/{id}")
R<Boolean> delete(@PathVariable(value = "id") Long id);
/**
* 修改 Driver 记录
*
* @param driver
* @return Driver
*/
@PostMapping("/update")
R<Driver> update(@Validated(Update.class) @RequestBody Driver driver);
/**
* 根据 ID 查询 Driver
*
* @param id
* @return Driver
*/
@GetMapping("/id/{id}")
R<Driver> selectById(@PathVariable(value = "id") Long id);
/**
* 根据 ServiceName 查询 Driver
*
* @param serviceName
* @return Driver
*/
@GetMapping("/service/{serviceName}")
R<Driver> selectByServiceName(@PathVariable(value = "serviceName") String serviceName);
/**
* 分页查询 Driver
*
* @param driverDto
* @return Page<Driver>
*/
@PostMapping("/list")
R<Page<Driver>> list(@RequestBody(required = false) DriverDto driverDto);
/**
* 查询 Driver 字典
*
* @return List<Driver>
*/
@GetMapping("/dictionary")
R<List<Dic>> dictionary();
}
|
3e009239929d8d00aaa2ce409692aa6e17eb2770 | 127 | java | Java | src/io/github/wangyuxiang0829/algorithms/chap11/KeyAlreadyExistException.java | wangyuxiang0829/My-Perspective-on-Algorithms | 4ea0f5a95bd66d6a047cd5dd69b87231ea8c20df | [
"MIT"
] | 1 | 2019-04-14T02:35:37.000Z | 2019-04-14T02:35:37.000Z | src/io/github/wangyuxiang0829/algorithms/chap11/KeyAlreadyExistException.java | wangyuxiang0829/My-Perspective-on-Algorithms | 4ea0f5a95bd66d6a047cd5dd69b87231ea8c20df | [
"MIT"
] | null | null | null | src/io/github/wangyuxiang0829/algorithms/chap11/KeyAlreadyExistException.java | wangyuxiang0829/My-Perspective-on-Algorithms | 4ea0f5a95bd66d6a047cd5dd69b87231ea8c20df | [
"MIT"
] | null | null | null | 21.166667 | 65 | 0.818898 | 233 | package io.github.wangyuxiang0829.algorithms.chap11;
public class KeyAlreadyExistException extends HashMapException {
}
|
3e00933c591f51dc0b37a29aadf28583b71df54e | 1,368 | java | Java | src/main/java/com/baidubce/services/ses/model/IsInRecipientBlacklistRequest.java | ap6108/bce-sdk-java | fcd295fc5b90427e74cb43767bcbcc42a9a8d2e9 | [
"Apache-2.0"
] | 59 | 2015-07-30T08:04:17.000Z | 2022-02-24T01:17:44.000Z | src/main/java/com/baidubce/services/ses/model/IsInRecipientBlacklistRequest.java | ap6108/bce-sdk-java | fcd295fc5b90427e74cb43767bcbcc42a9a8d2e9 | [
"Apache-2.0"
] | 16 | 2017-03-30T06:05:19.000Z | 2022-03-31T20:08:30.000Z | src/main/java/com/baidubce/services/ses/model/IsInRecipientBlacklistRequest.java | ap6108/bce-sdk-java | fcd295fc5b90427e74cb43767bcbcc42a9a8d2e9 | [
"Apache-2.0"
] | 68 | 2015-09-14T04:00:50.000Z | 2022-03-24T12:49:41.000Z | 31.813953 | 118 | 0.716374 | 234 | /*
* Copyright 2014 Baidu, Inc.
*
* 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.baidubce.services.ses.model;
/**
* Request object for check it is in recipient blacklist. This object contains one parameter be set.
*/
public class IsInRecipientBlacklistRequest extends SesRequest {
/**
* The URL of email address, which is to be checked.
*/
private String emailAddress;
public IsInRecipientBlacklistRequest withEmailAddress(String emailAddress) {
setEmailAddress(emailAddress);
return this;
}
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
@Override
public String toString() {
return "IsInRecipientBlacklistRequest [emailAddress=" + emailAddress + "]";
}
}
|
3e009425b32288e4dd599305fb5a0d11188b0e07 | 560 | java | Java | common/src/java/gov/fnal/elab/datacatalog/query/GreaterThan.java | onlineth/quarknet | 64fde220eb0354b82b909ee60d592317250fa192 | [
"BSD-3-Clause"
] | null | null | null | common/src/java/gov/fnal/elab/datacatalog/query/GreaterThan.java | onlineth/quarknet | 64fde220eb0354b82b909ee60d592317250fa192 | [
"BSD-3-Clause"
] | null | null | null | common/src/java/gov/fnal/elab/datacatalog/query/GreaterThan.java | onlineth/quarknet | 64fde220eb0354b82b909ee60d592317250fa192 | [
"BSD-3-Clause"
] | null | null | null | 32.941176 | 72 | 0.528571 | 235 | //----------------------------------------------------------------------
//This code is developed as part of the Java CoG Kit project
//The terms of the license can be found at http://www.cogkit.org/license
//This message may not be removed or altered.
//----------------------------------------------------------------------
/*
* Created on Mar 22, 2007
*/
package gov.fnal.elab.datacatalog.query;
public class GreaterThan extends QueryLeaf {
public GreaterThan(String key, Object value) {
super(QueryElement.TYPES.GT, key, value);
}
}
|
3e009557a31955165ca40dfdb75db7848c2954ee | 498 | java | Java | src/main/java/com/jiading/service/UserService.java | JiaDingCN/MyBBS | 23fa69488890cfc36b9feb102f755c6403925b40 | [
"MIT"
] | 1 | 2020-07-27T01:41:20.000Z | 2020-07-27T01:41:20.000Z | src/main/java/com/jiading/service/UserService.java | JiaDingCN/MyBBS | 23fa69488890cfc36b9feb102f755c6403925b40 | [
"MIT"
] | 4 | 2021-01-24T09:56:08.000Z | 2022-02-27T08:48:06.000Z | src/main/java/com/jiading/service/UserService.java | yishiyu/bbs | e3307fceaa055dc09ffb74c886a214fb7d64f17b | [
"MIT"
] | 1 | 2020-07-23T16:44:58.000Z | 2020-07-23T16:44:58.000Z | 17.172414 | 47 | 0.73494 | 236 | package com.jiading.service;
import com.jiading.model.User;
public interface UserService {
boolean register(User user);
boolean active(String code);
User login(User user);
User findByUserId(int uid);
User findByUsername(String username);
void updateUser(User user);
void likedPostAddOneToUserBean(String pid);
void likedPostSubOneToUserBean(String pid);
void likedUserSubOneToUserBean(String uid);
void likedUserAddOneToUserBean(String uid);
}
|
3e0095cce584d8d475f114e2874da83f86e64fe6 | 111 | java | Java | nacid/src/com/nacid/bl/nomenclatures/BgAcademicRecognitionStatus.java | governmentbg/NACID-DOCTORS-TITLES | 72b79b14af654573e5d23e0048adeac20d06696a | [
"MIT"
] | null | null | null | nacid/src/com/nacid/bl/nomenclatures/BgAcademicRecognitionStatus.java | governmentbg/NACID-DOCTORS-TITLES | 72b79b14af654573e5d23e0048adeac20d06696a | [
"MIT"
] | null | null | null | nacid/src/com/nacid/bl/nomenclatures/BgAcademicRecognitionStatus.java | governmentbg/NACID-DOCTORS-TITLES | 72b79b14af654573e5d23e0048adeac20d06696a | [
"MIT"
] | null | null | null | 18.5 | 70 | 0.855856 | 237 | package com.nacid.bl.nomenclatures;
public interface BgAcademicRecognitionStatus extends FlatNomenclature{
}
|
3e00969584f61034ff43562e7602088373ab85c0 | 5,223 | java | Java | imitationofwechat/src/main/java/adapter/ImageGridAdapter2.java | xiaobao-zhaoyiyang/AllmyTest | 43f54c995d25700842cfc426a221c0ce58c9ceae | [
"Apache-2.0"
] | null | null | null | imitationofwechat/src/main/java/adapter/ImageGridAdapter2.java | xiaobao-zhaoyiyang/AllmyTest | 43f54c995d25700842cfc426a221c0ce58c9ceae | [
"Apache-2.0"
] | null | null | null | imitationofwechat/src/main/java/adapter/ImageGridAdapter2.java | xiaobao-zhaoyiyang/AllmyTest | 43f54c995d25700842cfc426a221c0ce58c9ceae | [
"Apache-2.0"
] | null | null | null | 32.849057 | 92 | 0.546429 | 238 | package adapter;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;
import com.imitationofwechat.R;
import java.util.ArrayList;
import java.util.List;
import chooseImage.ChooseImageActivity;
import common.CommonAdapter;
import common.CommonViewHolder;
import util.ImageLoader;
/**
* Created by lbf on 2016/6/29.
*/
public class ImageGridAdapter2 extends CommonAdapter<String> {
// 普通照片
private static final int TYPE_NORMAL = 1;
// 拍摄新照片
private static final int TYPE_NEW = 2;
private Context context;
private int selectMode;
private ImageLoader loader;
private String currentFolder;
private List<String> imageNameList;
private ArrayList<String> selectedImages;
public ArrayList<String> getSelectedImages() {
return selectedImages;
}
public void setSelectedImages(ArrayList<String> selectedImages) {
this.selectedImages = selectedImages;
}
public interface OnImageTouchListener{
void onImageClick(int position);
void onViewUpdate(int oldSize, int newSize);
}
private OnImageTouchListener listener;
public void setListener(OnImageTouchListener listener) {
this.listener = listener;
}
public ImageGridAdapter2(Context context, List<String> beanList, int selectMode) {
super(context,beanList);
this.context = context;
this.selectMode = selectMode;
setTypeSupport(new MultiItemTypeSupport<String>() {
@Override
public int getLayoutId(int itemType) {
switch (itemType){
case TYPE_NORMAL:
return R.layout.choose_image_item;
case TYPE_NEW:
return R.layout.choose_image_item_new;
}
return 0;
}
@Override
public int getItemType(int position, String bean) {
if(position == 0){
return TYPE_NEW;
}else{
return TYPE_NORMAL;
}
}
});
loader = ImageLoader.getInstance();
imageNameList = beanList;
imageNameList.add(0,"");
selectedImages = new ArrayList<>();
}
public String getCurrentFolder() {
return currentFolder;
}
public void setCurrentFolder(String currentFolder) {
this.currentFolder = currentFolder;
}
@Override
protected void convert(final CommonViewHolder holder, String bean) {
int type = holder.getItemViewType();
if(type == TYPE_NEW) {
holder.setOnClickLisener(R.id.fl_chat_root, new View.OnClickListener() {
@Override
public void onClick(View v) {
if(listener!=null){
listener.onImageClick(0);
}
}
});
}else{
final ImageView image = (ImageView) holder.get(R.id.image);
final ImageView state = (ImageView) holder.get(R.id.state);
final String path = currentFolder + "/" + bean;
image.setImageDrawable(new ColorDrawable(ContextCompat.getColor(
context,R.color.imageDefaultBg)));
image.setOnClickListener( new View.OnClickListener() {
@Override
public void onClick(View v) {
if(listener!=null){
listener.onImageClick(holder.getAdapterPosition());
}
}
});
loader.loadImage(path, image);
if(selectMode == ChooseImageActivity.MODE_SINGLE){
// 如果是单选模式就隐藏多选框直接返回
state.setVisibility(View.GONE);
return;
}
if(selectedImages.contains(path)){
image.setAlpha(0.6f);
state.setSelected(true);
}else{
image.setAlpha(1.0f);
state.setSelected(false);
}
state.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int oldSize = selectedImages.size();
if(!state.isSelected()){
if(selectedImages.size() == 9){
Toast.makeText(context,"你最多只能选择9张图片",Toast.LENGTH_SHORT).show();
return;
}
image.setAlpha(0.6f);
selectedImages.add(path);
state.setSelected(true);
}else{
image.setAlpha(1.0f);
selectedImages.remove(path);
state.setSelected(false);
}
int newSize = selectedImages.size();
if(listener!=null){
listener.onViewUpdate(oldSize,newSize);
}
}
});
}
}
}
|
3e0096cfe969bf96285cb029f43cc7e539ca5118 | 1,597 | java | Java | caAERS/software/core/src/test/java/gov/nih/nci/cabig/caaers/rules/business/service/ReportDefinitionComparatorTest.java | colorshifter/caaers | 7115fdcf5cb326f7ee906679e2e36ff3530c4c9b | [
"BSD-3-Clause"
] | null | null | null | caAERS/software/core/src/test/java/gov/nih/nci/cabig/caaers/rules/business/service/ReportDefinitionComparatorTest.java | colorshifter/caaers | 7115fdcf5cb326f7ee906679e2e36ff3530c4c9b | [
"BSD-3-Clause"
] | 5 | 2020-11-16T20:45:46.000Z | 2022-02-01T01:03:15.000Z | caAERS/software/core/src/test/java/gov/nih/nci/cabig/caaers/rules/business/service/ReportDefinitionComparatorTest.java | colorshifter/caaers | 7115fdcf5cb326f7ee906679e2e36ff3530c4c9b | [
"BSD-3-Clause"
] | null | null | null | 34.717391 | 80 | 0.686287 | 239 | /*******************************************************************************
* Copyright SemanticBits, Northwestern University and Akaza Research
*
* Distributed under the OSI-approved BSD 3-Clause License.
* See http://ncip.github.com/caaers/LICENSE.txt for details.
******************************************************************************/
package gov.nih.nci.cabig.caaers.rules.business.service;
import gov.nih.nci.cabig.caaers.domain.ConfigProperty;
import gov.nih.nci.cabig.caaers.domain.Fixtures;
import gov.nih.nci.cabig.caaers.domain.Organization;
import gov.nih.nci.cabig.caaers.domain.report.ReportDefinition;
import gov.nih.nci.cabig.caaers.domain.report.TimeScaleUnit;
import junit.framework.TestCase;
public class ReportDefinitionComparatorTest extends TestCase {
protected void setUp() throws Exception {
super.setUp();
}
public void testCompare() {
Organization org1 = Fixtures.createOrganization("org1", "org1");
org1.setId(1);
ConfigProperty cp1 = Fixtures.createConfigProperty("cp1");
ReportDefinition rd1 = Fixtures.createReportDefinition("rd1", org1, cp1);
rd1.setTimeScaleUnitType(TimeScaleUnit.DAY);
rd1.setDuration(4);
ReportDefinition rd2 = Fixtures.createReportDefinition("rd2", org1, cp1);
rd2.setTimeScaleUnitType(TimeScaleUnit.HOUR);
rd2.setDuration(24);
ReportDefinitionComparator comparator = new ReportDefinitionComparator();
int i = comparator.compare(rd1, rd2);
assertTrue(i < 0);
i = comparator.compare(rd2, rd1);
assertTrue(i > 0);
i = comparator.compare(rd1, rd1);
assertEquals(0, i);
}
}
|
3e00975fd78a18deb4153662ad5f3c7c15e8260a | 928 | java | Java | app/src/main/java/com/artemzin/qualitymatters/models/ItemsModel.java | ouyangpeng/qualitymatters | 97e3d568d7e4a5772a768ee0a82f9d9498943441 | [
"Apache-2.0"
] | 1,974 | 2015-12-02T18:54:03.000Z | 2021-12-23T10:19:57.000Z | app/src/main/java/com/artemzin/qualitymatters/models/ItemsModel.java | weiqiangzheng/qualitymatters | 47e484b691da83e66d7446be6344e8966d64f784 | [
"Apache-2.0"
] | 198 | 2015-12-02T01:34:26.000Z | 2022-03-23T10:35:11.000Z | app/src/main/java/com/artemzin/qualitymatters/models/ItemsModel.java | weiqiangzheng/qualitymatters | 47e484b691da83e66d7446be6344e8966d64f784 | [
"Apache-2.0"
] | 299 | 2015-12-03T00:05:01.000Z | 2022-03-09T23:02:49.000Z | 29 | 110 | 0.752155 | 240 | package com.artemzin.qualitymatters.models;
import android.support.annotation.NonNull;
import com.artemzin.qualitymatters.api.QualityMattersRestApi;
import com.artemzin.qualitymatters.api.entities.Item;
import java.util.List;
import rx.Single;
/**
* Model is not an entity. It's a container for business logic code. M(VC), M(VP), M(VVM).
* <p>
* Why create Model classes? Such classes hide complex logic required to fetch/cache/process/etc data.
* So Presentation layer won't know the details of implementation and each class will do only one job (SOLID).
*/
public class ItemsModel {
@NonNull
private final QualityMattersRestApi qualityMattersRestApi;
public ItemsModel(@NonNull QualityMattersRestApi qualityMattersRestApi) {
this.qualityMattersRestApi = qualityMattersRestApi;
}
@NonNull
public Single<List<Item>> getItems() {
return qualityMattersRestApi.items();
}
}
|
3e0097e69f8dd956db82bf5e339fa451971e13d4 | 1,068 | java | Java | src/test/java/com/SzTouYun/advertisingsystem/UserTest.java | chenhaujing/advertisingsystem | 7871c89a604bc64045664be0760d7f14639a2439 | [
"Apache-2.0"
] | null | null | null | src/test/java/com/SzTouYun/advertisingsystem/UserTest.java | chenhaujing/advertisingsystem | 7871c89a604bc64045664be0760d7f14639a2439 | [
"Apache-2.0"
] | 1 | 2022-02-10T13:44:41.000Z | 2022-02-10T13:44:41.000Z | src/test/java/com/SzTouYun/advertisingsystem/UserTest.java | chenhaujing/advertisingsystem | 7871c89a604bc64045664be0760d7f14639a2439 | [
"Apache-2.0"
] | null | null | null | 31.411765 | 72 | 0.814607 | 241 | package com.SzTouYun.advertisingsystem;
import com.sztouyun.advertisingsystem.AdvertisingSystemApplication;
import com.sztouyun.advertisingsystem.config.PreviewConfig;
import com.sztouyun.advertisingsystem.repository.account.UserRepository;
import com.sztouyun.advertisingsystem.service.account.UserService;
import com.sztouyun.advertisingsystem.service.file.IFileService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* Created by wenfeng on 2017/7/19.
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = AdvertisingSystemApplication.class)
public class UserTest {
@Autowired
private UserRepository userRepository;
@Autowired
private UserService userService;
@Autowired
private IFileService fileServiceImpl;
@Autowired
private PreviewConfig previewConfig;
@Test
public void userTest(){
}
}
|
3e0098045b4c7261b56b26fba883cccd16ead661 | 7,205 | java | Java | xchange-btcchina/src/test/java/com/xeiam/xchange/btcchina/BTCChinaAdaptersTest.java | GeopaymeEE/XChange | e27db5733fdaffd52f4d6aa37de7d48b9befaeae | [
"MIT"
] | 11 | 2015-07-19T00:56:14.000Z | 2021-05-21T20:31:44.000Z | xchange-btcchina/src/test/java/com/xeiam/xchange/btcchina/BTCChinaAdaptersTest.java | Alagert/XChange | 277dc102c373a3eec13d25fa7123d3392ebda9d3 | [
"MIT"
] | null | null | null | xchange-btcchina/src/test/java/com/xeiam/xchange/btcchina/BTCChinaAdaptersTest.java | Alagert/XChange | 277dc102c373a3eec13d25fa7123d3392ebda9d3 | [
"MIT"
] | 5 | 2015-03-13T07:13:35.000Z | 2020-06-22T03:36:22.000Z | 44.475309 | 176 | 0.747398 | 242 | package com.xeiam.xchange.btcchina;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import org.junit.Test;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.xeiam.xchange.btcchina.dto.marketdata.BTCChinaDepth;
import com.xeiam.xchange.btcchina.dto.marketdata.BTCChinaTicker;
import com.xeiam.xchange.btcchina.dto.trade.BTCChinaOrderStatus;
import com.xeiam.xchange.btcchina.dto.trade.BTCChinaTransaction;
import com.xeiam.xchange.btcchina.dto.trade.response.BTCChinaGetMarketDepthResponse;
import com.xeiam.xchange.btcchina.dto.trade.response.BTCChinaGetOrdersResponse;
import com.xeiam.xchange.currency.CurrencyPair;
import com.xeiam.xchange.dto.Order.OrderType;
import com.xeiam.xchange.dto.marketdata.OrderBook;
import com.xeiam.xchange.dto.marketdata.Ticker;
import com.xeiam.xchange.dto.marketdata.Trade;
import com.xeiam.xchange.dto.trade.LimitOrder;
public class BTCChinaAdaptersTest {
private final ObjectMapper mapper = new ObjectMapper();
@Test
public void testAdaptTickers() throws IOException {
BTCChinaTicker btcChinaTicker = mapper.readValue(getClass().getResource("dto/marketdata/ticker-all-market.json"), BTCChinaTicker.class);
Map<CurrencyPair, Ticker> tickers = BTCChinaAdapters.adaptTickers(btcChinaTicker);
assertEquals(3, tickers.size());
assertEquals(new HashSet<CurrencyPair>(Arrays.asList(CurrencyPair.BTC_CNY, CurrencyPair.LTC_CNY, CurrencyPair.LTC_BTC)), tickers.keySet());
Ticker btccny = tickers.get(CurrencyPair.BTC_CNY);
assertEquals(new BigDecimal("2894.97"), btccny.getHigh());
assertEquals(new BigDecimal("2850.08"), btccny.getLow());
assertEquals(new BigDecimal("2880.00"), btccny.getBid());
assertEquals(new BigDecimal("2883.86"), btccny.getAsk());
assertEquals(new BigDecimal("2880.00"), btccny.getLast());
assertEquals(new BigDecimal("4164.41040000"), btccny.getVolume());
assertEquals(1396412841000L, btccny.getTimestamp().getTime());
}
@Test
public void testAdaptTransaction() {
BTCChinaTransaction btcChinaTransaction = new BTCChinaTransaction(12158242, // id
"sellbtc", // type
new BigDecimal("-0.37460000"), // btc_amount
new BigDecimal("0.00000000"), // ltc_amount
new BigDecimal("1420.09151800"), // cny_amount
1402922707L, // id
"btccny" // market
);
Trade trade = BTCChinaAdapters.adaptTransaction(btcChinaTransaction);
assertEquals(OrderType.ASK, trade.getType());
assertEquals(new BigDecimal("0.37460000"), trade.getTradableAmount());
assertEquals(CurrencyPair.BTC_CNY, trade.getCurrencyPair());
assertEquals(new BigDecimal("3790.95"), trade.getPrice());
assertEquals(1402922707000L, trade.getTimestamp().getTime());
assertEquals("12158242", trade.getId());
}
@Test
public void testAdaptOrderBookBTCChinaDepth() throws IOException {
BTCChinaDepth btcChinaDepth = mapper.readValue(getClass().getResource("/marketdata/example-depth-data.json"), BTCChinaDepth.class);
OrderBook orderBook = BTCChinaAdapters.adaptOrderBook(btcChinaDepth, CurrencyPair.BTC_CNY);
List<LimitOrder> bids = orderBook.getBids();
List<LimitOrder> asks = orderBook.getAsks();
// bid 4.51@544.83
assertEquals(new BigDecimal("544.83"), bids.get(0).getLimitPrice());
assertEquals(new BigDecimal("4.51"), bids.get(0).getTradableAmount());
// bid 4.19@543.38
assertEquals(new BigDecimal("543.38"), bids.get(1).getLimitPrice());
assertEquals(new BigDecimal("4.19"), bids.get(1).getTradableAmount());
// ask 49.234@546
assertEquals(new BigDecimal("546"), asks.get(0).getLimitPrice());
assertEquals(new BigDecimal("49.234"), asks.get(0).getTradableAmount());
// ask 10.934@547
assertEquals(new BigDecimal("547"), asks.get(1).getLimitPrice());
assertEquals(new BigDecimal("10.934"), asks.get(1).getTradableAmount());
}
@Test
public void testAdaptOrderBook() throws IOException {
BTCChinaGetMarketDepthResponse response = mapper.readValue(getClass().getResourceAsStream("dto/trade/response/getMarketDepth2.json"), BTCChinaGetMarketDepthResponse.class);
OrderBook orderBook = BTCChinaAdapters.adaptOrderBook(response.getResult().getMarketDepth(), CurrencyPair.BTC_CNY);
List<LimitOrder> bids = orderBook.getBids();
List<LimitOrder> asks = orderBook.getAsks();
assertEquals(2, bids.size());
assertEquals(2, asks.size());
// bid 1@99
assertEquals(new BigDecimal("99"), bids.get(0).getLimitPrice());
assertEquals(new BigDecimal("1"), bids.get(0).getTradableAmount());
assertEquals(CurrencyPair.BTC_CNY, bids.get(0).getCurrencyPair());
assertEquals(OrderType.BID, bids.get(0).getType());
// bid 2@98
assertEquals(new BigDecimal("98"), bids.get(1).getLimitPrice());
assertEquals(new BigDecimal("2"), bids.get(1).getTradableAmount());
assertEquals(CurrencyPair.BTC_CNY, bids.get(1).getCurrencyPair());
assertEquals(OrderType.BID, bids.get(1).getType());
// ask 0.997@100
assertEquals(new BigDecimal("100"), asks.get(0).getLimitPrice());
assertEquals(new BigDecimal("0.997"), asks.get(0).getTradableAmount());
assertEquals(CurrencyPair.BTC_CNY, asks.get(0).getCurrencyPair());
assertEquals(OrderType.ASK, asks.get(0).getType());
// ask 2@101
assertEquals(new BigDecimal("101"), asks.get(1).getLimitPrice());
assertEquals(new BigDecimal("2"), asks.get(1).getTradableAmount());
assertEquals(CurrencyPair.BTC_CNY, asks.get(1).getCurrencyPair());
assertEquals(OrderType.ASK, asks.get(1).getType());
assertEquals(1407060232000L, orderBook.getTimeStamp().getTime());
}
@Test
public void testAdaptOrders() throws IOException {
BTCChinaGetOrdersResponse response = mapper.readValue(getClass().getResource("dto/trade/response/getOrders-single-market-2-orders.json"), BTCChinaGetOrdersResponse.class);
List<LimitOrder> limitOrders = BTCChinaAdapters.adaptOrders(response.getResult(), null);
assertEquals(2, limitOrders.size());
LimitOrder order = limitOrders.get(0);
assertEquals("13942927", order.getId());
assertEquals(OrderType.BID, order.getType());
assertEquals(new BigDecimal("2000.00"), order.getLimitPrice());
assertEquals(CurrencyPair.BTC_CNY, order.getCurrencyPair());
assertEquals(new BigDecimal("0.00100000"), order.getTradableAmount());
assertEquals(1396255376000L, order.getTimestamp().getTime());
}
@Test
public void testAdaptOrderStatus() {
assertEquals(BTCChinaOrderStatus.OPEN, BTCChinaAdapters.adaptOrderStatus("open"));
assertEquals(BTCChinaOrderStatus.CLOSED, BTCChinaAdapters.adaptOrderStatus("closed"));
assertEquals(BTCChinaOrderStatus.CANCELLED, BTCChinaAdapters.adaptOrderStatus("cancelled"));
assertEquals(BTCChinaOrderStatus.PENDING, BTCChinaAdapters.adaptOrderStatus("pending"));
assertEquals(BTCChinaOrderStatus.ERROR, BTCChinaAdapters.adaptOrderStatus("error"));
assertEquals(BTCChinaOrderStatus.INSUFFICIENT_BALANCE, BTCChinaAdapters.adaptOrderStatus("insufficient_balance"));
}
}
|
3e0098737f2f31f9d56fb9d8fd66edea03c49035 | 330 | java | Java | TeamCode/src/main/java/com/lincolnrobotics/api2018/BasicMotorPowerControl.java | sameer-s/lincolnapi | cc9d50eb2b8f255dbf55a24f7d627d792eb7af8e | [
"MIT"
] | null | null | null | TeamCode/src/main/java/com/lincolnrobotics/api2018/BasicMotorPowerControl.java | sameer-s/lincolnapi | cc9d50eb2b8f255dbf55a24f7d627d792eb7af8e | [
"MIT"
] | null | null | null | TeamCode/src/main/java/com/lincolnrobotics/api2018/BasicMotorPowerControl.java | sameer-s/lincolnapi | cc9d50eb2b8f255dbf55a24f7d627d792eb7af8e | [
"MIT"
] | null | null | null | 22 | 78 | 0.745455 | 243 | package com.lincolnrobotics.api2018;
/**
* {@inheritDoc}
* This implementation simply returns the target power provided.
*/
public class BasicMotorPowerControl implements MotorPowerControl
{
@Override
public double calculateMotorPower(double currentPower, double targetPower)
{
return targetPower;
}
}
|
3e0098e7fc0a7100f616b77de9023afff37f1491 | 383 | java | Java | app/src/main/java/com/example/carweather/gson/Weather.java | luhui666/CarWeather | 50203b3551803e43c440aeadd5c119bb23685b25 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/example/carweather/gson/Weather.java | luhui666/CarWeather | 50203b3551803e43c440aeadd5c119bb23685b25 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/example/carweather/gson/Weather.java | luhui666/CarWeather | 50203b3551803e43c440aeadd5c119bb23685b25 | [
"Apache-2.0"
] | null | null | null | 19.15 | 50 | 0.715405 | 244 | package com.example.carweather.gson;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* Created by 芦荟 on 2017/10/21.
*/
public class Weather {
public String status;
public Basic basic;
public AQI aqi;
public Now now;
public Suggestion suggestion;
@SerializedName("daily_forecast")
public List<Forecast> forecastList;
}
|
3e00993a3b38bfa3090e6c986b7dbb780158e038 | 1,991 | java | Java | src/main/java/be/seeseemelk/mockbukkit/tags/TagWrapperMock.java | syldium/MockBukkit | 99821e8e97e2ee54288308a00d6f3cd575ea12c1 | [
"MIT"
] | 227 | 2017-12-11T22:12:58.000Z | 2021-12-31T20:59:12.000Z | src/main/java/be/seeseemelk/mockbukkit/tags/TagWrapperMock.java | syldium/MockBukkit | 99821e8e97e2ee54288308a00d6f3cd575ea12c1 | [
"MIT"
] | 116 | 2017-12-18T17:55:12.000Z | 2021-05-05T06:40:12.000Z | src/main/java/be/seeseemelk/mockbukkit/tags/TagWrapperMock.java | syldium/MockBukkit | 99821e8e97e2ee54288308a00d6f3cd575ea12c1 | [
"MIT"
] | 88 | 2017-12-16T19:44:37.000Z | 2021-11-21T03:32:15.000Z | 18.1 | 82 | 0.697137 | 245 | package be.seeseemelk.mockbukkit.tags;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.Tag;
import org.jetbrains.annotations.NotNull;
/**
* This is a mock of the {@link Material} {@link Tag} wrapper in Bukkit. This will
*
* @author TheBusyBiscuit
*
* @see TagParser
*
*/
public class TagWrapperMock implements Tag<Material>
{
private final TagRegistry registry;
private final NamespacedKey key;
private final Set<Material> materials = new HashSet<>();
private final Set<TagWrapperMock> additionalTags = new HashSet<>();
public TagWrapperMock(@NotNull TagRegistry registry, @NotNull NamespacedKey key)
{
this.registry = registry;
this.key = key;
}
@NotNull
@Override
public NamespacedKey getKey()
{
return key;
}
@NotNull
public TagRegistry getRegistry()
{
return registry;
}
public void reload() throws TagMisconfigurationException
{
this.materials.clear();
this.additionalTags.clear();
new TagParser(this).parse((mats, tags) ->
{
this.materials.addAll(mats);
this.additionalTags.addAll(tags);
});
}
@Override
public boolean isTagged(@NotNull Material item)
{
if (materials.contains(item))
{
return true;
}
else
{
// Check if any of our additional Tags contain this Materials
for (Tag<Material> tag : additionalTags)
{
if (tag.isTagged(item))
{
return true;
}
}
// Now we can be sure it isn't tagged in any way
return false;
}
}
@NotNull
@Override
public Set<Material> getValues()
{
if (additionalTags.isEmpty())
{
return Collections.unmodifiableSet(materials);
}
else
{
Set<Material> mats = new HashSet<>(materials);
for (Tag<Material> tag : additionalTags)
{
mats.addAll(tag.getValues());
}
return mats;
}
}
@NotNull
public Set<TagWrapperMock> getSubTags()
{
return Collections.unmodifiableSet(additionalTags);
}
}
|
3e0099a126bf995fedef156e66013fb280942e52 | 9,616 | java | Java | core/src/main/java/org/apache/cxf/configuration/jsse/TLSClientParameters.java | keep-sunshine/cxf | 039e1dec778efffd6af4523f88d8638732afb637 | [
"Apache-2.0"
] | 839 | 2015-01-01T15:33:21.000Z | 2022-03-31T02:40:34.000Z | core/src/main/java/org/apache/cxf/configuration/jsse/TLSClientParameters.java | keep-sunshine/cxf | 039e1dec778efffd6af4523f88d8638732afb637 | [
"Apache-2.0"
] | 399 | 2015-01-07T19:59:38.000Z | 2022-03-30T21:56:27.000Z | core/src/main/java/org/apache/cxf/configuration/jsse/TLSClientParameters.java | keep-sunshine/cxf | 039e1dec778efffd6af4523f88d8638732afb637 | [
"Apache-2.0"
] | 1,581 | 2015-01-01T02:22:05.000Z | 2022-03-31T13:29:27.000Z | 37.127413 | 116 | 0.643719 | 246 | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 org.apache.cxf.configuration.jsse;
import java.util.List;
import java.util.Objects;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
/**
* This class extends {@link TLSParameterBase} with client-specific
* SSL/TLS parameters.
*
*/
public class TLSClientParameters extends TLSParameterBase {
private boolean disableCNCheck;
private SSLSocketFactory sslSocketFactory;
private int sslCacheTimeout = 86400;
private boolean useHttpsURLConnectionDefaultSslSocketFactory;
private boolean useHttpsURLConnectionDefaultHostnameVerifier;
private HostnameVerifier hostnameVerifier;
private SSLContext sslContext;
/**
* Set custom HostnameVerifier
* @param verifier hostname verifier
*/
public void setHostnameVerifier(HostnameVerifier verifier) {
hostnameVerifier = verifier;
}
/**
* Get custom HostnameVerifier
* @return hostname verifier
*/
public HostnameVerifier getHostnameVerifier() {
return hostnameVerifier;
}
/**
* Set whether or not JSEE should omit checking if the host name
* specified in the URL matches that of the Common Name
* (CN) on the server's certificate. Default is false;
* this attribute should not be set to true during production use.
*/
public void setDisableCNCheck(boolean disableCNCheck) {
this.disableCNCheck = disableCNCheck;
}
/**
* Returns whether or not JSSE omits checking if the
* host name specified in the URL matches that of the Common Name
* (CN) on the server's certificate.
*/
public boolean isDisableCNCheck() {
return disableCNCheck;
}
/**
* This sets the SSLSocketFactory to use, causing all other properties of
* this bean (and its superclass) to get ignored (this takes precendence).
*/
public final void setSSLSocketFactory(SSLSocketFactory factory) {
sslSocketFactory = factory;
}
/**
* Returns the SSLSocketFactory to be used, or null if none has been set.
*/
public final SSLSocketFactory getSSLSocketFactory() {
return sslSocketFactory;
}
/**
* Returns the SSL cache timeout in seconds if it has been configured or the default value
*/
public int getSslCacheTimeout() {
return sslCacheTimeout;
}
/**
* This sets the SSL Session Cache timeout value in seconds for client sessions handled by CXF
*/
public void setSslCacheTimeout(int sslCacheTimeout) {
this.sslCacheTimeout = sslCacheTimeout;
}
/**
* Returns whether or not {@link javax.net.ssl.HttpsURLConnection#getDefaultSSLSocketFactory()} should be
* used to create https connections. If <code>true</code> , {@link #getJsseProvider()} ,
* {@link #getSecureSocketProtocol()}, {@link #getTrustManagers()}, {@link #getKeyManagers()},
* {@link #getSecureRandom()}, {@link #getCipherSuites()} and {@link #getCipherSuitesFilter()} are
* ignored.
*/
public boolean isUseHttpsURLConnectionDefaultSslSocketFactory() {
return useHttpsURLConnectionDefaultSslSocketFactory;
}
/**
* Sets whether or not {@link javax.net.ssl.HttpsURLConnection#getDefaultSSLSocketFactory()} should be
* used to create https connections.
*
* @see #isUseHttpsURLConnectionDefaultSslSocketFactory()
*/
public void setUseHttpsURLConnectionDefaultSslSocketFactory(
boolean useHttpsURLConnectionDefaultSslSocketFactory) {
this.useHttpsURLConnectionDefaultSslSocketFactory = useHttpsURLConnectionDefaultSslSocketFactory;
}
/**
* Returns whether or not {@link javax.net.ssl.HttpsURLConnection#getDefaultHostnameVerifier()} should be
* used to create https connections. If <code>true</code>, {@link #isDisableCNCheck()} is ignored.
*/
public boolean isUseHttpsURLConnectionDefaultHostnameVerifier() {
return useHttpsURLConnectionDefaultHostnameVerifier;
}
/**
* Sets whether or not {@link javax.net.ssl.HttpsURLConnection#getDefaultHostnameVerifier()} should be
* used to create https connections.
*
* @see #isUseHttpsURLConnectionDefaultHostnameVerifier()
*/
public void setUseHttpsURLConnectionDefaultHostnameVerifier(
boolean useHttpsURLConnectionDefaultHostnameVerifier) {
this.useHttpsURLConnectionDefaultHostnameVerifier = useHttpsURLConnectionDefaultHostnameVerifier;
}
public int hashCode() {
int hash = disableCNCheck ? 37 : 17;
if (sslSocketFactory != null) {
hash = hash * 41 + System.identityHashCode(sslSocketFactory);
}
if (sslContext != null) {
hash = hash * 41 + System.identityHashCode(sslContext);
}
hash = hash(hash, useHttpsURLConnectionDefaultSslSocketFactory);
hash = hash(hash, useHttpsURLConnectionDefaultHostnameVerifier);
hash = hash(hash, sslCacheTimeout);
hash = hash(hash, secureRandom);
hash = hash(hash, protocol);
hash = hash(hash, certAlias);
hash = hash(hash, provider);
for (String cs : ciphersuites) {
hash = hash(hash, cs);
}
hash = hash(hash, keyManagers);
hash = hash(hash, trustManagers);
if (cipherSuiteFilters != null) {
hash = hash(hash, cipherSuiteFilters.getInclude());
hash = hash(hash, cipherSuiteFilters.getExclude());
}
if (certConstraints != null) {
hash = hash(hash, certConstraints.getIssuerDNConstraints());
hash = hash(hash, certConstraints.getSubjectDNConstraints());
}
return hash;
}
private int hash(int i, Object o) {
if (o != null) {
return i * 37 + o.hashCode();
}
return i;
}
private int hash(int i, Object[] os) {
if (os == null) {
return i;
}
for (Object o : os) {
i = hash(i, o);
}
return i;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof TLSClientParameters) {
TLSClientParameters that = (TLSClientParameters)o;
boolean eq = disableCNCheck == that.disableCNCheck;
eq &= sslSocketFactory == that.sslSocketFactory;
eq &= sslContext == that.sslContext;
eq &= useHttpsURLConnectionDefaultSslSocketFactory == that.useHttpsURLConnectionDefaultSslSocketFactory;
eq &= useHttpsURLConnectionDefaultHostnameVerifier == that.useHttpsURLConnectionDefaultHostnameVerifier;
eq &= sslCacheTimeout == that.sslCacheTimeout;
eq &= secureRandom == that.secureRandom;
eq &= Objects.equals(certAlias, that.certAlias);
eq &= Objects.equals(protocol, that.protocol);
eq &= Objects.equals(provider, that.provider);
eq &= equals(ciphersuites, that.ciphersuites);
eq &= Objects.deepEquals(keyManagers, that.keyManagers);
eq &= Objects.deepEquals(trustManagers, that.trustManagers);
if (cipherSuiteFilters != null) {
if (that.cipherSuiteFilters != null) {
eq &= equals(cipherSuiteFilters.getExclude(), that.cipherSuiteFilters.getExclude());
eq &= equals(cipherSuiteFilters.getInclude(), that.cipherSuiteFilters.getInclude());
} else {
eq = false;
}
} else {
eq &= that.cipherSuiteFilters == null;
}
if (certConstraints != null) {
if (that.certConstraints != null) {
eq &= Objects.equals(certConstraints.getIssuerDNConstraints(),
that.certConstraints.getIssuerDNConstraints());
eq &= Objects.equals(certConstraints.getSubjectDNConstraints(),
that.certConstraints.getSubjectDNConstraints());
} else {
eq = false;
}
} else {
eq &= that.certConstraints == null;
}
return eq;
}
return false;
}
private static boolean equals(final List<?> obj1, final List<?> obj2) {
return obj1.equals(obj2);
}
/**
* Get the SSLContext parameter to use (if it has been set)
*/
public SSLContext getSslContext() {
return sslContext;
}
/**
* Set an SSLContext parameter to use to create https connections
*/
public void setSslContext(SSLContext sslContext) {
this.sslContext = sslContext;
}
}
|
3e0099e907cd2a6d897b944d5e752353c40a1b9e | 8,252 | java | Java | java-demo/src/main/java/zlc/season/rxdownload/java_demo/DownloadListActivity.java | newPersonKing/RxDownload-master | 77cae69a0152e57f51537159856e77b0605b6bab | [
"Apache-2.0"
] | 3 | 2019-08-29T22:48:50.000Z | 2019-08-30T21:45:51.000Z | java-demo/src/main/java/zlc/season/rxdownload/java_demo/DownloadListActivity.java | hcg2011/RxDownload | f99b9904e1e08f4711ecc23231cf70ae54bf0716 | [
"Apache-2.0"
] | null | null | null | java-demo/src/main/java/zlc/season/rxdownload/java_demo/DownloadListActivity.java | hcg2011/RxDownload | f99b9904e1e08f4711ecc23231cf70ae54bf0716 | [
"Apache-2.0"
] | 1 | 2021-12-17T10:10:08.000Z | 2021-12-17T10:10:08.000Z | 35.114894 | 137 | 0.601309 | 247 | package zlc.season.rxdownload.java_demo;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import zlc.season.rxdownload.java_demo.databinding.ActivityDownloadListBinding;
import zlc.season.rxdownload.java_demo.databinding.ViewHolderDownloadItemBinding;
import zlc.season.rxdownload3.RxDownload;
import zlc.season.rxdownload3.core.Downloading;
import zlc.season.rxdownload3.core.Failed;
import zlc.season.rxdownload3.core.Mission;
import zlc.season.rxdownload3.core.Normal;
import zlc.season.rxdownload3.core.Status;
import zlc.season.rxdownload3.core.Succeed;
import zlc.season.rxdownload3.core.Suspend;
import zlc.season.rxdownload3.core.Waiting;
import zlc.season.rxdownload3.extension.ApkInstallExtension;
import zlc.season.rxdownload3.extension.ApkOpenExtension;
import zlc.season.rxdownload3.helper.UtilsKt;
public class DownloadListActivity extends AppCompatActivity {
private ActivityDownloadListBinding mainBinding;
private Adapter adapter;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mainBinding = DataBindingUtil.setContentView(this, R.layout.activity_download_list);
adapter = new Adapter();
mainBinding.recyclerView.setLayoutManager(new LinearLayoutManager(this));
mainBinding.recyclerView.setAdapter(adapter);
mainBinding.startAll.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RxDownload.INSTANCE.startAll().subscribe();
}
});
mainBinding.stopAll.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RxDownload.INSTANCE.stopAll().subscribe();
}
});
mainBinding.deleteAll.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RxDownload.INSTANCE.deleteAll(false)
.subscribe(new Consumer<Object>() {
@Override
public void accept(Object o) throws Exception {
loadData();
}
});
}
});
loadData();
}
private void loadData() {
RxDownload.INSTANCE.getAllMission()
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<List<Mission>>() {
@Override
public void accept(List<Mission> missions) throws Exception {
adapter.addData(missions);
}
});
}
static class Adapter extends RecyclerView.Adapter<ViewHolder> {
private List<Mission> data = new ArrayList<>();
public void addData(List<Mission> data) {
this.data.clear();
this.data.addAll(data);
notifyDataSetChanged();
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
ViewHolderDownloadItemBinding binding = DataBindingUtil.inflate(inflater, R.layout.view_holder_download_item, parent, false);
return new ViewHolder(binding.getRoot());
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
holder.setData((CustomMission) data.get(position));
}
@Override
public int getItemCount() {
return data.size();
}
@Override
public void onViewAttachedToWindow(ViewHolder holder) {
super.onViewAttachedToWindow(holder);
holder.onAttach();
}
@Override
public void onViewDetachedFromWindow(ViewHolder holder) {
super.onViewDetachedFromWindow(holder);
holder.onDetach();
}
}
static class ViewHolder extends RecyclerView.ViewHolder {
private CustomMission customMission;
private Disposable disposable;
private Status currentStatus;
private ViewHolderDownloadItemBinding binding;
public ViewHolder(View itemView) {
super(itemView);
binding = DataBindingUtil.bind(itemView);
binding.action.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dispatchClick();
}
});
}
private void dispatchClick() {
if (currentStatus instanceof Normal) {
start();
} else if (currentStatus instanceof Suspend) {
start();
} else if (currentStatus instanceof Failed) {
start();
} else if (currentStatus instanceof Downloading) {
stop();
} else if (currentStatus instanceof Succeed) {
install();
} else if (currentStatus instanceof ApkInstallExtension.Installed) {
open();
}
}
public void setData(CustomMission customMission) {
this.customMission = customMission;
Picasso.with(itemView.getContext()).load(customMission.getImg()).into(binding.icon);
}
public void onAttach() {
disposable = RxDownload.INSTANCE.create(customMission, false)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<Status>() {
@Override
public void accept(Status status) throws Exception {
currentStatus = status;
setProgress(status);
setActionText(status);
}
});
}
private void setProgress(Status status) {
binding.progressBar.setMax((int) status.getTotalSize());
binding.progressBar.setProgress((int) status.getDownloadSize());
binding.percent.setText(status.percent());
binding.size.setText(status.formatString());
}
private void setActionText(Status status) {
String text = "";
if (status instanceof Normal) {
text = "开始";
} else if (status instanceof Suspend) {
text = "已暂停";
} else if (status instanceof Waiting) {
text = "等待中";
} else if (status instanceof Downloading) {
text = "暂停";
} else if (status instanceof Failed) {
text = "失败";
} else if (status instanceof Succeed) {
text = "安装";
} else if (status instanceof ApkInstallExtension.Installing) {
text = "安装中";
} else if (status instanceof ApkInstallExtension.Installed) {
text = "打开";
}
binding.action.setText(text);
}
public void onDetach() {
UtilsKt.dispose(disposable);
}
private void start() {
RxDownload.INSTANCE.start(customMission).subscribe();
}
private void stop() {
RxDownload.INSTANCE.stop(customMission).subscribe();
}
private void install() {
RxDownload.INSTANCE.extension(customMission, ApkInstallExtension.class).subscribe();
}
private void open() {
RxDownload.INSTANCE.extension(customMission, ApkOpenExtension.class).subscribe();
}
}
}
|
3e009a90c3a5b08a9e0f60d95a0a222db5e61cc0 | 3,944 | java | Java | dd4t-api/src/main/java/org/dd4t/providers/QueryProvider.java | RaimondKempees/dd4t-2-java | 67a2f73cac29f97ee4f40651e3325f433cd13529 | [
"OLDAP-2.4"
] | 14 | 2015-05-21T10:01:56.000Z | 2018-04-08T09:31:21.000Z | dd4t-api/src/main/java/org/dd4t/providers/QueryProvider.java | RaimondKempees/dd4t-2-java | 67a2f73cac29f97ee4f40651e3325f433cd13529 | [
"OLDAP-2.4"
] | 105 | 2015-08-13T09:02:41.000Z | 2022-03-31T19:17:12.000Z | dd4t-api/src/main/java/org/dd4t/providers/QueryProvider.java | RaimondKempees/dd4t-2-java | 67a2f73cac29f97ee4f40651e3325f433cd13529 | [
"OLDAP-2.4"
] | 24 | 2015-08-11T13:40:35.000Z | 2021-01-21T12:31:38.000Z | 42.408602 | 112 | 0.725406 | 248 | /*
* Copyright (c) 2015 SDL, Radagio & R. Oudshoorn
*
* 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 org.dd4t.providers;
import org.dd4t.core.exceptions.ItemNotFoundException;
import org.dd4t.core.exceptions.SerializationException;
import java.util.Collection;
import java.util.Map;
/**
* QueryProvider. Interface for doing Broker look ups.
* Currently provides only the basic stuff.
*
*
* @author R. Kempees
*/
public interface QueryProvider {
/**
* Retrieves content of a Dynamic Component Presentation by looking up its locale and keyValueMap
* The returned content can for instance represent multiple Component Strings separated by |.
*
* The KeyValueMap can hold 0 or more CUSTOM_META criteria
*
* @param locale String representing the locale to be queried, for e.g.: en_gb
* @param keyValueMap A Map representing the Key Value pairs to insert as Meta Filters
* @return String representing the content of the CP (s)
* @throws ItemNotFoundException if the requested CP does not exist
* @throws SerializationException if something went wrong during deserialization
*/
String[] getDynamicComponentPresentationsByCustomMetaQuery(String locale, Map<String, Collection<String>>
keyValueMap, int templateId) throws ItemNotFoundException, SerializationException;
/**
* Retrieves content of a Dynamic Component Presentation by doing a Broker Query
* based on Schema Criteria. If the templateId is set, only components published
* with that templateId are returned.
*
* Note that doing a direct Broker query is significantly
* faster than using the TaxonomyProvider.
*
* The returned content can for instance represent multiple Component Strings separated by |.
*
* @param locale The locale, to be translated to a publication Id
* @param schema The title of the schema
* @param templateId The Component template Id of CPs to return
* @return String representing the content of the CP(s)
* @throws ItemNotFoundException
* @throws SerializationException
*/
String[] getDynamicComponentPresentationsBySchema(String locale, String schema, int templateId) throws
ItemNotFoundException, SerializationException;
/**
* Retrieves content of a Dynamic Component Presentation by doing an AND Broker Query
* based on Schema and Keyword Criteria. If the templateId is set, only components published
* with that templateId are returned.
*
* Note that doing a direct Broker query is significantly
* faster than using the TaxonomyProvider.
*
* The returned content can for instance represent multiple Component Strings separated by |.
*
* @param locale The locale, to be translated to a publication Id
* @param schema The title of the schema
* @param categoryId The Item Id of the category
* @param keywordId The Item Id of the keyword
* @param templateId The Component template Id of CPs to return
* @return String representing the content of the CP(s)
* @throws ItemNotFoundException
* @throws SerializationException
*/
String[] getDynamicComponentPresentationsBySchemaInKeyword(String locale, String schema, int categoryId, int
keywordId, int templateId) throws ItemNotFoundException, SerializationException;
}
|
3e009d12e66944e9075697a6a7a1ec38fa3fe16f | 15,217 | java | Java | projects/es.um.nosql.s13e.datavisualization/src/Variation_Diff/util/Variation_DiffSwitch.java | catedrasaes-umu/NoSQLDataEngineering | 77c12d83bac0ae36fce85d602e8f4c9b0b80dd65 | [
"MIT"
] | 20 | 2016-12-10T09:13:28.000Z | 2021-11-12T12:09:58.000Z | projects/es.um.nosql.s13e.datavisualization/src/Variation_Diff/util/Variation_DiffSwitch.java | catedrasaes-umu/NoSQLDataEngineering | 77c12d83bac0ae36fce85d602e8f4c9b0b80dd65 | [
"MIT"
] | 8 | 2018-07-05T08:19:15.000Z | 2020-10-06T10:25:56.000Z | projects/es.um.nosql.s13e.datavisualization/src/Variation_Diff/util/Variation_DiffSwitch.java | catedrasaes-umu/NoSQLDataEngineering | 77c12d83bac0ae36fce85d602e8f4c9b0b80dd65 | [
"MIT"
] | 6 | 2018-02-10T20:54:43.000Z | 2021-07-31T09:20:13.000Z | 35.143187 | 119 | 0.663731 | 249 | /**
*/
package Variation_Diff.util;
import Variation_Diff.*;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
* @see Variation_Diff.Variation_DiffPackage
* @generated
*/
public class Variation_DiffSwitch<T> extends Switch<T>
{
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static Variation_DiffPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Variation_DiffSwitch()
{
if (modelPackage == null)
{
modelPackage = Variation_DiffPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage)
{
return ePackage == modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject)
{
switch (classifierID)
{
case Variation_DiffPackage.NO_SQL_DIFFERENCES:
{
NoSQLDifferences noSQLDifferences = (NoSQLDifferences)theEObject;
T result = caseNoSQLDifferences(noSQLDifferences);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.TYPE_DIFFERENCE:
{
TypeDifference typeDifference = (TypeDifference)theEObject;
T result = caseTypeDifference(typeDifference);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.TYPE_HINT:
{
TypeHint typeHint = (TypeHint)theEObject;
T result = caseTypeHint(typeHint);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.HAS_FIELD:
{
HasField hasField = (HasField)theEObject;
T result = caseHasField(hasField);
if (result == null) result = caseTypeHint(hasField);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.HAS_NOT_FIELD:
{
HasNotField hasNotField = (HasNotField)theEObject;
T result = caseHasNotField(hasNotField);
if (result == null) result = caseTypeHint(hasNotField);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.FIELD_TYPE:
{
FieldType fieldType = (FieldType)theEObject;
T result = caseFieldType(fieldType);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.PRIMITIVE_TYPE:
{
PrimitiveType primitiveType = (PrimitiveType)theEObject;
T result = casePrimitiveType(primitiveType);
if (result == null) result = caseFieldType(primitiveType);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.TUPLE_TYPE:
{
TupleType tupleType = (TupleType)theEObject;
T result = caseTupleType(tupleType);
if (result == null) result = caseFieldType(tupleType);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.ASSOCIATION_TYPE:
{
AssociationType associationType = (AssociationType)theEObject;
T result = caseAssociationType(associationType);
if (result == null) result = caseFieldType(associationType);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.AGGREGATE_TYPE:
{
AggregateType aggregateType = (AggregateType)theEObject;
T result = caseAggregateType(aggregateType);
if (result == null) result = caseAssociationType(aggregateType);
if (result == null) result = caseFieldType(aggregateType);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.REFERENCE_TYPE:
{
ReferenceType referenceType = (ReferenceType)theEObject;
T result = caseReferenceType(referenceType);
if (result == null) result = caseAssociationType(referenceType);
if (result == null) result = caseFieldType(referenceType);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.ENTITY_TYPE:
{
EntityType entityType = (EntityType)theEObject;
T result = caseEntityType(entityType);
if (result == null) result = caseFieldType(entityType);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.HOMOGENEOUS_TUPLE_TYPE:
{
HomogeneousTupleType homogeneousTupleType = (HomogeneousTupleType)theEObject;
T result = caseHomogeneousTupleType(homogeneousTupleType);
if (result == null) result = caseTupleType(homogeneousTupleType);
if (result == null) result = caseFieldType(homogeneousTupleType);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Variation_DiffPackage.HETEROGENEOUS_TUPLE_TYPE:
{
HeterogeneousTupleType heterogeneousTupleType = (HeterogeneousTupleType)theEObject;
T result = caseHeterogeneousTupleType(heterogeneousTupleType);
if (result == null) result = caseTupleType(heterogeneousTupleType);
if (result == null) result = caseFieldType(heterogeneousTupleType);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>No SQL Differences</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>No SQL Differences</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNoSQLDifferences(NoSQLDifferences object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Type Difference</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Type Difference</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTypeDifference(TypeDifference object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Type Hint</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Type Hint</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTypeHint(TypeHint object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Has Field</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Has Field</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseHasField(HasField object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Has Not Field</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Has Not Field</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseHasNotField(HasNotField object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Field Type</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Field Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseFieldType(FieldType object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Primitive Type</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Primitive Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePrimitiveType(PrimitiveType object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Tuple Type</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Tuple Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTupleType(TupleType object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Association Type</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Association Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAssociationType(AssociationType object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Aggregate Type</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Aggregate Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAggregateType(AggregateType object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Reference Type</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Reference Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseReferenceType(ReferenceType object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Entity Type</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Entity Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseEntityType(EntityType object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Homogeneous Tuple Type</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Homogeneous Tuple Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseHomogeneousTupleType(HomogeneousTupleType object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Heterogeneous Tuple Type</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Heterogeneous Tuple Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseHeterogeneousTupleType(HeterogeneousTupleType object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object)
{
return null;
}
} //Variation_DiffSwitch
|
3e009e113ec7716ab4815ab99db105e3e8bdbaa2 | 642 | java | Java | keystone-core/src/main/java/com/keystone/server/KeystoneIoWorker.java | wqq686/keystone | 0327235fa13f8150f8d3dbc71d4098cd7cb3c303 | [
"Apache-2.0"
] | null | null | null | keystone-core/src/main/java/com/keystone/server/KeystoneIoWorker.java | wqq686/keystone | 0327235fa13f8150f8d3dbc71d4098cd7cb3c303 | [
"Apache-2.0"
] | null | null | null | keystone-core/src/main/java/com/keystone/server/KeystoneIoWorker.java | wqq686/keystone | 0327235fa13f8150f8d3dbc71d4098cd7cb3c303 | [
"Apache-2.0"
] | null | null | null | 23.777778 | 70 | 0.794393 | 250 | package com.keystone.server;
import java.io.IOException;
import java.nio.channels.SelectionKey;
import com.keystone.transpot.api.IoSession;
import com.keystone.transpot.impl.DefaultIoWorker;
public class KeystoneIoWorker extends DefaultIoWorker {
@Override
public IoSession processAccept(SelectionKey key) throws IOException {
IoSession session = super.processAccept(key) ;
KeystoneSessionManager.getInstance().registerSession(session) ;
return session ;
}
@Override
public void processClose(IoSession session) {
KeystoneSessionManager.getInstance().unregisterSession(session) ;
super.processClose(session) ;
}
}
|
3e009e212851029faa651017f2252e53aa369bc6 | 5,915 | java | Java | src/main/java/com/microsoft/graph/requests/extensions/ReportRootGetOneDriveActivityUserCountsCollectionRequest.java | isabella232/msgraph-beta-sdk-java | 7d2b929d5c99c01ec1af1a251f4bf5876ca95ed8 | [
"MIT"
] | null | null | null | src/main/java/com/microsoft/graph/requests/extensions/ReportRootGetOneDriveActivityUserCountsCollectionRequest.java | isabella232/msgraph-beta-sdk-java | 7d2b929d5c99c01ec1af1a251f4bf5876ca95ed8 | [
"MIT"
] | 1 | 2021-02-23T20:48:12.000Z | 2021-02-23T20:48:12.000Z | src/main/java/com/microsoft/graph/requests/extensions/ReportRootGetOneDriveActivityUserCountsCollectionRequest.java | isabella232/msgraph-beta-sdk-java | 7d2b929d5c99c01ec1af1a251f4bf5876ca95ed8 | [
"MIT"
] | null | null | null | 45.5 | 285 | 0.730685 | 251 | // ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.requests.extensions;
import com.microsoft.graph.http.IRequestBuilder;
import com.microsoft.graph.core.ClientException;
import com.microsoft.graph.concurrency.ICallback;
import com.microsoft.graph.models.extensions.SiteActivitySummary;
import java.util.Arrays;
import java.util.EnumSet;
import com.microsoft.graph.requests.extensions.IReportRootGetOneDriveActivityUserCountsCollectionRequestBuilder;
import com.microsoft.graph.requests.extensions.ReportRootGetOneDriveActivityUserCountsCollectionPage;
import com.microsoft.graph.requests.extensions.ReportRootGetOneDriveActivityUserCountsCollectionResponse;
import com.microsoft.graph.options.QueryOption;
import com.microsoft.graph.core.IBaseClient;
import com.microsoft.graph.http.BaseCollectionRequest;
import com.microsoft.graph.concurrency.IExecutors;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The class for the Report Root Get One Drive Activity User Counts Collection Request.
*/
public class ReportRootGetOneDriveActivityUserCountsCollectionRequest extends BaseCollectionRequest<ReportRootGetOneDriveActivityUserCountsCollectionResponse, IReportRootGetOneDriveActivityUserCountsCollectionPage> implements IReportRootGetOneDriveActivityUserCountsCollectionRequest {
/**
* The request for this ReportRootGetOneDriveActivityUserCounts
*
* @param requestUrl the request URL
* @param client the service client
* @param requestOptions the options for this request
*/
public ReportRootGetOneDriveActivityUserCountsCollectionRequest(final String requestUrl, final IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
super(requestUrl, client, requestOptions, ReportRootGetOneDriveActivityUserCountsCollectionResponse.class, IReportRootGetOneDriveActivityUserCountsCollectionPage.class);
}
public void get(final ICallback<? super IReportRootGetOneDriveActivityUserCountsCollectionPage> callback) {
final IExecutors executors = getBaseRequest().getClient().getExecutors();
executors.performOnBackground(new Runnable() {
@Override
public void run() {
try {
executors.performOnForeground(get(), callback);
} catch (final ClientException e) {
executors.performOnForeground(e, callback);
}
}
});
}
public IReportRootGetOneDriveActivityUserCountsCollectionPage get() throws ClientException {
final ReportRootGetOneDriveActivityUserCountsCollectionResponse response = send();
return buildFromResponse(response);
}
public IReportRootGetOneDriveActivityUserCountsCollectionPage buildFromResponse(final ReportRootGetOneDriveActivityUserCountsCollectionResponse response) {
final IReportRootGetOneDriveActivityUserCountsCollectionRequestBuilder builder;
if (response.nextLink != null) {
builder = new ReportRootGetOneDriveActivityUserCountsCollectionRequestBuilder(response.nextLink, getBaseRequest().getClient(), /* options */ null, (String) null);
} else {
builder = null;
}
final IReportRootGetOneDriveActivityUserCountsCollectionPage page = new ReportRootGetOneDriveActivityUserCountsCollectionPage(response, builder);
page.setRawObject(response.getSerializer(), response.getRawObject());
return page;
}
/**
* Sets the select clause for the request
*
* @param value the select clause
* @return the updated request
*/
public IReportRootGetOneDriveActivityUserCountsCollectionRequest select(final String value) {
addQueryOption(new com.microsoft.graph.options.QueryOption("$select", value));
return (IReportRootGetOneDriveActivityUserCountsCollectionRequest)this;
}
/**
* Sets the top value for the request
*
* @param value the max number of items to return
* @return the updated request
*/
public IReportRootGetOneDriveActivityUserCountsCollectionRequest top(final int value) {
addQueryOption(new com.microsoft.graph.options.QueryOption("$top", value+""));
return (IReportRootGetOneDriveActivityUserCountsCollectionRequest)this;
}
/**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/
public IReportRootGetOneDriveActivityUserCountsCollectionRequest expand(final String value) {
addQueryOption(new com.microsoft.graph.options.QueryOption("$expand", value));
return (IReportRootGetOneDriveActivityUserCountsCollectionRequest)this;
}
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public IReportRootGetOneDriveActivityUserCountsCollectionRequest filter(final String value) {
addQueryOption(new com.microsoft.graph.options.QueryOption("$filter", value));
return (IReportRootGetOneDriveActivityUserCountsCollectionRequest)this;
}
/**
* Sets the order by clause for the request
*
* @param value the order by clause
* @return the updated request
*/
public IReportRootGetOneDriveActivityUserCountsCollectionRequest orderBy(final String value) {
addQueryOption(new com.microsoft.graph.options.QueryOption("$orderby", value));
return (IReportRootGetOneDriveActivityUserCountsCollectionRequest)this;
}
}
|
3e009e8b865bba296250ee3bbd58047d02326a00 | 229 | java | Java | src/edu/claflin/fad/ui/vis/VisualizationContainer.java | ClafLAN/FiniteAutomataDesigner | 6154eff73c4f313c4bb680c0a187fd74ab0a2691 | [
"MIT"
] | null | null | null | src/edu/claflin/fad/ui/vis/VisualizationContainer.java | ClafLAN/FiniteAutomataDesigner | 6154eff73c4f313c4bb680c0a187fd74ab0a2691 | [
"MIT"
] | null | null | null | src/edu/claflin/fad/ui/vis/VisualizationContainer.java | ClafLAN/FiniteAutomataDesigner | 6154eff73c4f313c4bb680c0a187fd74ab0a2691 | [
"MIT"
] | null | null | null | 19.083333 | 76 | 0.737991 | 252 | package edu.claflin.fad.ui.vis;
/**
* A container object that holds and displays the appropriate visualization
* components for an automata loaded in memory.
* @author CASII
*/
public class VisualizationContainer {
}
|
3e009f4cb5aa0a20557668d8d282779808186561 | 359 | java | Java | spring-boot-demo-docker/src/test/java/com/xkcoding/docker/SpringBootDemoDockerApplicationTests.java | freshgeek/spring-boot-demo | 72ffe33136fa6fffab0a19afa77c028f45cbc92c | [
"MIT"
] | 27,066 | 2017-11-14T08:16:12.000Z | 2022-03-31T23:06:18.000Z | spring-boot-demo-docker/src/test/java/com/xkcoding/docker/SpringBootDemoDockerApplicationTests.java | freshgeek/spring-boot-demo | 72ffe33136fa6fffab0a19afa77c028f45cbc92c | [
"MIT"
] | 172 | 2017-12-05T07:09:47.000Z | 2022-03-25T09:16:37.000Z | spring-boot-demo-docker/src/test/java/com/xkcoding/docker/SpringBootDemoDockerApplicationTests.java | freshgeek/spring-boot-demo | 72ffe33136fa6fffab0a19afa77c028f45cbc92c | [
"MIT"
] | 9,332 | 2017-11-14T08:16:16.000Z | 2022-03-31T11:40:05.000Z | 21.117647 | 60 | 0.796657 | 253 | package com.xkcoding.docker;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringBootDemoDockerApplicationTests {
@Test
public void contextLoads() {
}
}
|
3e00a09cbbf918b08f29a92c2596084761603a58 | 1,543 | java | Java | src/main/java/nl/stokpop/lograter/parser/line/LogbackElement.java | stokpop/lograter | 8d67a0d02432f7dc753f247ac9719bdd38f9ecaa | [
"Apache-2.0"
] | 1 | 2019-10-03T19:59:10.000Z | 2019-10-03T19:59:10.000Z | src/main/java/nl/stokpop/lograter/parser/line/LogbackElement.java | stokpop/lograter | 8d67a0d02432f7dc753f247ac9719bdd38f9ecaa | [
"Apache-2.0"
] | 8 | 2019-10-28T15:46:00.000Z | 2021-05-18T08:58:37.000Z | src/main/java/nl/stokpop/lograter/parser/line/LogbackElement.java | stokpop/lograter | 8d67a0d02432f7dc753f247ac9719bdd38f9ecaa | [
"Apache-2.0"
] | 4 | 2019-10-24T14:49:03.000Z | 2020-09-02T13:25:38.000Z | 35.068182 | 93 | 0.672715 | 254 | /*
* Copyright (C) 2020 Peter Paul Bakker, Stokpop Software Solutions
*
* 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 nl.stokpop.lograter.parser.line;
import java.util.List;
public interface LogbackElement {
/**
* Find variable for a logback element/directive.
*
* As in %t{yyyy-MM-dd}: the element is t and the variable is yyyy-MM-dd.
*
* @param elements the list of logback elements to look in
* @param elementName the name of the element/directive
* @return the variable or null if there is no variable
*/
static String findVariableForElement(List<LogbackElement> elements, String elementName) {
for (LogbackElement element : elements) {
if (element instanceof LogbackDirective) {
LogbackDirective directive = (LogbackDirective) element;
if (elementName.equals(directive.getDirective())) {
return directive.getVariable();
}
}
}
return null;
}
}
|
3e00a17f442913423316bcdf171add816379e3da | 1,090 | java | Java | src/main/java/io/github/zgjai/Tree/LC105.java | zgjai/LeetCodeByJava | 819f0bf86ccc5771127d129ebec1eaec2e41c5e2 | [
"MIT"
] | null | null | null | src/main/java/io/github/zgjai/Tree/LC105.java | zgjai/LeetCodeByJava | 819f0bf86ccc5771127d129ebec1eaec2e41c5e2 | [
"MIT"
] | null | null | null | src/main/java/io/github/zgjai/Tree/LC105.java | zgjai/LeetCodeByJava | 819f0bf86ccc5771127d129ebec1eaec2e41c5e2 | [
"MIT"
] | null | null | null | 25.952381 | 113 | 0.53211 | 255 | package io.github.zgjai.Tree;
import java.util.Map;
/**
* @author guijiang.zhang
* @date 2020/7/1
*/
public class LC105 {
/**
* 根据一棵树的前序遍历与中序遍历构造二叉树。
* <p>
* 注意: 你可以假设树中没有重复的元素。
* <p>
* 例如,给出
* <p>
* 前序遍历 preorder = [3,9,20,15,7] 中序遍历 inorder = [9,3,15,20,7] 返回如下的二叉树:
* <p>
* 3 / \ 9 20 / \ 15 7
*/
private Map<Integer, Integer> indexMap;
public TreeNode<Integer> buildTree(int[] preorder, int[] inorder) {
if (preorder == null || inorder == null || preorder.length == 0 || inorder.length == 0) {
return null;
}
for (int i = 0; i < inorder.length; i++) {
indexMap.put(inorder[i], i);
}
int curr = preorder[0];
int leftLength = indexMap.get(curr);
return constructTree(preorder, inorder, 1, 1 + leftLength, 0, 1 + leftLength);
}
private TreeNode<Integer> constructTree(int[] preorder, int[] inorder, int preLeft, int preRight, int inLeft,
int inRight) {
return null;
}
}
|
3e00a229888971d56c5068251c838e62b3b6da89 | 7,772 | java | Java | aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/DescribeEffectiveInstanceAssociationsRequest.java | umeshh/my-aws-sdk | 1d1c9fd1ba2ff4ffdaf61462303d54fbf9d34762 | [
"Apache-2.0"
] | 1 | 2019-02-08T15:23:02.000Z | 2019-02-08T15:23:02.000Z | aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/DescribeEffectiveInstanceAssociationsRequest.java | umeshh/my-aws-sdk | 1d1c9fd1ba2ff4ffdaf61462303d54fbf9d34762 | [
"Apache-2.0"
] | null | null | null | aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/DescribeEffectiveInstanceAssociationsRequest.java | umeshh/my-aws-sdk | 1d1c9fd1ba2ff4ffdaf61462303d54fbf9d34762 | [
"Apache-2.0"
] | 1 | 2022-03-22T05:35:12.000Z | 2022-03-22T05:35:12.000Z | 33.645022 | 140 | 0.62648 | 256 | /*
* Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.simplesystemsmanagement.model;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
*/
public class DescribeEffectiveInstanceAssociationsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
* <p>
* The instance ID for which you want to view all associations.
* </p>
*/
private String instanceId;
/**
* <p>
* The maximum number of items to return for this call. The call also returns a token that you can specify in a
* subsequent call to get the next set of results.
* </p>
*/
private Integer maxResults;
/**
* <p>
* The token for the next set of items to return. (You received this token from a previous call.)
* </p>
*/
private String nextToken;
/**
* <p>
* The instance ID for which you want to view all associations.
* </p>
*
* @param instanceId
* The instance ID for which you want to view all associations.
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
/**
* <p>
* The instance ID for which you want to view all associations.
* </p>
*
* @return The instance ID for which you want to view all associations.
*/
public String getInstanceId() {
return this.instanceId;
}
/**
* <p>
* The instance ID for which you want to view all associations.
* </p>
*
* @param instanceId
* The instance ID for which you want to view all associations.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeEffectiveInstanceAssociationsRequest withInstanceId(String instanceId) {
setInstanceId(instanceId);
return this;
}
/**
* <p>
* The maximum number of items to return for this call. The call also returns a token that you can specify in a
* subsequent call to get the next set of results.
* </p>
*
* @param maxResults
* The maximum number of items to return for this call. The call also returns a token that you can specify in
* a subsequent call to get the next set of results.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
* <p>
* The maximum number of items to return for this call. The call also returns a token that you can specify in a
* subsequent call to get the next set of results.
* </p>
*
* @return The maximum number of items to return for this call. The call also returns a token that you can specify
* in a subsequent call to get the next set of results.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
* <p>
* The maximum number of items to return for this call. The call also returns a token that you can specify in a
* subsequent call to get the next set of results.
* </p>
*
* @param maxResults
* The maximum number of items to return for this call. The call also returns a token that you can specify in
* a subsequent call to get the next set of results.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeEffectiveInstanceAssociationsRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
* <p>
* The token for the next set of items to return. (You received this token from a previous call.)
* </p>
*
* @param nextToken
* The token for the next set of items to return. (You received this token from a previous call.)
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
* <p>
* The token for the next set of items to return. (You received this token from a previous call.)
* </p>
*
* @return The token for the next set of items to return. (You received this token from a previous call.)
*/
public String getNextToken() {
return this.nextToken;
}
/**
* <p>
* The token for the next set of items to return. (You received this token from a previous call.)
* </p>
*
* @param nextToken
* The token for the next set of items to return. (You received this token from a previous call.)
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeEffectiveInstanceAssociationsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getInstanceId() != null)
sb.append("InstanceId: " + getInstanceId() + ",");
if (getMaxResults() != null)
sb.append("MaxResults: " + getMaxResults() + ",");
if (getNextToken() != null)
sb.append("NextToken: " + getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeEffectiveInstanceAssociationsRequest == false)
return false;
DescribeEffectiveInstanceAssociationsRequest other = (DescribeEffectiveInstanceAssociationsRequest) obj;
if (other.getInstanceId() == null ^ this.getInstanceId() == null)
return false;
if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false)
return false;
if (other.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public DescribeEffectiveInstanceAssociationsRequest clone() {
return (DescribeEffectiveInstanceAssociationsRequest) super.clone();
}
}
|
3e00a3fb3f86978f0432d911c0d15f59c8a804b2 | 1,361 | java | Java | historian-server/src/main/java/com/hurence/webapiservice/historian/models/MetricSizeInfo.java | Hurence/historian | 7c5a9f14fca0ef17d8ccfed357f248a4b3351587 | [
"Apache-2.0"
] | 5 | 2020-06-04T06:16:34.000Z | 2022-02-17T14:05:11.000Z | historian-server/src/main/java/com/hurence/webapiservice/historian/models/MetricSizeInfo.java | Hurence/historian | 7c5a9f14fca0ef17d8ccfed357f248a4b3351587 | [
"Apache-2.0"
] | 172 | 2020-01-31T09:05:47.000Z | 2022-02-17T14:04:51.000Z | historian-server/src/main/java/com/hurence/webapiservice/historian/models/MetricSizeInfo.java | Hurence/historian | 7c5a9f14fca0ef17d8ccfed357f248a4b3351587 | [
"Apache-2.0"
] | 1 | 2020-02-12T11:33:48.000Z | 2020-02-12T11:33:48.000Z | 35.815789 | 108 | 0.691403 | 257 | package com.hurence.webapiservice.historian.models;
import com.hurence.webapiservice.timeseries.extractor.MetricRequest;
public class MetricSizeInfo {
public MetricRequest metricRequest;
public long totalNumberOfPoints;
public long totalNumberOfChunks;
public long totalNumberOfPointsWithCorrectQuality;
public long totalNumberOfChunksWithCorrectQuality;
@Override
public String toString() {
return "MetricSizeInfo{" +
"metricRequest='" + metricRequest + '\'' +
", totalNumberOfPoints=" + totalNumberOfPoints +
", totalNumberOfChunks=" + totalNumberOfChunks +
", totalNumberOfPointsOfChunksWithCorrectQuality=" + totalNumberOfPointsWithCorrectQuality +
", totalNumberOfChunksWithCorrectQuality=" + totalNumberOfChunksWithCorrectQuality +
'}';
}
public long totalNumberOfPointsToReturn(){
if (metricRequest.getQualityConfig().getQualityValue().isNaN())
return totalNumberOfPoints;
else
return totalNumberOfPointsWithCorrectQuality;
}
public long totalNumberOfChunksToReturn(){
if (metricRequest.getQualityConfig().getQualityValue().isNaN())
return totalNumberOfChunks;
else
return totalNumberOfChunksWithCorrectQuality;
}
}
|
3e00a45f11f4d7fde1086039c2b41e3eab2cbaa7 | 3,161 | java | Java | tests/unit/src/com/android/settings/tests/DrawOverlayDetailsTest.java | abun880007/Resurrection_packages_apps_Settings | 58ae3cad0b33e77447688aa4da26dbb8b9e2899e | [
"Apache-2.0"
] | 1 | 2019-01-28T03:31:39.000Z | 2019-01-28T03:31:39.000Z | tests/unit/src/com/android/settings/tests/DrawOverlayDetailsTest.java | abun880007/Resurrection_packages_apps_Settings | 58ae3cad0b33e77447688aa4da26dbb8b9e2899e | [
"Apache-2.0"
] | 3 | 2019-09-19T15:51:44.000Z | 2019-10-23T07:32:06.000Z | tests/unit/src/com/android/settings/tests/DrawOverlayDetailsTest.java | abun880007/Resurrection_packages_apps_Settings | 58ae3cad0b33e77447688aa4da26dbb8b9e2899e | [
"Apache-2.0"
] | 4 | 2019-09-19T14:02:21.000Z | 2019-10-26T15:33:46.000Z | 42.146667 | 95 | 0.772857 | 258 | /*
* Copyright (C) 2016 The Android Open Source Project
*
* 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.android.settings.tests;
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.UiDevice;
import org.junit.runner.RunWith;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiScrollable;
import android.support.test.uiautomator.UiSelector;
import org.junit.Test;
import com.android.settings.R;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.core.IsNot.not;
import static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class DrawOverlayDetailsTest {
private final static String PACKAGE_SYSTEM_UI = "com.android.systemui";
@Test
public void testSystemUiDrawOverlayDetails_Disabled() throws Exception{
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
instrumentation.startActivitySync(new Intent(android.provider.Settings
.ACTION_MANAGE_OVERLAY_PERMISSION));
final Context targetContext = instrumentation.getTargetContext();
final PackageManager packageManager = targetContext.getPackageManager();
final String appName = (String) packageManager.getApplicationLabel(packageManager
.getApplicationInfo(PACKAGE_SYSTEM_UI, PackageManager.GET_META_DATA));
final UiDevice device = UiDevice.getInstance(instrumentation);
device.waitForIdle();
openActionBarOverflowOrOptionsMenu(targetContext);
onView(withText(targetContext.getString(R.string.menu_show_system))).perform(click());
device.waitForIdle();
final UiScrollable settings = new UiScrollable(
new UiSelector().packageName(targetContext.getPackageName()).scrollable(true));
settings.scrollTextIntoView(appName);
onView(withText(appName)).perform(click());
onView(withText(targetContext.getString(R.string.permit_draw_overlay))).check(matches
(not(isEnabled())));
}
}
|
3e00a4faad62a0fe581388bd632a38e9d2e875fd | 1,728 | java | Java | src/main/java/mcjty/meecreeps/actions/workers/PickupActionWorker.java | x0reaxeax/MeeCreeps | cc0821bd6e7d91a3abeab49ac10204868957e2fe | [
"MIT"
] | 16 | 2017-11-01T04:40:32.000Z | 2018-03-27T16:27:21.000Z | src/main/java/mcjty/meecreeps/actions/workers/PickupActionWorker.java | x0reaxeax/MeeCreeps | cc0821bd6e7d91a3abeab49ac10204868957e2fe | [
"MIT"
] | 38 | 2017-11-10T11:17:57.000Z | 2018-04-26T11:38:47.000Z | src/main/java/mcjty/meecreeps/actions/workers/PickupActionWorker.java | x0reaxeax/MeeCreeps | cc0821bd6e7d91a3abeab49ac10204868957e2fe | [
"MIT"
] | 7 | 2017-10-31T21:58:33.000Z | 2018-02-24T02:01:25.000Z | 30.857143 | 125 | 0.626736 | 259 | package mcjty.meecreeps.actions.workers;
import mcjty.meecreeps.api.IMeeCreep;
import mcjty.meecreeps.api.IWorkerHelper;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import java.util.List;
public class PickupActionWorker extends AbstractActionWorker {
private AxisAlignedBB actionBox = null;
public PickupActionWorker(IWorkerHelper helper) {
super(helper);
}
@Override
public AxisAlignedBB getActionBox() {
if (actionBox == null) {
// @todo config
actionBox = new AxisAlignedBB(options.getTargetPos().add(-10, -10, -10), options.getTargetPos().add(10, 10, 10));
}
return actionBox;
}
@Override
public void tick(boolean timeToWrapUp) {
if (timeToWrapUp) {
helper.done();
} else {
tryFindingItemsToPickup();
}
}
private void tryFindingItemsToPickup() {
IMeeCreep entity = helper.getMeeCreep();
BlockPos position = entity.getEntity().getPosition();
List<EntityItem> items = entity.getWorld().getEntitiesWithinAABB(EntityItem.class, getActionBox());
if (!items.isEmpty()) {
items.sort((o1, o2) -> {
double d1 = position.distanceSq(o1.posX, o1.posY, o1.posZ);
double d2 = position.distanceSq(o2.posX, o2.posY, o2.posZ);
return Double.compare(d1, d2);
});
EntityItem entityItem = items.get(0);
helper.navigateTo(entityItem, (pos) -> helper.pickup(entityItem));
} else if (entity.hasStuffInInventory()) {
helper.putStuffAway();
}
}
}
|
3e00a516094215adcda280afae4f08e8a1c00b66 | 781 | java | Java | src/test/java/ru/job4j/ImportUserTest.java | alexandrsigaev/job4j_spring | 71b062eb76bc3247e1169453ffb1765a09a35153 | [
"Apache-2.0"
] | null | null | null | src/test/java/ru/job4j/ImportUserTest.java | alexandrsigaev/job4j_spring | 71b062eb76bc3247e1169453ffb1765a09a35153 | [
"Apache-2.0"
] | 2 | 2021-12-10T01:16:34.000Z | 2021-12-14T20:38:51.000Z | src/test/java/ru/job4j/ImportUserTest.java | alexandrsigaev/job4j_spring | 71b062eb76bc3247e1169453ffb1765a09a35153 | [
"Apache-2.0"
] | null | null | null | 32.333333 | 92 | 0.721649 | 260 | package ru.job4j;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericXmlApplicationContext;
import ru.job4j.models.Person;
import java.time.LocalDate;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
public class ImportUserTest {
@Test
public void addPerson() {
ApplicationContext context = new GenericXmlApplicationContext("spring-context.xml");
ImportUser importUser = context.getBean(ImportUser.class);
var person = new Person("login", "passwrd", "name"
, "hzdkv@example.com", "199858509888", LocalDate.now());
importUser.addPerson(person);
assertThat(person, is(importUser.getById(person.getId())));
}
} |
3e00a6705ac347be33b63bbcd0277b581864afdf | 268 | java | Java | aula03/aula03_ex06.java | efunke/javas | d08fde4d22f6c895c602dcdac0044b67bd2294e1 | [
"Apache-2.0"
] | null | null | null | aula03/aula03_ex06.java | efunke/javas | d08fde4d22f6c895c602dcdac0044b67bd2294e1 | [
"Apache-2.0"
] | null | null | null | aula03/aula03_ex06.java | efunke/javas | d08fde4d22f6c895c602dcdac0044b67bd2294e1 | [
"Apache-2.0"
] | null | null | null | 20.615385 | 77 | 0.585821 | 261 | public class aula03_ex06
{
public static void main (String args[])
{
System.out.println("Tecle \"Enter\" ou qualquer tecla para terminar.");
try{
System.in.read();
} catch (Exception erro) {
erro.printStackTrace();
}
}
}
|
3e00a89eb5e89a285459e07471045c1b5bb3e980 | 2,320 | java | Java | server/src/main/servlets/PlantAddServlet.java | Roshixa/green-pi | 1b36d795ead2c23045ea027fd28bffd273edeee0 | [
"MIT"
] | 1 | 2019-06-12T12:17:44.000Z | 2019-06-12T12:17:44.000Z | server/src/main/servlets/PlantAddServlet.java | Roshixa/green-pi | 1b36d795ead2c23045ea027fd28bffd273edeee0 | [
"MIT"
] | null | null | null | server/src/main/servlets/PlantAddServlet.java | Roshixa/green-pi | 1b36d795ead2c23045ea027fd28bffd273edeee0 | [
"MIT"
] | null | null | null | 45.490196 | 123 | 0.706897 | 262 | package main.servlets;
import main.service.PlantService;
import main.service.UserService;
import main.service.impl.PlantServiceImpl;
import main.service.impl.UserServiceImpl;
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.IOException;
import static main.utils.StringUtils.encrypt;
@WebServlet("/add")
public class PlantAddServlet extends HttpServlet {
private static final UserService userService = new UserServiceImpl();
private static final PlantService plantService = new PlantServiceImpl();
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
if (userService.hasLoggedIn(request.getSession())) {
String name = request.getParameter("name");
String dbAddress = request.getParameter("dbAddress");
String dbUsername = request.getParameter("dbUsername");
String dbPassword = request.getParameter("dbPassword");
String description = request.getParameter("description");
Integer port = Integer.getInteger(request.getParameter("port"));
String userEmail = userService.getUserEmail(request.getSession());
plantService.add(userEmail, dbAddress,dbUsername, dbPassword,port,name,description );
if (plantService.find(encrypt(dbAddress + port)) != null) {
response.sendRedirect(request.getContextPath() + "/stats");
} else {
response.sendRedirect(request.getContextPath() + "/add");
}
} else {
response.sendRedirect(request.getContextPath() + "/");
}
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
if (userService.hasLoggedIn(request.getSession())) {
request.setAttribute("plants", plantService.findByUserEmail(userService.getSessionUser(request.getSession())));
request.getRequestDispatcher("/WEB-INF/layout/add.jsp").forward(request, response);
} else {
response.sendRedirect(request.getContextPath() + "/");
}
}
}
|
3e00a8b49509863846b16ac69cf71ea58af201f6 | 103 | java | Java | app/src/main/java/com/hemendra/citiessearch/model/structures/StructureType.java | hemendra-sharma/CitiesSearch | 4148c40615d4f0b3d605fc7943f4f6914f7c22a1 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/hemendra/citiessearch/model/structures/StructureType.java | hemendra-sharma/CitiesSearch | 4148c40615d4f0b3d605fc7943f4f6914f7c22a1 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/hemendra/citiessearch/model/structures/StructureType.java | hemendra-sharma/CitiesSearch | 4148c40615d4f0b3d605fc7943f4f6914f7c22a1 | [
"Apache-2.0"
] | null | null | null | 14.714286 | 51 | 0.747573 | 263 | package com.hemendra.citiessearch.model.structures;
public enum StructureType {
TRIE,
RADIX
}
|
3e00a9374ceb69059ce57e6681956ca73e5f2b3f | 1,677 | java | Java | core/src/main/java/org/yes/cart/shoppingcart/impl/ConfiguredCartContentsValidator.java | Yulyalu/yes-cart | 611f24daac39a7678400af1bd72e662b6b44c7c2 | [
"Apache-2.0"
] | 122 | 2015-07-15T08:26:40.000Z | 2022-03-14T08:02:29.000Z | core/src/main/java/org/yes/cart/shoppingcart/impl/ConfiguredCartContentsValidator.java | Yulyalu/yes-cart | 611f24daac39a7678400af1bd72e662b6b44c7c2 | [
"Apache-2.0"
] | 42 | 2016-11-13T07:22:55.000Z | 2022-03-31T19:58:11.000Z | core/src/main/java/org/yes/cart/shoppingcart/impl/ConfiguredCartContentsValidator.java | Yulyalu/yes-cart | 611f24daac39a7678400af1bd72e662b6b44c7c2 | [
"Apache-2.0"
] | 88 | 2015-09-04T12:04:45.000Z | 2022-02-08T17:29:40.000Z | 29.946429 | 94 | 0.725701 | 264 | /*
* Copyright 2009 Inspire-Software.com
*
* 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 org.yes.cart.shoppingcart.impl;
import org.yes.cart.config.Configuration;
import org.yes.cart.config.ConfigurationContext;
import org.yes.cart.shoppingcart.CartContentsValidator;
import org.yes.cart.shoppingcart.CartValidityModel;
import org.yes.cart.shoppingcart.ShoppingCart;
/**
* User: denispavlov
* Date: 27/03/2018
* Time: 21:05
*/
public class ConfiguredCartContentsValidator implements CartContentsValidator, Configuration {
private CartContentsValidator validator;
private ConfigurationContext cfgContext;
/** {@inheritDoc} */
@Override
public CartValidityModel validate(final ShoppingCart cart) {
return validator.validate(cart);
}
public void setValidator(final CartContentsValidator validator) {
this.validator = validator;
}
/** {@inheritDoc} */
@Override
public ConfigurationContext getCfgContext() {
return cfgContext;
}
public void setCfgContext(final ConfigurationContext cfgContext) {
this.cfgContext = cfgContext;
}
}
|
3e00aa79d0e674bdae914a7874c6bf8fbdbf7dcd | 1,264 | java | Java | extensions/flyway/deployment/src/test/java/io/quarkus/flyway/test/FlywayExtensionBaselineOnMigrateNamedDataSourceTest.java | attiand/quarkus | 037850f48d9c40226bb74a886c7e398b2ea0df6b | [
"Apache-2.0"
] | 3 | 2020-02-03T17:16:31.000Z | 2022-01-14T12:41:48.000Z | extensions/flyway/deployment/src/test/java/io/quarkus/flyway/test/FlywayExtensionBaselineOnMigrateNamedDataSourceTest.java | attiand/quarkus | 037850f48d9c40226bb74a886c7e398b2ea0df6b | [
"Apache-2.0"
] | 456 | 2020-01-14T10:58:06.000Z | 2021-12-10T20:04:51.000Z | extensions/flyway/deployment/src/test/java/io/quarkus/flyway/test/FlywayExtensionBaselineOnMigrateNamedDataSourceTest.java | attiand/quarkus | 037850f48d9c40226bb74a886c7e398b2ea0df6b | [
"Apache-2.0"
] | 6 | 2020-01-06T16:58:10.000Z | 2021-02-11T15:32:57.000Z | 33.263158 | 113 | 0.756329 | 265 | package io.quarkus.flyway.test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import javax.inject.Inject;
import org.flywaydb.core.Flyway;
import org.flywaydb.core.api.MigrationInfo;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import io.quarkus.flyway.FlywayDataSource;
import io.quarkus.test.QuarkusUnitTest;
public class FlywayExtensionBaselineOnMigrateNamedDataSourceTest {
@Inject
@FlywayDataSource("users")
Flyway flyway;
@RegisterExtension
static final QuarkusUnitTest config = new QuarkusUnitTest()
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
.addAsResource("baseline-on-migrate-named-datasource.properties", "application.properties"));
@Test
@DisplayName("Create history table correctly")
public void testFlywayInitialBaselineInfo() {
MigrationInfo baselineInfo = flyway.info().applied()[0];
assertEquals("0.0.1", baselineInfo.getVersion().getVersion());
assertEquals("Initial description for test", baselineInfo.getDescription());
}
}
|
3e00aae60abeaeda5159b358b3805ade27cc4a91 | 1,710 | java | Java | app/src/main/java/com/geelaro/blackboard/news/model/NewsModelImpl.java | geelaro/SunshinePro | ec12035a7e4e726af5e95f00d9167117b9c6bffc | [
"MIT"
] | null | null | null | app/src/main/java/com/geelaro/blackboard/news/model/NewsModelImpl.java | geelaro/SunshinePro | ec12035a7e4e726af5e95f00d9167117b9c6bffc | [
"MIT"
] | null | null | null | app/src/main/java/com/geelaro/blackboard/news/model/NewsModelImpl.java | geelaro/SunshinePro | ec12035a7e4e726af5e95f00d9167117b9c6bffc | [
"MIT"
] | null | null | null | 27.580645 | 104 | 0.597076 | 266 | package com.geelaro.blackboard.news.model;
import com.geelaro.blackboard.base.beans.NewsBean;
import com.geelaro.blackboard.news.widget.NewsFragment;
import com.geelaro.blackboard.utils.NewsJsonUtils;
import com.geelaro.blackboard.utils.OkHttpUtils;
import com.geelaro.blackboard.utils.SunApi;
import java.util.List;
/**
* Created by geelaro on 2017/10/31.
*/
public class NewsModelImpl implements NewsModel {
@Override
public void loadNewsList(final int type,String url,final OnLoadNewsListener listener) {
OkHttpUtils.ResultCallback<String> loadNewsCallBack = new OkHttpUtils.ResultCallback<String>() {
@Override
public void onFailure(Exception e) {
listener.onFailure("Fail to load News.",e);
}
@Override
public void onSuccess(String response) {
List<NewsBean> newsBeanList = NewsJsonUtils.getNewsBean(response, getId(type));
listener.onSuccess(newsBeanList);
}
};
OkHttpUtils.newInstance().get(url,loadNewsCallBack);
}
private String getId(int type){
String id ;
switch (type){
case NewsFragment.NEWS_TYPE_TOP:
id = SunApi.TOP_ID;
break;
case NewsFragment.NEWS_TYPE_NBA:
id = SunApi.NBA_ID;
break;
case NewsFragment.NEWS_TYPE_CARS:
id = SunApi.CAR_ID;
break;
case NewsFragment.NEWS_TYPE_JOKES:
id = SunApi.JOKE_ID;
break;
default:
id = SunApi.TOP_ID;
break;
}
return id;
}
}
|
3e00aaf2115026503ad7ad1f37e619965030948f | 4,001 | java | Java | project/easyee-sm-springboot/src/main/java/cn/easyproject/easyee/sm/sys/entity/SysUser.java | wolftuo/EasyEE | f0bdb167e008c4781f4e18c95830b8c687660976 | [
"MIT"
] | 323 | 2015-12-10T08:39:58.000Z | 2022-02-08T12:18:19.000Z | project/easyee-sm-springboot/src/main/java/cn/easyproject/easyee/sm/sys/entity/SysUser.java | wolftuo/EasyEE | f0bdb167e008c4781f4e18c95830b8c687660976 | [
"MIT"
] | 61 | 2017-01-16T08:58:45.000Z | 2022-02-09T22:54:47.000Z | project/easyee-sm-springboot/src/main/java/cn/easyproject/easyee/sm/sys/entity/SysUser.java | wolftuo/EasyEE | f0bdb167e008c4781f4e18c95830b8c687660976 | [
"MIT"
] | 184 | 2015-10-13T08:24:02.000Z | 2021-12-09T08:33:02.000Z | 20.105528 | 86 | 0.658335 | 267 | package cn.easyproject.easyee.sm.sys.entity;
import java.util.HashSet;
import java.util.Set;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
/**
* SysUser entity.
* @author easyproject.cn
* @version 1.0
*/
@JsonIgnoreProperties({"password"})
public class SysUser implements java.io.Serializable {
public static final int STATUS_LOCK=1;
// Fields
/**
*
*/
private static final long serialVersionUID = 1L;
private Integer userId;
// @JsonIgnore
private String password;
private String name;
private String realName;
/**
* 用户状态:0启用;1禁用;2删除
*/
private Integer status;
private Set<SysRole> sysRoles = new HashSet<SysRole>(0);
// Constructors
/** default constructor */
public SysUser() {
}
/** minimal constructor */
public SysUser(String name, String password) {
this.name = name;
this.password = password;
}
/** full constructor */
public SysUser(String name, String password, Integer status, Set<SysRole> sysRoles) {
super();
this.name = name;
this.password = password;
this.status = status;
this.sysRoles = sysRoles;
}
// Property accessors
public Integer getUserId() {
return this.userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public Integer getStatus() {
return this.status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Set<SysRole> getSysRoles() {
return this.sysRoles;
}
public void setSysRoles(Set<SysRole> sysRoles) {
this.sysRoles = sysRoles;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
public SysUser(String password, String name, String realName,
Integer status, Set<SysRole> sysRoles) {
super();
this.password = password;
this.name = name;
this.realName = realName;
this.status = status;
this.sysRoles = sysRoles;
}
public SysUser(Integer userId, String password, String name,
String realName, Integer status, Set<SysRole> sysRoles) {
super();
this.userId = userId;
this.password = password;
this.name = name;
this.realName = realName;
this.status = status;
this.sysRoles = sysRoles;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result
+ ((password == null) ? 0 : password.hashCode());
result = prime * result
+ ((realName == null) ? 0 : realName.hashCode());
result = prime * result + ((status == null) ? 0 : status.hashCode());
result = prime * result + ((userId == null) ? 0 : userId.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;
SysUser other = (SysUser) obj;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (password == null) {
if (other.password != null)
return false;
} else if (!password.equals(other.password))
return false;
if (realName == null) {
if (other.realName != null)
return false;
} else if (!realName.equals(other.realName))
return false;
if (status == null) {
if (other.status != null)
return false;
} else if (!status.equals(other.status))
return false;
if (userId == null) {
if (other.userId != null)
return false;
} else if (!userId.equals(other.userId))
return false;
return true;
}
@Override
public String toString() {
return "SysUser [userId=" + userId + ", password=" + password
+ ", name=" + name + ", realName=" + realName + ", status="
+ status + "]";
}
} |
3e00ac2a41b699044aebb377beb3b08faa83cc79 | 2,766 | java | Java | src/main/java/demo/groupby/GroupSalaryByMapReduce.java | LoneRifle/hazelcast-api-demo | 190a724945ea98c8ea8dc5ee26dca04e8854cc23 | [
"MIT"
] | null | null | null | src/main/java/demo/groupby/GroupSalaryByMapReduce.java | LoneRifle/hazelcast-api-demo | 190a724945ea98c8ea8dc5ee26dca04e8854cc23 | [
"MIT"
] | null | null | null | src/main/java/demo/groupby/GroupSalaryByMapReduce.java | LoneRifle/hazelcast-api-demo | 190a724945ea98c8ea8dc5ee26dca04e8854cc23 | [
"MIT"
] | null | null | null | 29.425532 | 90 | 0.660521 | 268 | package demo.groupby;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.ICompletableFuture;
import com.hazelcast.core.IMap;
import com.hazelcast.mapreduce.*;
import demo.Utils;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
public class GroupSalaryByMapReduce {
public static void main(String... args) throws Exception {
HazelcastInstance h = Utils.init().getHazelcastInstance();
IMap<String, Integer> salaries = h.getMap("salaries");
Utils.fillInSalaries(salaries);
long initialTime = System.currentTimeMillis();
JobTracker jobTracker = h.getJobTracker("salaryTracker");
KeyValueSource<String, Integer> source = KeyValueSource.fromMap(salaries);
Job<String, Integer> job = jobTracker.newJob(source);
ICompletableFuture<Map<Integer, Integer>> future = job
.mapper(new SalaryMapper())
.reducer(new SalaryReducerFactory())
.submit(new SalaryCollator());
Map<Integer, Integer> sum = future.get();
long timeTaken = System.currentTimeMillis() - initialTime;
Hazelcast.shutdownAll();
System.out.println("Aggregated sum: " + sum + " computed in " + timeTaken + "ms");
}
}
class SalaryCollator
implements Collator<Entry<Integer, Integer>, Map<Integer, Integer>> {
@Override
public Map<Integer, Integer> collate(Iterable<Entry<Integer, Integer>> values) {
Map<Integer, Integer> map = new HashMap<>();
for (Entry<Integer, Integer> e : values) {
map.put(e.getKey(), e.getValue());
}
return map;
}
}
class SalaryMapper
implements Mapper<String, Integer, Integer, Integer> {
@Override
public void map(String key, Integer value, Context<Integer, Integer> context) {
String empId = key.substring(key.length() - 1);
context.emit(Integer.valueOf(empId), value / 100);
}
}
class SalaryReducerFactory
implements ReducerFactory<Integer, Integer, Integer> {
private ConcurrentMap<Integer, SalaryReducer> map = new ConcurrentHashMap<>();
@Override
public Reducer<Integer, Integer> newReducer(Integer key) {
return map.computeIfAbsent(key, s -> new SalaryReducer());
}
private static class SalaryReducer
extends Reducer<Integer, Integer> {
private volatile int value = 0;
@Override
public void reduce(Integer value) {
this.value += value;
}
@Override
public Integer finalizeReduce() {
return value;
}
}
}
|
3e00ac6df1a4faf2b03a8d835d5233afaa10f7a0 | 559 | java | Java | app/src/paid/java/com.shentuo.builditbigger/MainActivityFragment.java | ThorChiam/BuildItBigger | b2852a7a21e0c7a6c0f7536aa178e29a03ed6122 | [
"Apache-2.0"
] | null | null | null | app/src/paid/java/com.shentuo.builditbigger/MainActivityFragment.java | ThorChiam/BuildItBigger | b2852a7a21e0c7a6c0f7536aa178e29a03ed6122 | [
"Apache-2.0"
] | null | null | null | app/src/paid/java/com.shentuo.builditbigger/MainActivityFragment.java | ThorChiam/BuildItBigger | b2852a7a21e0c7a6c0f7536aa178e29a03ed6122 | [
"Apache-2.0"
] | null | null | null | 24.304348 | 74 | 0.719141 | 269 | package com.shentuo.builditbigger;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by ShentuoZhan on 16/10/17.
*/
public class MainActivityFragment extends Fragment {
public MainActivityFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_main, container, false);
}
} |
3e00acd31afa932c89f5c7be76c39884572a114d | 4,583 | java | Java | ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ContentEncryptedElementsAssertionState.java | mmoayyed/ws-wss4j | 022dcafd761d184442a957a15bb0dc4b0ac3b8ad | [
"Apache-2.0"
] | 10 | 2019-11-01T15:25:53.000Z | 2021-11-30T02:11:55.000Z | ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ContentEncryptedElementsAssertionState.java | mmoayyed/ws-wss4j | 022dcafd761d184442a957a15bb0dc4b0ac3b8ad | [
"Apache-2.0"
] | 29 | 2019-11-27T12:02:23.000Z | 2022-03-15T09:05:34.000Z | ws-security-policy-stax/src/main/java/org/apache/wss4j/policy/stax/assertionStates/ContentEncryptedElementsAssertionState.java | mmoayyed/ws-wss4j | 022dcafd761d184442a957a15bb0dc4b0ac3b8ad | [
"Apache-2.0"
] | 27 | 2019-11-21T14:43:48.000Z | 2022-02-12T22:36:53.000Z | 43.235849 | 137 | 0.70216 | 270 | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 org.apache.wss4j.policy.stax.assertionStates;
import org.apache.wss4j.policy.AssertionState;
import org.apache.wss4j.common.WSSPolicyException;
import org.apache.wss4j.policy.model.AbstractSecurityAssertion;
import org.apache.wss4j.policy.model.ContentEncryptedElements;
import org.apache.wss4j.policy.model.XPath;
import org.apache.xml.security.stax.securityEvent.ContentEncryptedElementSecurityEvent;
import org.apache.xml.security.stax.securityEvent.SecurityEvent;
import org.apache.xml.security.stax.securityEvent.SecurityEventConstants;
import org.apache.wss4j.policy.stax.Assertable;
import org.apache.wss4j.policy.stax.DummyPolicyAsserter;
import org.apache.wss4j.policy.stax.PolicyAsserter;
import org.apache.wss4j.policy.stax.PolicyUtils;
import org.apache.wss4j.stax.securityEvent.WSSecurityEventConstants;
import org.apache.wss4j.stax.utils.WSSUtils;
import javax.xml.namespace.QName;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* WSP1.3, 4.2.3 ContentEncryptedElements Assertion
*/
public class ContentEncryptedElementsAssertionState extends AssertionState implements Assertable {
private final List<List<QName>> pathElements = new ArrayList<>();
private PolicyAsserter policyAsserter;
public ContentEncryptedElementsAssertionState(AbstractSecurityAssertion assertion,
PolicyAsserter policyAsserter,
boolean asserted) {
super(assertion, asserted);
ContentEncryptedElements contentEncryptedElements = (ContentEncryptedElements) assertion;
for (int i = 0; i < contentEncryptedElements.getXPaths().size(); i++) {
XPath xPath = contentEncryptedElements.getXPaths().get(i);
List<QName> elements = PolicyUtils.getElementPath(xPath);
pathElements.add(elements);
}
this.policyAsserter = policyAsserter;
if (this.policyAsserter == null) {
this.policyAsserter = new DummyPolicyAsserter();
}
if (asserted) {
policyAsserter.assertPolicy(getAssertion());
}
}
@Override
public SecurityEventConstants.Event[] getSecurityEventType() {
return new SecurityEventConstants.Event[]{
WSSecurityEventConstants.ContentEncrypted
};
}
@Override
public boolean assertEvent(SecurityEvent securityEvent) throws WSSPolicyException {
ContentEncryptedElementSecurityEvent contentEncryptedElementSecurityEvent = (ContentEncryptedElementSecurityEvent) securityEvent;
Iterator<List<QName>> pathElementIterator = pathElements.iterator();
while (pathElementIterator.hasNext()) {
List<QName> pathElements = pathElementIterator.next();
if (WSSUtils.pathMatches(pathElements, contentEncryptedElementSecurityEvent.getElementPath())) {
if (contentEncryptedElementSecurityEvent.isEncrypted()) {
setAsserted(true);
policyAsserter.assertPolicy(getAssertion());
return true;
} else {
//an element must be encrypted but isn't
setAsserted(false);
setErrorMessage("Content of element " + WSSUtils.pathAsString(contentEncryptedElementSecurityEvent.getElementPath())
+ " must be encrypted");
policyAsserter.unassertPolicy(getAssertion(), getErrorMessage());
return false;
}
}
}
//if we return false here other encrypted elements will trigger a PolicyViolationException
policyAsserter.assertPolicy(getAssertion());
return true;
}
}
|
3e00ad190b80999022acd6b4dac385e2c4adb60c | 4,536 | java | Java | src/com/intel/stl/ui/configuration/ICategoryProcessorContext.java | scibian/fmgui | 9aa176342f4f4cda4671e466db8d6ccabcf72ef9 | [
"Intel"
] | null | null | null | src/com/intel/stl/ui/configuration/ICategoryProcessorContext.java | scibian/fmgui | 9aa176342f4f4cda4671e466db8d6ccabcf72ef9 | [
"Intel"
] | null | null | null | src/com/intel/stl/ui/configuration/ICategoryProcessorContext.java | scibian/fmgui | 9aa176342f4f4cda4671e466db8d6ccabcf72ef9 | [
"Intel"
] | null | null | null | 28.89172 | 81 | 0.670414 | 271 | /**
* Copyright (c) 2015, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.intel.stl.ui.configuration;
import com.intel.stl.api.configuration.IConfigurationApi;
import com.intel.stl.api.performance.IPerformanceApi;
import com.intel.stl.api.subnet.ISubnetApi;
import com.intel.stl.api.subnet.LinkRecordBean;
import com.intel.stl.api.subnet.NodeInfoBean;
import com.intel.stl.api.subnet.NodeRecordBean;
import com.intel.stl.api.subnet.PortInfoBean;
import com.intel.stl.api.subnet.PortRecordBean;
import com.intel.stl.api.subnet.SwitchInfoBean;
import com.intel.stl.api.subnet.SwitchRecordBean;
import com.intel.stl.ui.main.Context;
import com.intel.stl.ui.monitor.tree.FVResourceNode;
public interface ICategoryProcessorContext {
/**
*
* <i>Description:</i> return the resource node for this context
*
* @return
*/
FVResourceNode getResourceNode();
/**
*
* <i>Description:</i> returns the page context for this context
*
* @return
*/
Context getContext();
ISubnetApi getSubnetApi();
IConfigurationApi getConfigurationApi();
IPerformanceApi getPerformanceApi();
/**
*
* <i>Description:</i> returns the node associated with the resource node
* (the parent node if the resource node is a port)
*
* @return
*/
NodeRecordBean getNode();
/**
*
* <i>Description:</i> returns the node information for the resource node
* (the parent node information if the resource node is a port)
*
* @return
*/
NodeInfoBean getNodeInfo();
/**
*
* <i>Description:</i> returns the switch record when the resource node is a
* switch (null if not)
*
* @return
*/
SwitchRecordBean getSwitch();
/**
*
* <i>Description:</i> returns the switch information when the resource node
* is a switch (null if not)
*
* @return
*/
SwitchInfoBean getSwitchInfo();
/**
*
* <i>Description:</i> returns the port record when the resource node is a
* port (null if not)
*
* @return
*/
PortRecordBean getPort();
/**
*
* <i>Description:</i> returns the port information when the resource node
* is a port (null if not)
*
* @return
*/
PortInfoBean getPortInfo();
/**
*
* <i>Description:</i> returns the link record associated with the port when
* the resource node is a port (null if not)
*
* @return
*/
LinkRecordBean getLink();
/**
*
* <i>Description:</i> returns the node connected to the port when the
* resource node is a port (null if not)
*
* @return
*/
NodeRecordBean getNeighbor();
/**
*
* <i>Description:</i> returns whether this port is an end port (a computing
* node)
*
* @return
*/
boolean isEndPort();
boolean isHFI();
boolean isExternalSWPort();
boolean isBaseSWPort0();
boolean isEnhSWPort0();
}
|
3e00af1daae94f3680621106ac8be001a32bfb8d | 16,364 | java | Java | api/src/main/java/com/acmedcare/framework/cpcdp/SerializerFactory.java | acmedcare-com/Acmedcare-CPCDP | ce52e05b037808452f0c9d8e98cd67136819fe32 | [
"Unlicense"
] | 1 | 2020-10-31T04:15:44.000Z | 2020-10-31T04:15:44.000Z | api/src/main/java/com/acmedcare/framework/cpcdp/SerializerFactory.java | acmedcare-com/Acmedcare-CPCDP | ce52e05b037808452f0c9d8e98cd67136819fe32 | [
"Unlicense"
] | 5 | 2020-12-21T16:59:32.000Z | 2021-08-25T15:45:31.000Z | api/src/main/java/com/acmedcare/framework/cpcdp/SerializerFactory.java | acmedcare-com/Acmedcare-CPCDP | ce52e05b037808452f0c9d8e98cd67136819fe32 | [
"Unlicense"
] | null | null | null | 36.690583 | 185 | 0.676241 | 272 | /*
* Copyright (c) 2019 Acmedcare+
*
* 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 com.acmedcare.framework.cpcdp;
import com.acmedcare.framework.cpcdp.annotation.*;
import com.acmedcare.framework.cpcdp.consts.DistressCaseDetail;
import com.acmedcare.framework.cpcdp.consts.NstemiGraceEstimate;
import com.acmedcare.framework.cpcdp.consts.NstemiGraceHrCondition;
import com.acmedcare.framework.cpcdp.gson.CpcdpFieldNamingStrategy;
import com.acmedcare.framework.cpcdp.gson.CpcdpTypeAdapterFactory;
import com.acmedcare.framework.cpcdp.gson.serializer.DistressCaseDetailSerializer;
import com.acmedcare.framework.cpcdp.gson.serializer.NstemiGraceEstimateSerializer;
import com.acmedcare.framework.cpcdp.gson.serializer.NstemiGraceHrConditionSerializer;
import com.acmedcare.framework.cpcdp.kits.Assert;
import com.acmedcare.framework.cpcdp.kits.Reflections;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonSyntaxException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Stream;
/**
* {@link com.acmedcare.framework.cpcdp.SerializerFactory}
*
* @author <a href="mailto:dycjh@example.com">Elve.Xu</a>
* @version ${project.version} - 2019/11/8.
*/
public final class SerializerFactory {
private static final Logger log = LoggerFactory.getLogger(SerializerFactory.class);
private static final String PRETTY_ENABLED_KEY = "cpcdp.json.pretty.enabled";
private static final String DEFAULT_DATA_FORMAT_PATTERN = "yyyy-MM-dd HH:mm:ss";
private static final Boolean ENABLED_PRETTY = Boolean.valueOf(System.getProperty(PRETTY_ENABLED_KEY, "false"));
private static final String CPC_ENUM_KEY_METHOD_NAME = "key";
private static final String CPC_ENUM_VALUE_METHOD_NAME = "value";
private static Gson gson;
static {
GsonBuilder builder =
new GsonBuilder()
.setFieldNamingStrategy(new CpcdpFieldNamingStrategy())
.registerTypeAdapterFactory(new CpcdpTypeAdapterFactory())
.registerTypeAdapter(DistressCaseDetail[].class, new DistressCaseDetailSerializer())
.registerTypeAdapter(NstemiGraceEstimate[].class, new NstemiGraceEstimateSerializer())
.registerTypeAdapter(NstemiGraceHrCondition[].class, new NstemiGraceHrConditionSerializer())
.setDateFormat(DEFAULT_DATA_FORMAT_PATTERN);
if (ENABLED_PRETTY) {
builder.setPrettyPrinting();
}
gson = builder.create();
}
public static String toJson(Object src) {
return toJson(src, src.getClass());
}
/**
* This method serializes the specified object, including those of generic types, into its
* equivalent Json representation. This method must be used if the specified object is a generic
* type. For non-generic objects, use {@link #toJson(Object)} instead.
*
* @param src the object for which JSON representation is to be created
* @param typeOfSrc The specific genericized type of src. You can obtain this type by using the
* {@link com.google.gson.reflect.TypeToken} class. For example, to get the type for {@code
* Collection<Foo>}, you should use:
* <pre>
* Type typeOfSrc = new TypeToken<Collection<Foo>>(){}.getType();
* </pre>
*
* @return Json representation of {@code src}
*/
public static String toJson(Object src, Type typeOfSrc) {
// Check @Condition & @Required & @AllowValues & @ComplexCondition
Field[] fields = src.getClass().getDeclaredFields();
Map<String, Field> fieldsMap = Maps.newConcurrentMap();
Stream.of(fields).parallel().forEach(field -> fieldsMap.put(field.getName(), field));
try {
for (Field field : fields) {
validate(fieldsMap, field, src);
}
} catch (InvalidBeanParameterException e) {
throw new CpcdpException(e.getMessage(), e);
} catch (Exception e) {
throw new CpcdpException("校验异常", e);
}
return gson.toJson(src, typeOfSrc);
}
private static void validate(Map<String, Field> fieldsMap, Field field, Object instance)
throws InvalidBeanParameterException {
if (log.isDebugEnabled()) {
log.debug("------------------------------------------");
log.debug("Field : {}" , field.getName());
}
boolean required = field.isAnnotationPresent(Required.class);
boolean allowValues = field.isAnnotationPresent(AllowValues.class);
boolean condition = field.isAnnotationPresent(Condition.class);
boolean conditions = field.isAnnotationPresent(Conditions.class);
boolean complexCondition = field.isAnnotationPresent(ComplexCondition.class);
// Check Required
if (required) {
Object value = Reflections.getFieldValue(instance, field.getName());
if (value == null) {
if (condition || conditions || complexCondition) {
// empty biz
} else {
throw new InvalidBeanParameterException("属性: <" + field.getName() + "> 不能为空.");
}
} else {
if (allowValues) {
AllowValues allows = field.getAnnotation(AllowValues.class);
Set<String> definedAllowValues = Sets.newHashSet(allows.value());
String message = allows.message();
if (!definedAllowValues.contains(value.toString())) {
throw new InvalidBeanParameterException("属性: <" + field.getName() + "> 取值范围: " + (Strings.isNullOrEmpty(message) ? Arrays.toString(definedAllowValues.toArray()) : message));
}
}
}
if (condition || conditions || complexCondition) {
// Check Condition(s)
processConditions(fieldsMap, field, instance);
}
}
if (log.isDebugEnabled()) {
log.debug("{}, {}, {}", field, instance, fieldsMap);
}
}
@SuppressWarnings("DuplicatedCode")
private static void processConditions(
Map<String, Field> fieldsMap, Field field, Object instance) throws InvalidBeanParameterException{
boolean condition = field.isAnnotationPresent(Condition.class);
boolean conditions = field.isAnnotationPresent(Conditions.class);
boolean complexCondition = field.isAnnotationPresent(ComplexCondition.class);
// process @Condition
if(condition) {
Condition conditionAnnotation = field.getAnnotation(Condition.class);
if(isConditionMatch(conditionAnnotation,fieldsMap,field,instance)){
Object value = Reflections.getFieldValue(instance, field.getName());
if(value == null) {
throw new InvalidBeanParameterException("属性: <" + field.getName() + "> 不能为空.");
}
}
}
// process @Conditions
if(conditions) {
Conditions conditionsAnnotation = field.getAnnotation(Conditions.class);
Condition[] conditionsArray = conditionsAnnotation.value();
List<Boolean> result = Lists.newArrayList();
for (Condition temp : conditionsArray) {
result.add(isConditionMatch(temp,fieldsMap,field,instance));
}
if(!result.contains(Boolean.FALSE)) {
Object value = Reflections.getFieldValue(instance, field.getName());
if(value == null) {
throw new InvalidBeanParameterException("属性: <" + field.getName() + "> 不能为空.");
}
}
}
// process @ComplexCondition
if(complexCondition) {
ComplexCondition complexConditionAnnotation = field.getAnnotation(ComplexCondition.class);
Conditions[] conditionsArray = complexConditionAnnotation.value();
ComplexCondition.Symbol symbol = complexConditionAnnotation.symbol();
List<Boolean> result = Lists.newArrayList();
for (Conditions temp : conditionsArray) {
result.add(isConditionsMatch(temp,fieldsMap,field,instance));
}
switch (symbol) {
case OR:
if(result.contains(Boolean.TRUE)) {
Object value = Reflections.getFieldValue(instance, field.getName());
if(value == null) {
throw new InvalidBeanParameterException("属性: <" + field.getName() + "> 不能为空.");
}
}
break;
case AND:
if(!result.contains(Boolean.FALSE)) {
Object value = Reflections.getFieldValue(instance, field.getName());
if(value == null) {
throw new InvalidBeanParameterException("属性: <" + field.getName() + "> 不能为空.");
}
}
break;
default:
break;
}
}
}
/**
* Check is {@link Conditions} matched
*
* @param conditionsAnnotation instance of {@link Conditions}
* @param fieldsMap object field(s) map cache
* @param field instance of object's {@link Field}
* @param instance object instance
* @return matched return true , otherwise return false
*/
private static boolean isConditionsMatch(Conditions conditionsAnnotation, Map<String, Field> fieldsMap, Field field, Object instance) {
Condition[] conditionsArray = conditionsAnnotation.value();
List<Boolean> result = Lists.newArrayList();
for (Condition temp : conditionsArray) {
result.add(isConditionMatch(temp,fieldsMap,field,instance));
}
return !result.contains(Boolean.FALSE);
}
/**
* Check is {@link Condition} matched
*
* @param conditionAnnotation instance of {@link Condition}
* @param fieldsMap object field(s) map cache
* @param field instance of object's {@link Field}
* @param instance object instance
* @return matched return true , otherwise return false
*/
@SuppressWarnings({"DuplicatedCode", "AlibabaMethodTooLong"})
private static boolean isConditionMatch(Condition conditionAnnotation, Map<String, Field> fieldsMap, Field field, Object instance) {
String fieldName = conditionAnnotation.field();
Set<String> expectValues = Sets.newHashSet(conditionAnnotation.expectValue());
Class clazz = conditionAnnotation.type();
boolean isCpcEnum = conditionAnnotation.isCpcEnum();
Class typeClass = conditionAnnotation.type();
Condition.MatchingStrategy strategy = conditionAnnotation.strategy();
String expectFieldName = conditionAnnotation.field();
Object expectFieldOriginValue = Reflections.getFieldValue(instance,fieldName);
Object expectFieldRealValue = expectFieldOriginValue;
if(isCpcEnum && expectFieldOriginValue != null) {
expectFieldRealValue = Reflections.invokeMethod(expectFieldOriginValue,CPC_ENUM_KEY_METHOD_NAME,null,null);
}
Field expectField = fieldsMap.get(expectFieldName);
boolean condition = expectField.isAnnotationPresent(Condition.class);
boolean conditions = expectField.isAnnotationPresent(Conditions.class);
boolean complexCondition = expectField.isAnnotationPresent(ComplexCondition.class);
// recursion check
if(fieldsMap.containsKey(expectFieldName)){
if(condition || conditions || complexCondition) {
// Matching Strategy Check
switch (strategy) {
case ANY_VALUE_WITHIN_ENUMS_ARRAY:
Object[] anyValueWithinEnumsArraysValues = (Object[]) Reflections.getFieldValue(instance,fieldName);
if(anyValueWithinEnumsArraysValues == null || anyValueWithinEnumsArraysValues.length == 0) {
return false;
}
break;
case DEFAULT:
default:
if(expectFieldRealValue != null && !expectValues.contains(expectFieldRealValue.toString())) {
return false;
}
break;
}
if(condition) {
Condition f0 = expectField.getAnnotation(Condition.class);
boolean match = isConditionMatch(f0,fieldsMap,expectField,instance);
if(match) {
Object value = Reflections.getFieldValue(instance, expectField.getName());
if(value == null) {
throw new InvalidBeanParameterException("属性: <" + expectField.getName() + "> 不能为空.");
}
}
}
if(conditions) {
Conditions conditionsAnnotation = expectField.getAnnotation(Conditions.class);
Condition[] conditionsArray = conditionsAnnotation.value();
List<Boolean> result = Lists.newArrayList();
for (Condition temp : conditionsArray) {
result.add(isConditionMatch(temp,fieldsMap,expectField,instance));
}
if(!result.contains(Boolean.FALSE)) {
Object value = Reflections.getFieldValue(instance, expectField.getName());
if(value == null) {
throw new InvalidBeanParameterException("属性: <" + expectField.getName() + "> 不能为空.");
}
}
}
if(complexCondition) {
ComplexCondition complexConditionAnnotation = expectField.getAnnotation(ComplexCondition.class);
Conditions[] conditionsArray = complexConditionAnnotation.value();
ComplexCondition.Symbol symbol = complexConditionAnnotation.symbol();
List<Boolean> result = Lists.newArrayList();
for (Conditions temp : conditionsArray) {
result.add(isConditionsMatch(temp,fieldsMap,expectField,instance));
}
switch (symbol) {
case OR:
if(result.contains(Boolean.TRUE)) {
Object value = Reflections.getFieldValue(instance, expectField.getName());
if(value == null) {
throw new InvalidBeanParameterException("属性: <" + expectField.getName() + "> 不能为空.");
}
}
break;
case AND:
if(!result.contains(Boolean.FALSE)) {
Object value = Reflections.getFieldValue(instance, expectField.getName());
if(value == null) {
throw new InvalidBeanParameterException("属性: <" + expectField.getName() + "> 不能为空.");
}
}
break;
default:
break;
}
}
}
}
Assert.notNull(expectFieldRealValue,"条件属性: <" + fieldName + "> 值不能为空.");
if(log.isDebugEnabled()) {
log.debug("Condition V: {} | {}, {}, {}, {}, {} ,{}", field.getName(), fieldName, expectValues, isCpcEnum, clazz, typeClass, strategy);
}
//
switch (strategy) {
case ANY_VALUE_WITHIN_ENUMS_ARRAY:
Object[] anyValueWithinEnumsArraysValues = (Object[]) Reflections.getFieldValue(instance, fieldName);
return anyValueWithinEnumsArraysValues != null && anyValueWithinEnumsArraysValues.length > 0;
case DEFAULT:
default:
return expectValues.contains(expectFieldRealValue.toString());
}
}
public <T> T fromJson(String json, Class<T> classOfT) throws JsonSyntaxException {
return gson.fromJson(json, classOfT);
}
/**
* {@link InvalidBeanParameterException}
*
* @author <a href="mailto:dycjh@example.com">Elve.Xu</a>
* @version ${project.version} - 2019/11/8.
*/
public static class InvalidBeanParameterException extends RuntimeException {
public InvalidBeanParameterException(String message) {
super(message);
}
}
}
|
3e00af510e1c998f114c712be0cde363bab00ff6 | 1,982 | java | Java | app/models/Genre.java | RyanMolyneux/AportalCollege2ndYear | 674afb3d7acf48dd95b53bea0d999a75697a2648 | [
"Apache-2.0"
] | null | null | null | app/models/Genre.java | RyanMolyneux/AportalCollege2ndYear | 674afb3d7acf48dd95b53bea0d999a75697a2648 | [
"Apache-2.0"
] | null | null | null | app/models/Genre.java | RyanMolyneux/AportalCollege2ndYear | 674afb3d7acf48dd95b53bea0d999a75697a2648 | [
"Apache-2.0"
] | null | null | null | 22.522727 | 80 | 0.610999 | 273 | package models;
import java.util.*;
import javax.persistence.*;
import com.avaje.ebean.Model;
import play.data.validation.*;
@Entity
public class Genre extends Model{
@Id
private Long genre_ID;
@Constraints.Required
private String genre;
@ManyToMany(cascade = CascadeType.ALL)
private List<Media> media;
public Genre() {
}
public Genre(Long genre_ID, String genre, List<Media> media) {
this.setGenre_ID(genre_ID);
this.setGenre(genre);
this.setMedia(media);
}
public static Boolean inGenre(Long gen,Long med)
{
return find.where().eq("media.id", med).eq("id",gen).findRowCount()>0;
}
public static Finder<Long,Genre> find = new Finder<Long,Genre>(Genre.class);
//Find all Products in the database in ascending order by name
public static List<Genre> findAll() {
return Genre.find.where().orderBy("genre asc").findList();
}
public static Map<String,String> options() {
LinkedHashMap<String,String> options = new LinkedHashMap<>();
// Get all categories from the DB and add to the options Hash map
for(Genre g: Genre.findAll()) {
options.put(g.getGenre_ID().toString(), g.getGenre());
}
return options;
}
public Long getGenre_ID() {
return genre_ID;
}
public void setGenre_ID(Long genre_ID) {
this.genre_ID = genre_ID;
}
public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public List<Media> getMedia() {
return media;
}
public void setMedia(List<Media> media) {
this.media = media;
}
public static List getGenConv(List<Long> genSelect)
{
List<Genre> genres = new ArrayList<Genre>();
for(int i=0;i<genSelect.size();i++)
{
genres.add(find.byId(genSelect.get(i)));
}
return genres;
}
}
|
3e00b1a875aad39159f9543ca3f62f83a4a5628d | 292 | java | Java | src/com/barclays/fsd/training/App.java | vamandeshmukh/Barclays-FSD | 0e5dba615d8422f51e73ebe743317bf22533e341 | [
"MIT"
] | null | null | null | src/com/barclays/fsd/training/App.java | vamandeshmukh/Barclays-FSD | 0e5dba615d8422f51e73ebe743317bf22533e341 | [
"MIT"
] | null | null | null | src/com/barclays/fsd/training/App.java | vamandeshmukh/Barclays-FSD | 0e5dba615d8422f51e73ebe743317bf22533e341 | [
"MIT"
] | null | null | null | 19.466667 | 41 | 0.722603 | 274 | package com.barclays.fsd.training;
import com.barclays.fsd.learning.Delete;
public class App {
public static void main(String[] args) {
System.out.println(Delete.num1);
// System.out.println(Delete.num2);
// System.out.println(Delete.num3);
// System.out.println(Delete.num4);
}
}
|
3e00b26375bbba311b5eaf41b735c1658edc9dd1 | 557 | java | Java | core/src/main/java/net/atinu/jailcall/javadsl/JailcallExecutionException.java | tobnee/akka-defender | e9aca0c690785c3e78066eb2ddf7ccbc045ec3c9 | [
"Apache-2.0"
] | 14 | 2016-04-05T09:48:16.000Z | 2016-05-13T14:51:29.000Z | core/src/main/java/net/atinu/jailcall/javadsl/JailcallExecutionException.java | tobnee/akka-defender | e9aca0c690785c3e78066eb2ddf7ccbc045ec3c9 | [
"Apache-2.0"
] | 5 | 2015-12-26T18:30:41.000Z | 2015-12-30T15:25:46.000Z | core/src/main/java/net/atinu/jailcall/javadsl/JailcallExecutionException.java | tobnee/akka-defender | e9aca0c690785c3e78066eb2ddf7ccbc045ec3c9 | [
"Apache-2.0"
] | null | null | null | 26.52381 | 93 | 0.771993 | 275 | package net.atinu.jailcall.javadsl;
import akka.actor.ActorRef;
import net.atinu.jailcall.common.BaseJailcallExecutionException;
import java.util.Optional;
public class JailcallExecutionException extends BaseJailcallExecutionException {
private final Optional<ActorRef> originalSender;
public JailcallExecutionException(Throwable failure, Optional<ActorRef> originalSender) {
super(failure);
this.originalSender = originalSender;
}
public Optional<ActorRef> getOriginalSender() {
return originalSender;
}
}
|
3e00b283df74d26f886188f96037a7c00adcaf9e | 9,414 | java | Java | logica_sim_mod/com/logica/smscsim/util/Table.java | cilt-uct/sms-utils | fc98dff460893781b86880dbc840468823699804 | [
"ECL-2.0"
] | null | null | null | logica_sim_mod/com/logica/smscsim/util/Table.java | cilt-uct/sms-utils | fc98dff460893781b86880dbc840468823699804 | [
"ECL-2.0"
] | null | null | null | logica_sim_mod/com/logica/smscsim/util/Table.java | cilt-uct/sms-utils | fc98dff460893781b86880dbc840468823699804 | [
"ECL-2.0"
] | 1 | 2020-06-18T11:57:08.000Z | 2020-06-18T11:57:08.000Z | 30.865574 | 79 | 0.63873 | 276 | /*
* Copyright (c) 1996-2001
* Logica Mobile Networks Limited
* All rights reserved.
*
* This software is distributed under Logica Open Source License Version 1.0
* ("Licence Agreement"). You shall use it and distribute only in accordance
* with the terms of the License Agreement.
*
*/
package com.logica.smscsim.util;
import java.util.List;
import java.util.LinkedList;
import java.util.ListIterator;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
/**
* Represents table of <code>Record</code>s. Users can add,
* search, replace and remove records as well as read table from
* file and write it to a file. Different records in the table can have
* different attributes, however if the search for record with certain
* value of given attribute is required, then the attribute must be present
* in all the records. Single attribute search is supported, i.e. if
* the key is naturally represented by more than one attribute,
* there must be an attribute which contains bothe the attributes in some way.
* <p>
* The table can be read and written from and to input and output stream using
* an implementation of <code>TableParser</code> class.
*
* @author Logica Mobile Networks SMPP Open Source Team
* @version 1.0, 10 Jul 2001
* @see Record
* @see Attribute
* @see TableParser
* @see BasicTableParser
*/
public class Table
{
/**
* Holds all records currently present in the table.
*/
private List records;
/**
* The name (path) of the file to load the records from.
* Re-user in <code>reload</code> function.
* @see #read(String)
* @see #reload()
*/
private String fileName;
/**
* Constructs an empty table.
*/
public Table()
{
fileName = null;
records = new LinkedList();
}
/**
* Constructs a table by reading it from the disk file.
* For parsin of the table data read from the file uses parser
* returned by method <code>getParser</code>.
* @see #getParser()
* @see TableParser
* @see BasicTableParser
*/
public Table(String fileName)
throws FileNotFoundException,IOException
{
this.fileName = fileName;
read(fileName);
}
/**
* Adds one record to the table. No checking on duplicates is
* performed as the name of the key attribute is not provided.
* @param record the record to add
*/
public synchronized void add(Record record)
{
records.add(record);
}
/**
* Adds one record to the table. The checking on duplicates is
* performed; if a record with the same key is already present in the
* table, it's replaced with this record. Order of the records isn't
* ensured.
* @param record the record to add
* @param key the key attribute for checking the uniquenes
* @see #replace(Record,Attribute)
*/
public synchronized void add(Record record, Attribute key)
{
replace(record,key);
}
/**
* Replaces a record with the given attribute with the provided record.
* If no record with the same attribute is present in the table,
* the provided record is added to the table.
* @param record the record which replaces the existing record
* @param key the key attribute for finding the record in the table
*/
public synchronized void replace(Record record, Attribute oldKey)
{
Record old = find(oldKey);
if (old != null) {
remove(oldKey);
}
add(record);
}
/**
* Returns a record whose one of the attributes matches to
* the provided attribute. If none found, returns null.
* @param key the attribute used for matching
* @result the found record
*/
public synchronized Record find(Attribute key)
{
if (key != null) {
return find(key.getName(),key.getValue());
} else {
return null;
}
}
/**
* Returns record which contains an attribute with the same name
* as provided equal to the value as provided. If none found, returns null.
* The comparison of the value is case sensitive.
* @param name the name of attribute to check
* @param value the required value of the attribute
* @return the found record
*/
public synchronized Record find(String name, String value)
{
Record current;
String currKeyValue;
ListIterator iter = records.listIterator(0);
while (iter.hasNext()) {
current = (Record)iter.next();
currKeyValue = current.getValue(name);
if ((currKeyValue != null) && (currKeyValue.equals(value))) {
return current;
}
}
return null;
}
/**
* Removes a record whose one attribute matches to the given attribute.
* Nothing will happen if none is found.
* @param key the attribute used for matching
*/
public synchronized void remove(Attribute key)
{
remove(key.getName(),key.getValue());
}
/**
* Removes a record whose attribute with the same key as provided
* is equal to the provided value. Nothing will happen if none is found.
* @param key the name of the key attribute
* @param value the required value of the key attribute
*/
public synchronized void remove(String key, String value)
{
Record toRemove = find(key,value);
if (toRemove != null) {
records.remove(toRemove);
}
}
/**
* Returns count of records currently present in the table.
* @return the count of the records
* @see #get(int)
*/
public int count() { return records.size(); }
/**
* Returns a record on the given position. Useful for listing of all
* records from the table. Records are numbered from <code>0</code>
* to <code>count()-1</code>.
* @param i the index of the record to return
* @return the record on the given position
* @see #count()
*/
public Record get(int i) { return (Record)records.get(i); }
/**
* Loads the table from the disk file. For parsing the file
* uses <code>TableParser</code> implementation returned by
* <code>getParser</code>.
* @param fileName the name of the file with the table data
* @see #read(InputStream)
* @see #write(String)
* @see #getParser()
* @see BasicTableParser
* @see TableParser
*/
public synchronized void read(String fileName)
throws FileNotFoundException,IOException
{
FileInputStream is = new FileInputStream(fileName);
records = new LinkedList(); // clear current list of records
read(is);
is.close();
}
/**
* Loads the table from the input stream. For parsing the file
* uses <code>TableParser</code> implementation returned by
* <code>getParser</code>.
* @param is the input stream with the data
* @see #write(OutputStream)
* @see #getParser()
* @see BasicTableParser
* @see TableParser
*/
public synchronized void read(InputStream is)
throws IOException
{
TableParser parser = getParser();
parser.parse(is);
}
/**
* Re-reads the table from disk file as set up by constructor.
* @see #Table(String)
* @see #read(String)
*/
public synchronized void reload()
throws IOException
{
read(fileName);
}
/**
* Writes table data to the disk file. For composing the data
* uses <code>TableParser</code> implementation returned by
* <code>getParser</code>. The contents of the file is deleted
* before writing.
* @param fileName the name of file to write the data to
* @see #write(OutputStream)
* @see #read(String)
* @see #getParser()
* @see BasicTableParser
* @see TableParser
*/
public synchronized void write(String fileName)
throws FileNotFoundException,IOException
{
FileOutputStream os = new FileOutputStream(fileName);
write(os);
os.close();
}
/**
* Writes table data to the oputput stream. For composing the data
* uses <code>TableParser</code> implementation returned by
* <code>getParser</code>.
* @param os the output stream to write the data to
* @see #write(String)
* @see #read(InputStream)
* @see #getParser()
* @see BasicTableParser
* @see TableParser
*/
public synchronized void write(OutputStream os)
throws IOException
{
TableParser parser = getParser();
parser.compose(os);
}
/**
* Returns parser to use for parsing and composing table data form
* and to input and output stream. By default returns instance
* of <code>BasicTableParser</code>. If necessary, another implemantation
* of <code>TableParser</code> can be created and used.
* @return the parser to use for reading and writting of the table data
* @see TableParser
* @see BasicTableParser
*/
public TableParser getParser()
{
return new BasicTableParser(this);
}
}
|
3e00b2b49ed1823db1516099b2dc9c0123b09eb2 | 1,409 | java | Java | jpa/src/test/java/com/evanzeimet/queryinfo/jpa/result/DefaultTupleToPojoQueryInfoResultConverterTest.java | podnov/QueryInfo | d1885b4724d4415002582a30adf48f5397653c02 | [
"Apache-2.0"
] | 1 | 2020-02-24T08:55:15.000Z | 2020-02-24T08:55:15.000Z | jpa/src/test/java/com/evanzeimet/queryinfo/jpa/result/DefaultTupleToPojoQueryInfoResultConverterTest.java | podnov/QueryInfo | d1885b4724d4415002582a30adf48f5397653c02 | [
"Apache-2.0"
] | 3 | 2016-06-09T12:52:34.000Z | 2017-04-25T14:18:20.000Z | jpa/src/test/java/com/evanzeimet/queryinfo/jpa/result/DefaultTupleToPojoQueryInfoResultConverterTest.java | podnov/query-info | d1885b4724d4415002582a30adf48f5397653c02 | [
"Apache-2.0"
] | 1 | 2020-02-24T08:55:17.000Z | 2020-02-24T08:55:17.000Z | 28.755102 | 137 | 0.763662 | 277 | package com.evanzeimet.queryinfo.jpa.result;
/*
* #%L
* queryinfo-jpa
* $Id:$
* $HeadURL:$
* %%
* Copyright (C) 2015 - 2016 Evan Zeimet
* %%
* 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.
* #L%
*/
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import org.junit.Test;
import com.evanzeimet.queryinfo.jpa.result.DefaultTupleToPojoQueryInfoResultConverter.DefaultBaseInstanceFactory;
public class DefaultTupleToPojoQueryInfoResultConverterTest {
@Test
public void DefaultBaseInstanceFactory_create() {
DefaultBaseInstanceFactory<Person> factory = new DefaultTupleToPojoQueryInfoResultConverter.DefaultBaseInstanceFactory<>(Person.class);
Person actual = factory.create();
assertNotNull(actual);
assertThat(actual, instanceOf(Person.class));
}
protected static class Person {
}
}
|
3e00b30dd7c011b08be6d49a2068db16cf58f0ce | 1,308 | java | Java | src/test/java/org/hzero/iam/util/UserLogin.java | yang-zhang99/hzero-iam | d20548e100b32d7df52381cf294a5f82bad69e74 | [
"Apache-2.0"
] | 8 | 2020-10-22T13:34:01.000Z | 2021-04-14T03:13:23.000Z | src/test/java/org/hzero/iam/util/UserLogin.java | yang-zhang99/hzero-iam | d20548e100b32d7df52381cf294a5f82bad69e74 | [
"Apache-2.0"
] | null | null | null | src/test/java/org/hzero/iam/util/UserLogin.java | yang-zhang99/hzero-iam | d20548e100b32d7df52381cf294a5f82bad69e74 | [
"Apache-2.0"
] | 17 | 2020-09-23T07:57:44.000Z | 2022-01-05T14:40:28.000Z | 31.190476 | 102 | 0.730534 | 278 | package org.hzero.iam.util;
import java.util.Collections;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
import io.choerodon.core.oauth.CustomUserDetails;
import org.hzero.iam.domain.entity.User;
/**
* 模拟用户登录工具
*
* @author bojiangzhou 2018/07/12
*/
public class UserLogin {
/**
* 模拟登陆
*
* @param loginName 登录名
* @param userId 用户ID
* @param organizationId 租户ID
*/
public static void login(String loginName, Long userId, Long organizationId) {
CustomUserDetails details = new CustomUserDetails(loginName, "", Collections.emptyList());
details.setUserId(userId);
details.setLanguage(User.DEFAULT_LANGUAGE);
details.setTimeZone(User.DEFAULT_TIME_ZONE);
details.setEmail("efpyi@example.com");
details.setOrganizationId(organizationId);
AbstractAuthenticationToken authentication =
new UsernamePasswordAuthenticationToken(details, "", Collections.emptyList());
authentication.setDetails(details);
SecurityContextHolder.getContext().setAuthentication(authentication);
}
}
|
3e00b3812aa0607396c328bf6d3f1662be3884dd | 12,076 | java | Java | src/main/java/com/gitblit/git/ReceiveHook.java | warpfork/gitblit | 6243f34ba694c384d7fd7d8b87f59742b013241b | [
"Apache-2.0"
] | 1 | 2017-11-29T00:55:32.000Z | 2017-11-29T00:55:32.000Z | src/main/java/com/gitblit/git/ReceiveHook.java | warpfork/gitblit | 6243f34ba694c384d7fd7d8b87f59742b013241b | [
"Apache-2.0"
] | null | null | null | src/main/java/com/gitblit/git/ReceiveHook.java | warpfork/gitblit | 6243f34ba694c384d7fd7d8b87f59742b013241b | [
"Apache-2.0"
] | null | null | null | 37.042945 | 281 | 0.681931 | 279 | /*
* Copyright 2011 gitblit.com.
*
* 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.gitblit.git;
import groovy.lang.Binding;
import groovy.util.GroovyScriptEngine;
import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.transport.PostReceiveHook;
import org.eclipse.jgit.transport.PreReceiveHook;
import org.eclipse.jgit.transport.ReceiveCommand;
import org.eclipse.jgit.transport.ReceiveCommand.Result;
import org.eclipse.jgit.transport.ReceivePack;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.gitblit.Constants.AccessRestrictionType;
import com.gitblit.GitBlit;
import com.gitblit.Keys;
import com.gitblit.client.Translation;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
import com.gitblit.utils.ArrayUtils;
import com.gitblit.utils.ClientLogger;
import com.gitblit.utils.JGitUtils;
import com.gitblit.utils.PushLogUtils;
import com.gitblit.utils.StringUtils;
/**
* The Gitblit receive hook allows for special processing on push events.
* That might include rejecting writes to specific branches or executing a
* script.
*
* @author James Moger
*
*/
public class ReceiveHook implements PreReceiveHook, PostReceiveHook {
protected final Logger logger = LoggerFactory.getLogger(ReceiveHook.class);
protected UserModel user;
protected RepositoryModel repository;
protected String gitblitUrl;
private GroovyScriptEngine gse;
private File groovyDir;
public ReceiveHook() {
groovyDir = GitBlit.getGroovyScriptsFolder();
try {
// set Grape root
File grapeRoot = GitBlit.getFileOrFolder(Keys.groovy.grapeFolder, "${baseFolder}/groovy/grape").getAbsoluteFile();
grapeRoot.mkdirs();
System.setProperty("grape.root", grapeRoot.getAbsolutePath());
gse = new GroovyScriptEngine(groovyDir.getAbsolutePath());
} catch (IOException e) {
//throw new ServletException("Failed to instantiate Groovy Script Engine!", e);
}
}
/**
* Instrumentation point where the incoming push event has been parsed,
* validated, objects created BUT refs have not been updated. You might
* use this to enforce a branch-write permissions model.
*/
@Override
public void onPreReceive(ReceivePack rp, Collection<ReceiveCommand> commands) {
if (repository.isFrozen) {
// repository is frozen/readonly
String reason = MessageFormat.format("Gitblit does not allow pushes to \"{0}\" because it is frozen!", repository.name);
logger.warn(reason);
for (ReceiveCommand cmd : commands) {
cmd.setResult(Result.REJECTED_OTHER_REASON, reason);
}
return;
}
if (!repository.isBare) {
// repository has a working copy
String reason = MessageFormat.format("Gitblit does not allow pushes to \"{0}\" because it has a working copy!", repository.name);
logger.warn(reason);
for (ReceiveCommand cmd : commands) {
cmd.setResult(Result.REJECTED_OTHER_REASON, reason);
}
return;
}
if (!user.canPush(repository)) {
// user does not have push permissions
String reason = MessageFormat.format("User \"{0}\" does not have push permissions for \"{1}\"!", user.username, repository.name);
logger.warn(reason);
for (ReceiveCommand cmd : commands) {
cmd.setResult(Result.REJECTED_OTHER_REASON, reason);
}
return;
}
if (repository.accessRestriction.atLeast(AccessRestrictionType.PUSH) && repository.verifyCommitter) {
// enforce committer verification
if (StringUtils.isEmpty(user.emailAddress)) {
// emit warning if user does not have an email address
logger.warn(MessageFormat.format("Consider setting an email address for {0} ({1}) to improve committer verification.", user.getDisplayName(), user.username));
}
// Optionally enforce that the committer of the left parent chain
// match the account being used to push the commits.
//
// This requires all merge commits are executed with the "--no-ff"
// option to force a merge commit even if fast-forward is possible.
// This ensures that the chain of left parents has the commit
// identity of the merging user.
boolean allRejected = false;
for (ReceiveCommand cmd : commands) {
try {
List<RevCommit> commits = JGitUtils.getRevLog(rp.getRepository(), cmd.getOldId().name(), cmd.getNewId().name());
for (RevCommit commit : commits) {
PersonIdent committer = commit.getCommitterIdent();
if (!user.is(committer.getName(), committer.getEmailAddress())) {
String reason;
if (StringUtils.isEmpty(user.emailAddress)) {
// account does not have en email address
reason = MessageFormat.format("{0} by {1} <{2}> was not committed by {3} ({4})", commit.getId().name(), committer.getName(), StringUtils.isEmpty(committer.getEmailAddress()) ? "?":committer.getEmailAddress(), user.getDisplayName(), user.username);
} else {
// account has an email address
reason = MessageFormat.format("{0} by {1} <{2}> was not committed by {3} ({4}) <{5}>", commit.getId().name(), committer.getName(), StringUtils.isEmpty(committer.getEmailAddress()) ? "?":committer.getEmailAddress(), user.getDisplayName(), user.username, user.emailAddress);
}
logger.warn(reason);
cmd.setResult(Result.REJECTED_OTHER_REASON, reason);
allRejected &= true;
break;
} else {
allRejected = false;
}
}
} catch (Exception e) {
logger.error("Failed to verify commits were made by pushing user", e);
}
}
if (allRejected) {
// all ref updates rejected, abort
return;
}
}
Set<String> scripts = new LinkedHashSet<String>();
scripts.addAll(GitBlit.self().getPreReceiveScriptsInherited(repository));
if (!ArrayUtils.isEmpty(repository.preReceiveScripts)) {
scripts.addAll(repository.preReceiveScripts);
}
runGroovy(repository, user, commands, rp, scripts);
for (ReceiveCommand cmd : commands) {
if (!Result.NOT_ATTEMPTED.equals(cmd.getResult())) {
logger.warn(MessageFormat.format("{0} {1} because \"{2}\"", cmd.getNewId()
.getName(), cmd.getResult(), cmd.getMessage()));
}
}
}
/**
* Instrumentation point where the incoming push has been applied to the
* repository. This is the point where we would trigger a Jenkins build
* or send an email.
*/
@Override
public void onPostReceive(ReceivePack rp, Collection<ReceiveCommand> commands) {
if (commands.size() == 0) {
logger.debug("skipping post-receive hooks, no refs created, updated, or removed");
return;
}
// log ref changes
for (ReceiveCommand cmd : commands) {
if (Result.OK.equals(cmd.getResult())) {
// add some logging for important ref changes
switch (cmd.getType()) {
case DELETE:
logger.info(MessageFormat.format("{0} DELETED {1} in {2} ({3})", user.username, cmd.getRefName(), repository.name, cmd.getOldId().name()));
break;
case CREATE:
logger.info(MessageFormat.format("{0} CREATED {1} in {2}", user.username, cmd.getRefName(), repository.name));
break;
case UPDATE:
logger.info(MessageFormat.format("{0} UPDATED {1} in {2} (from {3} to {4})", user.username, cmd.getRefName(), repository.name, cmd.getOldId().name(), cmd.getNewId().name()));
break;
case UPDATE_NONFASTFORWARD:
logger.info(MessageFormat.format("{0} UPDATED NON-FAST-FORWARD {1} in {2} (from {3} to {4})", user.username, cmd.getRefName(), repository.name, cmd.getOldId().name(), cmd.getNewId().name()));
break;
default:
break;
}
}
}
if (repository.useIncrementalPushTags) {
// tag each pushed branch tip
String emailAddress = user.emailAddress == null ? rp.getRefLogIdent().getEmailAddress() : user.emailAddress;
PersonIdent userIdent = new PersonIdent(user.getDisplayName(), emailAddress);
for (ReceiveCommand cmd : commands) {
if (!cmd.getRefName().startsWith("refs/heads/")) {
// only tag branch ref changes
continue;
}
if (!ReceiveCommand.Type.DELETE.equals(cmd.getType())
&& ReceiveCommand.Result.OK.equals(cmd.getResult())) {
String objectId = cmd.getNewId().getName();
String branch = cmd.getRefName().substring("refs/heads/".length());
// get translation based on the server's locale setting
String template = Translation.get("gb.incrementalPushTagMessage");
String msg = MessageFormat.format(template, branch);
String prefix;
if (StringUtils.isEmpty(repository.incrementalPushTagPrefix)) {
prefix = GitBlit.getString(Keys.git.defaultIncrementalPushTagPrefix, "r");
} else {
prefix = repository.incrementalPushTagPrefix;
}
JGitUtils.createIncrementalRevisionTag(
rp.getRepository(),
objectId,
userIdent,
prefix,
"0",
msg);
}
}
}
// update push log
try {
PushLogUtils.updatePushLog(user, rp.getRepository(), commands);
logger.debug(MessageFormat.format("{0} push log updated", repository.name));
} catch (Exception e) {
logger.error(MessageFormat.format("Failed to update {0} pushlog", repository.name), e);
}
// run Groovy hook scripts
Set<String> scripts = new LinkedHashSet<String>();
scripts.addAll(GitBlit.self().getPostReceiveScriptsInherited(repository));
if (!ArrayUtils.isEmpty(repository.postReceiveScripts)) {
scripts.addAll(repository.postReceiveScripts);
}
runGroovy(repository, user, commands, rp, scripts);
}
/**
* Runs the specified Groovy hook scripts.
*
* @param repository
* @param user
* @param commands
* @param scripts
*/
protected void runGroovy(RepositoryModel repository, UserModel user,
Collection<ReceiveCommand> commands, ReceivePack rp, Set<String> scripts) {
if (scripts == null || scripts.size() == 0) {
// no Groovy scripts to execute
return;
}
Binding binding = new Binding();
binding.setVariable("gitblit", GitBlit.self());
binding.setVariable("repository", repository);
binding.setVariable("receivePack", rp);
binding.setVariable("user", user);
binding.setVariable("commands", commands);
binding.setVariable("url", gitblitUrl);
binding.setVariable("logger", logger);
binding.setVariable("clientLogger", new ClientLogger(rp));
for (String script : scripts) {
if (StringUtils.isEmpty(script)) {
continue;
}
// allow script to be specified without .groovy extension
// this is easier to read in the settings
File file = new File(groovyDir, script);
if (!file.exists() && !script.toLowerCase().endsWith(".groovy")) {
file = new File(groovyDir, script + ".groovy");
if (file.exists()) {
script = file.getName();
}
}
try {
Object result = gse.run(script, binding);
if (result instanceof Boolean) {
if (!((Boolean) result)) {
logger.error(MessageFormat.format(
"Groovy script {0} has failed! Hook scripts aborted.", script));
break;
}
}
} catch (Exception e) {
logger.error(
MessageFormat.format("Failed to execute Groovy script {0}", script), e);
}
}
}
} |
3e00b4adc206fab5b8985359653fdbc9cf22f94a | 8,977 | java | Java | org/openxmlformats/schemas/spreadsheetml/x2006/main/impl/CTHyperlinkImpl.java | AlhonGelios/AO | 3e78fefe875ab102016e1259874886970e3c5c2a | [
"Apache-2.0"
] | null | null | null | org/openxmlformats/schemas/spreadsheetml/x2006/main/impl/CTHyperlinkImpl.java | AlhonGelios/AO | 3e78fefe875ab102016e1259874886970e3c5c2a | [
"Apache-2.0"
] | null | null | null | org/openxmlformats/schemas/spreadsheetml/x2006/main/impl/CTHyperlinkImpl.java | AlhonGelios/AO | 3e78fefe875ab102016e1259874886970e3c5c2a | [
"Apache-2.0"
] | null | null | null | 29.725166 | 124 | 0.611674 | 280 | package org.openxmlformats.schemas.spreadsheetml.x2006.main.impl;
import javax.xml.namespace.QName;
import org.apache.xmlbeans.SchemaType;
import org.apache.xmlbeans.SimpleValue;
import org.apache.xmlbeans.impl.values.XmlComplexContentImpl;
import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHyperlink;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STRef;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STXstring;
public class CTHyperlinkImpl extends XmlComplexContentImpl implements CTHyperlink {
private static final QName REF$0 = new QName("", "ref");
private static final QName ID$2 = new QName("http://schemas.openxmlformats.org/officeDocument/2006/relationships", "id");
private static final QName LOCATION$4 = new QName("", "location");
private static final QName TOOLTIP$6 = new QName("", "tooltip");
private static final QName DISPLAY$8 = new QName("", "display");
public CTHyperlinkImpl(SchemaType var1) {
super(var1);
}
public String getRef() {
synchronized(this.monitor()) {
this.check_orphaned();
SimpleValue var2 = null;
var2 = (SimpleValue)this.get_store().find_attribute_user(REF$0);
return var2 == null?null:var2.getStringValue();
}
}
public STRef xgetRef() {
synchronized(this.monitor()) {
this.check_orphaned();
STRef var2 = null;
var2 = (STRef)this.get_store().find_attribute_user(REF$0);
return var2;
}
}
public void setRef(String var1) {
synchronized(this.monitor()) {
this.check_orphaned();
SimpleValue var3 = null;
var3 = (SimpleValue)this.get_store().find_attribute_user(REF$0);
if(var3 == null) {
var3 = (SimpleValue)this.get_store().add_attribute_user(REF$0);
}
var3.setStringValue(var1);
}
}
public void xsetRef(STRef var1) {
synchronized(this.monitor()) {
this.check_orphaned();
STRef var3 = null;
var3 = (STRef)this.get_store().find_attribute_user(REF$0);
if(var3 == null) {
var3 = (STRef)this.get_store().add_attribute_user(REF$0);
}
var3.set(var1);
}
}
public String getId() {
synchronized(this.monitor()) {
this.check_orphaned();
SimpleValue var2 = null;
var2 = (SimpleValue)this.get_store().find_attribute_user(ID$2);
return var2 == null?null:var2.getStringValue();
}
}
public STRelationshipId xgetId() {
synchronized(this.monitor()) {
this.check_orphaned();
STRelationshipId var2 = null;
var2 = (STRelationshipId)this.get_store().find_attribute_user(ID$2);
return var2;
}
}
public boolean isSetId() {
synchronized(this.monitor()) {
this.check_orphaned();
return this.get_store().find_attribute_user(ID$2) != null;
}
}
public void setId(String var1) {
synchronized(this.monitor()) {
this.check_orphaned();
SimpleValue var3 = null;
var3 = (SimpleValue)this.get_store().find_attribute_user(ID$2);
if(var3 == null) {
var3 = (SimpleValue)this.get_store().add_attribute_user(ID$2);
}
var3.setStringValue(var1);
}
}
public void xsetId(STRelationshipId var1) {
synchronized(this.monitor()) {
this.check_orphaned();
STRelationshipId var3 = null;
var3 = (STRelationshipId)this.get_store().find_attribute_user(ID$2);
if(var3 == null) {
var3 = (STRelationshipId)this.get_store().add_attribute_user(ID$2);
}
var3.set(var1);
}
}
public void unsetId() {
synchronized(this.monitor()) {
this.check_orphaned();
this.get_store().remove_attribute(ID$2);
}
}
public String getLocation() {
synchronized(this.monitor()) {
this.check_orphaned();
SimpleValue var2 = null;
var2 = (SimpleValue)this.get_store().find_attribute_user(LOCATION$4);
return var2 == null?null:var2.getStringValue();
}
}
public STXstring xgetLocation() {
synchronized(this.monitor()) {
this.check_orphaned();
STXstring var2 = null;
var2 = (STXstring)this.get_store().find_attribute_user(LOCATION$4);
return var2;
}
}
public boolean isSetLocation() {
synchronized(this.monitor()) {
this.check_orphaned();
return this.get_store().find_attribute_user(LOCATION$4) != null;
}
}
public void setLocation(String var1) {
synchronized(this.monitor()) {
this.check_orphaned();
SimpleValue var3 = null;
var3 = (SimpleValue)this.get_store().find_attribute_user(LOCATION$4);
if(var3 == null) {
var3 = (SimpleValue)this.get_store().add_attribute_user(LOCATION$4);
}
var3.setStringValue(var1);
}
}
public void xsetLocation(STXstring var1) {
synchronized(this.monitor()) {
this.check_orphaned();
STXstring var3 = null;
var3 = (STXstring)this.get_store().find_attribute_user(LOCATION$4);
if(var3 == null) {
var3 = (STXstring)this.get_store().add_attribute_user(LOCATION$4);
}
var3.set(var1);
}
}
public void unsetLocation() {
synchronized(this.monitor()) {
this.check_orphaned();
this.get_store().remove_attribute(LOCATION$4);
}
}
public String getTooltip() {
synchronized(this.monitor()) {
this.check_orphaned();
SimpleValue var2 = null;
var2 = (SimpleValue)this.get_store().find_attribute_user(TOOLTIP$6);
return var2 == null?null:var2.getStringValue();
}
}
public STXstring xgetTooltip() {
synchronized(this.monitor()) {
this.check_orphaned();
STXstring var2 = null;
var2 = (STXstring)this.get_store().find_attribute_user(TOOLTIP$6);
return var2;
}
}
public boolean isSetTooltip() {
synchronized(this.monitor()) {
this.check_orphaned();
return this.get_store().find_attribute_user(TOOLTIP$6) != null;
}
}
public void setTooltip(String var1) {
synchronized(this.monitor()) {
this.check_orphaned();
SimpleValue var3 = null;
var3 = (SimpleValue)this.get_store().find_attribute_user(TOOLTIP$6);
if(var3 == null) {
var3 = (SimpleValue)this.get_store().add_attribute_user(TOOLTIP$6);
}
var3.setStringValue(var1);
}
}
public void xsetTooltip(STXstring var1) {
synchronized(this.monitor()) {
this.check_orphaned();
STXstring var3 = null;
var3 = (STXstring)this.get_store().find_attribute_user(TOOLTIP$6);
if(var3 == null) {
var3 = (STXstring)this.get_store().add_attribute_user(TOOLTIP$6);
}
var3.set(var1);
}
}
public void unsetTooltip() {
synchronized(this.monitor()) {
this.check_orphaned();
this.get_store().remove_attribute(TOOLTIP$6);
}
}
public String getDisplay() {
synchronized(this.monitor()) {
this.check_orphaned();
SimpleValue var2 = null;
var2 = (SimpleValue)this.get_store().find_attribute_user(DISPLAY$8);
return var2 == null?null:var2.getStringValue();
}
}
public STXstring xgetDisplay() {
synchronized(this.monitor()) {
this.check_orphaned();
STXstring var2 = null;
var2 = (STXstring)this.get_store().find_attribute_user(DISPLAY$8);
return var2;
}
}
public boolean isSetDisplay() {
synchronized(this.monitor()) {
this.check_orphaned();
return this.get_store().find_attribute_user(DISPLAY$8) != null;
}
}
public void setDisplay(String var1) {
synchronized(this.monitor()) {
this.check_orphaned();
SimpleValue var3 = null;
var3 = (SimpleValue)this.get_store().find_attribute_user(DISPLAY$8);
if(var3 == null) {
var3 = (SimpleValue)this.get_store().add_attribute_user(DISPLAY$8);
}
var3.setStringValue(var1);
}
}
public void xsetDisplay(STXstring var1) {
synchronized(this.monitor()) {
this.check_orphaned();
STXstring var3 = null;
var3 = (STXstring)this.get_store().find_attribute_user(DISPLAY$8);
if(var3 == null) {
var3 = (STXstring)this.get_store().add_attribute_user(DISPLAY$8);
}
var3.set(var1);
}
}
public void unsetDisplay() {
synchronized(this.monitor()) {
this.check_orphaned();
this.get_store().remove_attribute(DISPLAY$8);
}
}
}
|
3e00b600ddd1c459b5ea886b2e0339754b395f6e | 3,226 | java | Java | tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft/xml/XML2003ParserTest.java | x-chain/tika | 6d4b430d37bd68d2c68379d40aff2192720d27e8 | [
"Apache-2.0"
] | 1,299 | 2015-01-02T15:08:29.000Z | 2022-03-31T07:02:19.000Z | tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft/xml/XML2003ParserTest.java | x-chain/tika | 6d4b430d37bd68d2c68379d40aff2192720d27e8 | [
"Apache-2.0"
] | 245 | 2015-01-18T16:05:39.000Z | 2022-03-30T12:55:29.000Z | tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft/xml/XML2003ParserTest.java | x-chain/tika | 6d4b430d37bd68d2c68379d40aff2192720d27e8 | [
"Apache-2.0"
] | 748 | 2015-01-09T23:36:49.000Z | 2022-03-22T10:12:16.000Z | 39.82716 | 87 | 0.697458 | 281 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 org.apache.tika.parser.microsoft.xml;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.apache.tika.MultiThreadedTikaTest;
import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.metadata.OfficeOpenXMLCore;
import org.apache.tika.metadata.TikaCoreProperties;
import org.apache.tika.parser.ParseContext;
import org.apache.tika.utils.XMLReaderUtils;
public class XML2003ParserTest extends MultiThreadedTikaTest {
@AfterAll
public static void tearDown() throws TikaException {
XMLReaderUtils.setPoolSize(XMLReaderUtils.DEFAULT_POOL_SIZE);
}
@Test
public void testBasicExcel() throws Exception {
XMLResult r = getXML("testEXCEL2003.xml");
Metadata m = r.metadata;
assertEquals("Allison, Timothy B.", m.get(TikaCoreProperties.CREATOR));
assertEquals("16.00", m.get(OfficeOpenXMLCore.VERSION));
assertEquals("application/vnd.ms-spreadsheetml", m.get(Metadata.CONTENT_TYPE));
String xml = r.xml;
xml = xml.replaceAll("\\s+", " ");
//confirm metadata was dumped to xml
assertContains("<meta name=\"cp:version\" content=\"16.00\" />", xml);
assertContains("<tr> <td>Col1</td> <td>Col2</td>", xml);
assertContains("<td>2016-04-27T00:00:00.000</td>", xml);
assertContains("<a href=\"https://tika.apache.org/\">tika_hyperlink</a>", xml);
assertContains("<td>5.5</td>", xml);
//check that text is extracted with breaks between elements
String txt = getText(getResourceAsStream("/test-documents/testEXCEL2003.xml"),
AUTO_DETECT_PARSER);
txt = txt.replaceAll("\\s+", " ");
assertContains("Col1 Col2 Col3 Col4 string 1 1.10", txt);
}
@Test
@Timeout(60000)
public void testMultiThreaded() throws Exception {
XMLReaderUtils.setPoolSize(4);
int numThreads = XMLReaderUtils.getPoolSize() * 2;
ParseContext[] contexts = new ParseContext[numThreads];
for (int i = 0; i < contexts.length; i++) {
contexts[i] = new ParseContext();
}
testMultiThreaded(AUTO_DETECT_PARSER, contexts, numThreads, 2,
pathname -> pathname.getName().equals("testWORD2003.xml"));
}
}
|
3e00b726beab29ed79ae7ffb2c69e0af6986989c | 1,394 | java | Java | alvisnlp-bibliome/src/main/java/fr/inra/maiage/bibliome/alvisnlp/bibliomefactory/converters/expression/ExpressionMappingParamConverter.java | DorianKodelja/alvisnlp | 904c75db98f5fb4e295362e004a32723c0adb5f5 | [
"Apache-2.0"
] | 17 | 2017-01-02T15:57:03.000Z | 2022-01-07T16:07:38.000Z | alvisnlp-bibliome/src/main/java/fr/inra/maiage/bibliome/alvisnlp/bibliomefactory/converters/expression/ExpressionMappingParamConverter.java | DorianKodelja/alvisnlp | 904c75db98f5fb4e295362e004a32723c0adb5f5 | [
"Apache-2.0"
] | 137 | 2017-01-16T06:15:05.000Z | 2022-03-29T17:53:07.000Z | alvisnlp-bibliome/src/main/java/fr/inra/maiage/bibliome/alvisnlp/bibliomefactory/converters/expression/ExpressionMappingParamConverter.java | DorianKodelja/alvisnlp | 904c75db98f5fb4e295362e004a32723c0adb5f5 | [
"Apache-2.0"
] | 6 | 2017-01-13T09:05:17.000Z | 2021-05-29T07:42:29.000Z | 33.190476 | 109 | 0.803443 | 282 | /*
Copyright 2016, 2017 Institut National de la Recherche Agronomique
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 fr.inra.maiage.bibliome.alvisnlp.bibliomefactory.converters.expression;
import fr.inra.maiage.bibliome.alvisnlp.core.converters.lib.Converter;
import fr.inra.maiage.bibliome.alvisnlp.core.converters.lib.MapParamConverter;
import fr.inra.maiage.bibliome.alvisnlp.core.corpus.expressions.Expression;
import fr.inra.maiage.bibliome.alvisnlp.core.module.types.ExpressionMapping;
@Converter(targetType=ExpressionMapping.class)
public class ExpressionMappingParamConverter extends MapParamConverter<String,Expression,ExpressionMapping> {
@Override
public Class<String> keysType() {
return String.class;
}
@Override
public Class<Expression> valuesType() {
return Expression.class;
}
@Override
public ExpressionMapping newEmptyMap() {
return new ExpressionMapping();
}
}
|
3e00b741667e2de649ec5b6a77309c79e2996e5f | 5,344 | java | Java | bachelor-up/bachelor-up-client/src/main/java/cn/org/bachelor/up/oauth2/client/util/IOUtils.java | team-bachelor/bachelor | bb120cadff4fb1620bf39f64b088988297a0bb43 | [
"Apache-2.0"
] | 6 | 2020-11-22T08:58:48.000Z | 2021-05-14T08:25:41.000Z | bachelor-up/bachelor-up-client/src/main/java/cn/org/bachelor/up/oauth2/client/util/IOUtils.java | lz84/bachelor-all | bb120cadff4fb1620bf39f64b088988297a0bb43 | [
"Apache-2.0"
] | 13 | 2020-11-17T09:17:04.000Z | 2022-02-27T11:04:08.000Z | bachelor-up/bachelor-up-client/src/main/java/cn/org/bachelor/up/oauth2/client/util/IOUtils.java | team-bachelor/bachelor | bb120cadff4fb1620bf39f64b088988297a0bb43 | [
"Apache-2.0"
] | 3 | 2021-01-21T01:31:45.000Z | 2021-02-03T03:16:02.000Z | 28.275132 | 111 | 0.545846 | 283 | package cn.org.bachelor.up.oauth2.client.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.ServletException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class IOUtils {
private static Logger logger= LoggerFactory.getLogger(IOUtils.class);
public static final int DEFAULT_BUFFER_SIZE = 4096;
public IOUtils() {
}
public static String read(InputStream in) {
InputStreamReader reader;
try {
reader = new InputStreamReader(in, "UTF-8");
} catch (UnsupportedEncodingException var3) {
throw new IllegalStateException(var3.getMessage(), var3);
}
return read((Reader)reader);
}
public static String readFromResource(String resource) throws IOException {
InputStream in = null;
String text;
try {
in = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
if(in == null) {
in = IOUtils.class.getResourceAsStream(resource);
}
if(in != null) {
text = read(in);
String var3 = text;
return var3;
}
text = null;
} finally {
if(in != null) {
try {
in.close();
} catch (Exception e) {
logger.error("close error", e);
}
}
}
return text;
}
public static byte[] readByteArrayFromResource(String resource) throws IOException {
InputStream in = null;
Object var2;
try {
in = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
if(in != null) {
byte[] var6 = readByteArray(in);
return var6;
}
var2 = null;
} finally {
if(in != null) {
try {
in.close();
} catch (Exception e) {
logger.error("close error", e);
}
}
}
return (byte[])var2;
}
public static byte[] readByteArray(InputStream input) throws IOException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
copy(input, output);
return output.toByteArray();
}
public static long copy(InputStream input, OutputStream output) throws IOException {
boolean EOF = true;
byte[] buffer = new byte[4096];
long count = 0L;
int n1;
for(boolean n = false; -1 != (n1 = input.read(buffer)); count += (long)n1) {
output.write(buffer, 0, n1);
}
return count;
}
public static String read(Reader reader) {
try {
StringWriter ex = new StringWriter();
char[] buffer = new char[4096];
boolean n = false;
int n1;
while(-1 != (n1 = reader.read(buffer))) {
ex.write(buffer, 0, n1);
}
return ex.toString();
} catch (IOException var4) {
throw new IllegalStateException("read error", var4);
}
}
public static String read(Reader reader, int length) {
try {
char[] ex = new char[length];
int offset = 0;
int rest = length;
int len;
while((len = reader.read(ex, offset, rest)) != -1) {
rest -= len;
offset += len;
if(rest == 0) {
break;
}
}
return new String(ex, 0, length - rest);
} catch (IOException var6) {
throw new IllegalStateException("read error", var6);
}
}
public static String toString(Date date) {
if(date == null) {
return null;
} else {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return format.format(date);
}
}
public static String getStackTrace(Throwable ex) {
StringWriter buf = new StringWriter();
ex.printStackTrace(new PrintWriter(buf));
return buf.toString();
}
public static String toString(StackTraceElement[] stackTrace) {
StringBuilder buf = new StringBuilder();
StackTraceElement[] arr$ = stackTrace;
int len$ = stackTrace.length;
for(int i$ = 0; i$ < len$; ++i$) {
StackTraceElement item = arr$[i$];
buf.append(item.toString());
buf.append("\n");
}
return buf.toString();
}
public static String returnResourceFile(String fileName,String info) throws ServletException, IOException {
String text = IOUtils.readFromResource("support/http/resources" + fileName);
if(text == null) {
return "错误信息模版为定义";
} else {
return StringUtils.replace(text, UpClientConstant.TEMPLATE_REPLACE_STRING,info);
}
}
}
|
3e00b75852242f4c7f91725c1bacee2a681b3ae3 | 9,363 | java | Java | src/main/java/de/tum/in/www1/artemis/web/rest/QuizSubmissionResource.java | muenchdo/ArTEMiS | 8acdae21e9b2527f9a53e5c003302cc742a8284a | [
"MIT"
] | null | null | null | src/main/java/de/tum/in/www1/artemis/web/rest/QuizSubmissionResource.java | muenchdo/ArTEMiS | 8acdae21e9b2527f9a53e5c003302cc742a8284a | [
"MIT"
] | null | null | null | src/main/java/de/tum/in/www1/artemis/web/rest/QuizSubmissionResource.java | muenchdo/ArTEMiS | 8acdae21e9b2527f9a53e5c003302cc742a8284a | [
"MIT"
] | null | null | null | 49.278947 | 179 | 0.722738 | 284 | package de.tum.in.www1.artemis.web.rest;
import static de.tum.in.www1.artemis.web.rest.util.ResponseUtil.forbidden;
import java.security.Principal;
import java.time.ZonedDateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import de.tum.in.www1.artemis.domain.*;
import de.tum.in.www1.artemis.domain.enumeration.AssessmentType;
import de.tum.in.www1.artemis.domain.enumeration.SubmissionType;
import de.tum.in.www1.artemis.domain.participation.StudentParticipation;
import de.tum.in.www1.artemis.domain.quiz.QuizExercise;
import de.tum.in.www1.artemis.domain.quiz.QuizSubmission;
import de.tum.in.www1.artemis.exception.QuizSubmissionException;
import de.tum.in.www1.artemis.service.*;
import de.tum.in.www1.artemis.web.rest.util.HeaderUtil;
/**
* REST controller for managing QuizSubmission.
*/
@RestController
@RequestMapping("/api")
public class QuizSubmissionResource {
private final Logger log = LoggerFactory.getLogger(QuizSubmissionResource.class);
private static final String ENTITY_NAME = "quizSubmission";
@Value("${jhipster.clientApp.name}")
private String applicationName;
private final UserService userService;
private final QuizExerciseService quizExerciseService;
private final QuizSubmissionService quizSubmissionService;
private final ParticipationService participationService;
private final WebsocketMessagingService messagingService;
private final AuthorizationCheckService authCheckService;
public QuizSubmissionResource(QuizExerciseService quizExerciseService, QuizSubmissionService quizSubmissionService, ParticipationService participationService,
WebsocketMessagingService messagingService, UserService userService, AuthorizationCheckService authCheckService) {
this.quizExerciseService = quizExerciseService;
this.quizSubmissionService = quizSubmissionService;
this.participationService = participationService;
this.messagingService = messagingService;
this.userService = userService;
this.authCheckService = authCheckService;
}
/**
* POST /exercises/:exerciseId/submissions/live : Submit a new quizSubmission for live mode.
*
* @param exerciseId the id of the exercise for which to init a participation
* @param quizSubmission the quizSubmission to submit
* @param principal refers to the user who initiated the request
* @return the ResponseEntity with status 200 (OK) and the Result as its body, or with status 4xx if the request is invalid
*/
@PostMapping("/exercises/{exerciseId}/submissions/live")
@PreAuthorize("hasAnyRole('USER', 'TA', 'INSTRUCTOR', 'ADMIN')")
public ResponseEntity<QuizSubmission> submitForLiveMode(@PathVariable Long exerciseId, @RequestBody QuizSubmission quizSubmission, Principal principal) {
log.debug("REST request to submit QuizSubmission for live mode : {}", quizSubmission);
try {
// we set the submitted flag to true on the server side
quizSubmission.setSubmitted(true);
QuizSubmission updatedQuizSubmission = quizSubmissionService.saveSubmissionForLiveMode(exerciseId, quizSubmission, principal.getName(), true);
return ResponseEntity.ok(updatedQuizSubmission);
}
catch (QuizSubmissionException e) {
log.warn("QuizSubmissionException :" + e.getMessage() + " for user " + principal.getName() + " in quiz " + exerciseId);
return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(applicationName, true, ENTITY_NAME, "quizSubmissionError", e.getMessage())).body(null);
}
}
/**
* POST /exercises/:exerciseId/submissions/practice : Submit a new quizSubmission for practice mode.
*
* @param exerciseId the id of the exercise for which to init a participation
* @param quizSubmission the quizSubmission to submit
* @return the ResponseEntity with status 200 (OK) and the Result as its body, or with status 4xx if the request is invalid
*/
@PostMapping("/exercises/{exerciseId}/submissions/practice")
@PreAuthorize("hasAnyRole('USER', 'TA', 'INSTRUCTOR', 'ADMIN')")
public ResponseEntity<Result> submitForPractice(@PathVariable Long exerciseId, @RequestBody QuizSubmission quizSubmission) {
log.debug("REST request to submit QuizSubmission for practice : {}", quizSubmission);
// recreate pointers back to submission in each submitted answer
for (SubmittedAnswer submittedAnswer : quizSubmission.getSubmittedAnswers()) {
submittedAnswer.setSubmission(quizSubmission);
}
if (quizSubmission.getId() != null) {
return ResponseEntity.badRequest()
.headers(HeaderUtil.createFailureAlert(applicationName, true, ENTITY_NAME, "idexists", "A new quizSubmission cannot already have an ID.")).body(null);
}
QuizExercise quizExercise = quizExerciseService.findOneWithQuestions(exerciseId);
if (quizExercise == null) {
return ResponseEntity.badRequest()
.headers(HeaderUtil.createFailureAlert(applicationName, true, "submission", "exerciseNotFound", "No exercise was found for the given ID.")).body(null);
}
User user = userService.getUserWithGroupsAndAuthorities();
if (!authCheckService.isAllowedToSeeExercise(quizExercise, user)) {
return ResponseEntity.status(403)
.headers(HeaderUtil.createFailureAlert(applicationName, true, "submission", "Forbidden", "You are not allowed to participate in this exercise.")).body(null);
}
if (!quizExercise.isEnded() || !quizExercise.isIsOpenForPractice()) {
return ResponseEntity.badRequest().headers(
HeaderUtil.createFailureAlert(applicationName, true, "submission", "exerciseNotOpenForPractice", "The exercise is not open for practice or hasn't ended yet."))
.body(null);
}
StudentParticipation participation = participationService.startExercise(quizExercise, user);
participation.setExercise(quizExercise);
// update and save submission
Result result = quizSubmissionService.submitForPractice(quizSubmission, quizExercise, participation);
// remove some redundant or unnecessary data that is not needed on client side
for (SubmittedAnswer answer : quizSubmission.getSubmittedAnswers()) {
answer.getQuizQuestion().setQuizQuestionStatistic(null);
}
quizExercise.setQuizPointStatistic(null);
quizExercise.setCourse(null);
messagingService.broadcastNewResult(result.getParticipation(), result);
// return result with quizSubmission, participation and quiz exercise (including the solution)
return ResponseEntity.ok(result);
}
/**
* POST /exercises/:exerciseId/submissions/preview : Submit a new quizSubmission for preview mode. Note that in this case, nothing will be saved in database.
*
* @param exerciseId the id of the exercise for which to init a participation
* @param quizSubmission the quizSubmission to submit
* @return the ResponseEntity with status 200 and body the result or the appropriate error code.
*/
@PostMapping("exercises/{exerciseId}/submissions/preview")
@PreAuthorize("hasAnyRole('TA', 'INSTRUCTOR', 'ADMIN')")
public ResponseEntity<Result> submitForPreview(@PathVariable Long exerciseId, @RequestBody QuizSubmission quizSubmission) {
log.debug("REST request to submit QuizSubmission for preview : {}", quizSubmission);
if (quizSubmission.getId() != null) {
return ResponseEntity.badRequest()
.headers(HeaderUtil.createFailureAlert(applicationName, true, ENTITY_NAME, "idexists", "A new quizSubmission cannot already have an ID.")).body(null);
}
QuizExercise quizExercise = quizExerciseService.findOneWithQuestions(exerciseId);
if (quizExercise == null) {
return ResponseEntity.badRequest()
.headers(HeaderUtil.createFailureAlert(applicationName, true, "submission", "exerciseNotFound", "No exercise was found for the given ID.")).body(null);
}
if (!quizExerciseService.userHasTAPermissions(quizExercise)) {
return forbidden();
}
// update submission
quizSubmission.setSubmitted(true);
quizSubmission.setType(SubmissionType.MANUAL);
quizSubmission.calculateAndUpdateScores(quizExercise);
// create Participation stub
StudentParticipation participation = new StudentParticipation().exercise(quizExercise);
// create result
Result result = new Result().participation(participation).submission(quizSubmission);
result.setRated(false);
result.setAssessmentType(AssessmentType.AUTOMATIC);
result.setCompletionDate(ZonedDateTime.now());
// calculate score and update result accordingly
result.evaluateSubmission();
return ResponseEntity.ok(result);
}
}
|
3e00b7d243b26af40cf31ea6e1250d91fb237d36 | 32,088 | java | Java | src/src/sun/nio/fs/WindowsFileSystemProvider.java | HurleyWong/RTFSC-JDK | 9bb72042116ff3dbb8f71c2372c8697629f4d730 | [
"MIT"
] | null | null | null | src/src/sun/nio/fs/WindowsFileSystemProvider.java | HurleyWong/RTFSC-JDK | 9bb72042116ff3dbb8f71c2372c8697629f4d730 | [
"MIT"
] | null | null | null | src/src/sun/nio/fs/WindowsFileSystemProvider.java | HurleyWong/RTFSC-JDK | 9bb72042116ff3dbb8f71c2372c8697629f4d730 | [
"MIT"
] | null | null | null | 36.175874 | 181 | 0.580217 | 285 | /*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.nio.fs;
import java.io.FilePermission;
import java.io.IOException;
import java.net.URI;
import java.nio.channels.AsynchronousFileChannel;
import java.nio.channels.FileChannel;
import java.nio.channels.SeekableByteChannel;
import java.nio.file.AccessDeniedException;
import java.nio.file.AccessMode;
import java.nio.file.CopyOption;
import java.nio.file.DirectoryNotEmptyException;
import java.nio.file.DirectoryStream;
import java.nio.file.FileAlreadyExistsException;
import java.nio.file.FileStore;
import java.nio.file.FileSystem;
import java.nio.file.FileSystemAlreadyExistsException;
import java.nio.file.LinkOption;
import java.nio.file.LinkPermission;
import java.nio.file.OpenOption;
import java.nio.file.Path;
import java.nio.file.attribute.AclFileAttributeView;
import java.nio.file.attribute.BasicFileAttributeView;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.DosFileAttributeView;
import java.nio.file.attribute.DosFileAttributes;
import java.nio.file.attribute.FileAttribute;
import java.nio.file.attribute.FileAttributeView;
import java.nio.file.attribute.FileOwnerAttributeView;
import java.nio.file.attribute.UserDefinedFileAttributeView;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import jdk.internal.misc.Unsafe;
import jdk.internal.util.StaticProperty;
import sun.nio.ch.ThreadPool;
import sun.security.util.SecurityConstants;
import static sun.nio.fs.WindowsConstants.DACL_SECURITY_INFORMATION;
import static sun.nio.fs.WindowsConstants.ERROR_ACCESS_DENIED;
import static sun.nio.fs.WindowsConstants.ERROR_ALREADY_EXISTS;
import static sun.nio.fs.WindowsConstants.ERROR_DIR_NOT_EMPTY;
import static sun.nio.fs.WindowsConstants.ERROR_FILE_NOT_FOUND;
import static sun.nio.fs.WindowsConstants.ERROR_INVALID_REPARSE_DATA;
import static sun.nio.fs.WindowsConstants.ERROR_PATH_NOT_FOUND;
import static sun.nio.fs.WindowsConstants.FILE_ALL_ACCESS;
import static sun.nio.fs.WindowsConstants.FILE_EXECUTE;
import static sun.nio.fs.WindowsConstants.FILE_GENERIC_EXECUTE;
import static sun.nio.fs.WindowsConstants.FILE_GENERIC_READ;
import static sun.nio.fs.WindowsConstants.FILE_GENERIC_WRITE;
import static sun.nio.fs.WindowsConstants.FILE_READ_DATA;
import static sun.nio.fs.WindowsConstants.FILE_WRITE_DATA;
import static sun.nio.fs.WindowsConstants.GROUP_SECURITY_INFORMATION;
import static sun.nio.fs.WindowsConstants.OWNER_SECURITY_INFORMATION;
import static sun.nio.fs.WindowsConstants.SYMBOLIC_LINK_FLAG_DIRECTORY;
import static sun.nio.fs.WindowsNativeDispatcher.CloseHandle;
import static sun.nio.fs.WindowsNativeDispatcher.CreateDirectory;
import static sun.nio.fs.WindowsNativeDispatcher.CreateHardLink;
import static sun.nio.fs.WindowsNativeDispatcher.CreateSymbolicLink;
import static sun.nio.fs.WindowsNativeDispatcher.DeleteFile;
import static sun.nio.fs.WindowsNativeDispatcher.RemoveDirectory;
import static sun.nio.fs.WindowsSecurity.checkAccessMask;
// "file"文件系统工厂在windows上的实现
public class WindowsFileSystemProvider extends AbstractFileSystemProvider {
private static final Unsafe unsafe = Unsafe.getUnsafe();
// 当前工厂可以提供的windows文件系统对象
private final WindowsFileSystem theFileSystem;
/*▼ 构造器 ████████████████████████████████████████████████████████████████████████████████┓ */
public WindowsFileSystemProvider() {
// 获取用户工作目录(如项目根目录)
String userDir = StaticProperty.userDir();
// 构造一个windows文件系统对象
theFileSystem = new WindowsFileSystem(this, userDir);
}
/*▲ 构造器 ████████████████████████████████████████████████████████████████████████████████┛ */
/*▼ 文件系统 ████████████████████████████████████████████████████████████████████████████████┓ */
/*
* 返回与指定的URI匹配的文件系统(仅适用系统内部可用的文件系统)
* 注:此处要求URI协议为"file"
*/
@Override
public final FileSystem getFileSystem(URI uri) {
checkUri(uri);
return theFileSystem;
}
/*
* 返回与指定的URI匹配的文件系统,env是目标文件系统工厂用到的属性
* 注1:此处要求URI协议为"file"
* 注2:目前,"file"文件系统工厂未实现该方法
*/
@Override
public FileSystem newFileSystem(URI uri, Map<String, ?> env) throws IOException {
checkUri(uri);
throw new FileSystemAlreadyExistsException();
}
/*▲ 文件系统 ████████████████████████████████████████████████████████████████████████████████┛ */
/*▼ 目录流遍历(非递归) ████████████████████████████████████████████████████████████████████████████████┓ */
// 返回指定实体的目录流,用来搜寻目录内的直接子项(需要自定义过滤器)
@Override
public DirectoryStream<Path> newDirectoryStream(Path path, DirectoryStream.Filter<? super Path> filter) throws IOException {
// 必须设置过滤器
if(filter == null) {
throw new NullPointerException();
}
// 将Path转换为WindowsPath
WindowsPath dir = WindowsPath.toWindowsPath(path);
// 如果存在安全管理器,则需要检查读权限
dir.checkRead();
// 构造一个目录流
return new WindowsDirectoryStream(dir, filter);
}
/*▲ 目录流遍历(非递归) ████████████████████████████████████████████████████████████████████████████████┛ */
/*▼ 文件通道 ████████████████████████████████████████████████████████████████████████████████┓ */
/*
* 创建/打开一个文件,并返回其关联的非异步文件通道;该方法目前的实现与newFileChannel()一致
*
* 注:attrs是文件权限属性,允许为空数组,但不能为null,其实现依平台实现而定:
* windows : 要求attrs的name()方法返回"acl:acl",且value()方法返回List<AclEntry>类型的对象
* linux/mac: 要求attrs的name()方法返回"posix:permissions"或"unix:permissions",且value()方法返回Set<PosixFilePermission>类型的对象
*/
@Override
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException {
return newFileChannel(path, options, attrs);
}
/*
* 创建/打开一个文件,并返回其关联的非异步文件通道;该方法目前的实现与newByteChannel()一致
*
* 注:attrs是文件权限属性,允许为空数组,但不能为null,其实现依平台实现而定:
* windows : 要求attrs的name()方法返回"acl:acl",且value()方法返回List<AclEntry>类型的对象
* linux/mac: 要求attrs的name()方法返回"posix:permissions"或"unix:permissions",且value()方法返回Set<PosixFilePermission>类型的对象
*/
@Override
public FileChannel newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException {
// 将Path强制转换为WindowsPath
WindowsPath file = WindowsPath.toWindowsPath(path);
// 通过指定的文件属性构造windows安全描述符,该方法仅在windows平台使用
WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs);
try {
// 创建/打开一个文件,并返回其关联的非异步文件通道
return WindowsChannelFactory.newFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address());
} catch(WindowsException x) {
x.rethrowAsIOException(file);
return null;
} finally {
if(sd != null) {
sd.release();
}
}
}
/*
* 创建/打开一个文件,并返回其关联的异步文件通道,工作线程在这个过程中会被启动并阻塞
*
* path : 文件路径
* options : 文件操作属性
* executor: 工作线程的线程池
* attrs : 文件权限属性,允许为空数组,但不能为null
*
* 注:attrs是文件权限属性,允许为空数组,但不能为null,其实现依平台实现而定:
* windows : 要求attrs的name()方法返回"acl:acl",且value()方法返回List<AclEntry>类型的对象
* linux/mac: 要求attrs的name()方法返回"posix:permissions"或"unix:permissions",且value()方法返回Set<PosixFilePermission>类型的对象
*/
@Override
public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException {
// 将Path强制转换为WindowsPath
WindowsPath file = WindowsPath.toWindowsPath(path);
// 将指定的【任务执行框架】包装为异步IO线程池:容量非固定,初始容量为0
ThreadPool pool = (executor == null) ? null : ThreadPool.wrap(executor, 0);
// 通过指定的文件属性构造windows安全描述符,该方法仅在windows平台使用
WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs);
try {
// 创建/打开一个文件,并返回其关联的异步文件通道,工作线程在这个过程中会被启动并阻塞
return WindowsChannelFactory.newAsynchronousFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), options, sd.address(), pool);
} catch(WindowsException x) {
x.rethrowAsIOException(file);
return null;
} finally {
if(sd != null) {
sd.release();
}
}
}
/*▲ 文件通道 ████████████████████████████████████████████████████████████████████████████████┛ */
/*▼ 读/写内容 ████████████████████████████████████████████████████████████████████████████████┓ */
// 返回path处符号链接的路径
@Override
public Path readSymbolicLink(Path path) throws IOException {
// 将Path强制转换为WindowsPath
WindowsPath link = WindowsPath.toWindowsPath(path);
// 获取link路径所属的windows文件系统
WindowsFileSystem fs = link.getFileSystem();
// permission check
SecurityManager sm = System.getSecurityManager();
if(sm != null) {
FilePermission perm = new FilePermission(link.getPathForPermissionCheck(), SecurityConstants.FILE_READLINK_ACTION);
sm.checkPermission(perm);
}
// 获取link处符号链接的路径
String target = WindowsLinkSupport.readLink(link);
// 路径工厂,创建windows平台的路径对象(不会做本地化操作)
return WindowsPath.createFromNormalizedPath(fs, target);
}
/*▲ 读/写内容 ████████████████████████████████████████████████████████████████████████████████┛ */
/*▼ 创建 ████████████████████████████████████████████████████████████████████████████████┓ */
/*
* 在指定的路径处创建目录,如果该目录已存在,则抛出异常
* attrs是创建目录中用到的一些附加参数,不同的文件系统需要不同的参数集
*/
@Override
public void createDirectory(Path path, FileAttribute<?>... attrs) throws IOException {
// 将Path强制转换为WindowsPath
WindowsPath dir = WindowsPath.toWindowsPath(path);
// 如果存在安全管理器,则需要检查写权限
dir.checkWrite();
// 通过指定的文件属性构造windows安全描述符,该方法仅在windows平台使用
WindowsSecurityDescriptor sd = WindowsSecurityDescriptor.fromAttribute(attrs);
try {
// 创建目录
CreateDirectory(dir.getPathForWin32Calls(), sd.address());
} catch(WindowsException x) {
// convert ERROR_ACCESS_DENIED to FileAlreadyExistsException if we can verify that the directory exists
if(x.lastError() == ERROR_ACCESS_DENIED) {
try {
if(WindowsFileAttributes.get(dir, false).isDirectory()) {
throw new FileAlreadyExistsException(dir.toString());
}
} catch(WindowsException ignore) {
}
}
x.rethrowAsIOException(dir);
} finally {
sd.release();
}
}
// 创建文件/目录的符号链接;在windows上相当于"mklink linkPath targetPath"(文件的符号链接)或"mklink /D linkPath targetPath"(目录的符号链接)
@Override
public void createSymbolicLink(Path linkPath, Path targetPath, FileAttribute<?>... attrs) throws IOException {
WindowsPath link = WindowsPath.toWindowsPath(linkPath);
WindowsPath target = WindowsPath.toWindowsPath(targetPath);
// 创建符号链接不允许设置attrs
if(attrs.length>0) {
// 通过指定的文件属性构造windows安全描述符,该方法仅在windows平台使用
WindowsSecurityDescriptor.fromAttribute(attrs); // may throw NPE or UOE
throw new UnsupportedOperationException("Initial file attributes not supported when creating symbolic link");
}
// permission check
SecurityManager sm = System.getSecurityManager();
if(sm != null) {
sm.checkPermission(new LinkPermission("symbolic"));
link.checkWrite();
}
/*
* Throw I/O exception for the drive-relative case because Windows creates a link with the resolved target for this case.
*/
// 如果target是磁盘相对路径,如:C:foo,直接抛异常
if(target.type() == WindowsPathType.DRIVE_RELATIVE) {
throw new IOException("Cannot create symbolic link to working directory relative target");
}
/*
* Windows treats symbolic links to directories differently than it does to other file types.
* For that reason we need to check if the target is a directory (or a directory junction).
*/
WindowsPath resolvedTarget;
// 如果target是相对路径,如:foo,获取target相对于link的父路径的绝对路径
if(target.type() == WindowsPathType.RELATIVE) {
WindowsPath parent = link.getParent();
resolvedTarget = (parent == null) ? target : parent.resolve(target);
} else {
resolvedTarget = link.resolve(target);
}
int flags = 0;
try {
// 获取resolvedTarget处文件/目录的属性信息(对于符号链接,不会链接到目标文件)
WindowsFileAttributes wattrs = WindowsFileAttributes.get(resolvedTarget, false);
// 如果resolvedTarget是目录(不管是不是符号链接)
if(wattrs.isDirectory() || wattrs.isDirectoryLink()) {
// 需要创建目录的符号链接
flags |= SYMBOLIC_LINK_FLAG_DIRECTORY;
}
} catch(WindowsException x) {
// unable to access target so assume target is not a directory
}
// create the link
try {
// 创建符号链接
CreateSymbolicLink(link.getPathForWin32Calls(), WindowsPath.addPrefixIfNeeded(target.toString()), flags);
} catch(WindowsException x) {
if(x.lastError() == ERROR_INVALID_REPARSE_DATA) {
x.rethrowAsIOException(link, target);
} else {
x.rethrowAsIOException(link);
}
}
}
// 创建文件的硬链接;在windows上相当于"mklink /H linkPath targetPath"
@Override
public void createLink(Path linkPath, Path targetPath) throws IOException {
WindowsPath link = WindowsPath.toWindowsPath(linkPath);
WindowsPath existing = WindowsPath.toWindowsPath(targetPath);
// permission check
SecurityManager sm = System.getSecurityManager();
if(sm != null) {
sm.checkPermission(new LinkPermission("hard"));
link.checkWrite();
existing.checkWrite();
}
// create hard link
try {
CreateHardLink(link.getPathForWin32Calls(), existing.getPathForWin32Calls());
} catch(WindowsException x) {
x.rethrowAsIOException(link, existing);
}
}
/*▲ 创建 ████████████████████████████████████████████████████████████████████████████████┛ */
/*▼ 删除 ████████████████████████████████████████████████████████████████████████████████┓ */
// 删除path处的文件/目录;failIfNotExists指示待删除目标不存在时,是否抛异常;如果待删除目标是非空的目录,则直接抛异常
@Override
boolean implDelete(Path path, boolean failIfNotExists) throws IOException {
// 将Path强制转换为WindowsPath
WindowsPath file = WindowsPath.toWindowsPath(path);
// 如果存在安全管理器,则需要检查删除权限
file.checkDelete();
WindowsFileAttributes attrs = null;
try {
// 获取file的属性信息(对于符号链接,不会将其链接到目标文件)
attrs = WindowsFileAttributes.get(file, false);
// 如果file是目录(不管是不是符号链接)
if(attrs.isDirectory() || attrs.isDirectoryLink()) {
RemoveDirectory(file.getPathForWin32Calls());
// 否则,删除文件
} else {
DeleteFile(file.getPathForWin32Calls());
}
return true;
} catch(WindowsException x) {
// no-op if file does not exist
if(!failIfNotExists && (x.lastError() == ERROR_FILE_NOT_FOUND || x.lastError() == ERROR_PATH_NOT_FOUND)) {
return false;
}
if(attrs != null && attrs.isDirectory()) {
// ERROR_ALREADY_EXISTS is returned when attempting to delete non-empty directory on SAMBA servers
if(x.lastError() == ERROR_DIR_NOT_EMPTY || x.lastError() == ERROR_ALREADY_EXISTS) {
throw new DirectoryNotEmptyException(file.getPathForExceptionMessage());
}
}
x.rethrowAsIOException(file);
return false;
}
}
/*▲ 删除 ████████████████████████████████████████████████████████████████████████████████┛ */
/*▼ 复制/剪切 ████████████████████████████████████████████████████████████████████████████████┓ */
/*
* 将source处的文件/目录复制到target处,默认不允许覆盖,
* 如果源目录不为空,则不会复制其子项,
* 复制成功后,复制源依然保留。
*
* options是复制参数,可设置的值包括:
* - StandardCopyOption.REPLACE_EXISTING
* - StandardCopyOption.COPY_ATTRIBUTES
* - LinkOption.NOFOLLOW_LINKS
* - ExtendedCopyOption.INTERRUPTIBLE
*/
@Override
public void copy(Path source, Path target, CopyOption... options) throws IOException {
WindowsFileCopy.copy(WindowsPath.toWindowsPath(source), WindowsPath.toWindowsPath(target), options);
}
/*
* 将source处的文件/目录移动到target处,默认不允许覆盖,
* 如果源目录不为空,且在不同的磁盘间复制,则不会复制其子项,
* 复制成功后,复制源会被删除。
*
* options是移动参数,可设置的值包括:
* - StandardCopyOption.REPLACE_EXISTING
* - StandardCopyOption.ATOMIC_MOVE
* - LinkOption.NOFOLLOW_LINKS(忽略)
*
* 注:如果移动发生在同一个目录下,则可以看做是重命名操作
*/
@Override
public void move(Path source, Path target, CopyOption... options) throws IOException {
WindowsFileCopy.move(WindowsPath.toWindowsPath(source), WindowsPath.toWindowsPath(target), options);
}
/*▲ 复制/剪切 ████████████████████████████████████████████████████████████████████████████████┛ */
/*▼ 文件存储 ████████████████████████████████████████████████████████████████████████████████┓ */
// 返回path处文件关联的文件存储
@Override
public FileStore getFileStore(Path path) throws IOException {
// 将Path强制转换为WindowsPath
WindowsPath file = WindowsPath.toWindowsPath(path);
SecurityManager sm = System.getSecurityManager();
if(sm != null) {
sm.checkPermission(new RuntimePermission("getFileStoreAttributes"));
file.checkRead();
}
// 创建file文件的windows文件存储对象
return WindowsFileStore.create(file);
}
/*▲ 文件存储 ████████████████████████████████████████████████████████████████████████████████┛ */
/*▼ 文件属性(视图) ████████████████████████████████████████████████████████████████████████████████┓ */
/*
* 返回path处文件的文件属性视图,该视图的类型由name决定,
* 此处name允许的取值为:"basic"、"dos"、"user"、"owner"、"acl",
* options指示对于符号链接,是否将其链接到目标文件。
*/
@Override
public DynamicFileAttributeView getFileAttributeView(Path path, String name, LinkOption... options) {
// 将Path转换为WindowsPath
WindowsPath file = WindowsPath.toWindowsPath(path);
boolean followLinks = Util.followLinks(options);
if(name.equals("basic")) {
return WindowsFileAttributeViews.createBasicView(file, followLinks);
}
if(name.equals("dos")) {
return WindowsFileAttributeViews.createDosView(file, followLinks);
}
if(name.equals("user")) {
return new WindowsUserDefinedFileAttributeView(file, followLinks);
}
if(name.equals("owner")) {
return new FileOwnerAttributeViewImpl(new WindowsAclFileAttributeView(file, followLinks));
}
if(name.equals("acl")) {
return new WindowsAclFileAttributeView(file, followLinks);
}
return null;
}
/*
* 获取指定路径标识的文件的基础文件属性
*
* type :文件属性类型,此处仅支持基础文件属性(BasicFileAttributes)和DOS文件属性(DosFileAttributes)
* options:对于符号链接,是否将其链接到目标文件
*/
@Override
@SuppressWarnings("unchecked")
public <A extends BasicFileAttributes> A readAttributes(Path file, Class<A> type, LinkOption... options) throws IOException {
Class<? extends BasicFileAttributeView> view;
if(type == BasicFileAttributes.class) {
view = BasicFileAttributeView.class;
} else if(type == DosFileAttributes.class) {
view = DosFileAttributeView.class;
} else if(type == null) {
throw new NullPointerException();
} else {
throw new UnsupportedOperationException();
}
// 获取file文件的文件属性视图
BasicFileAttributeView attributeView = getFileAttributeView(file, view, options);
// 读取基础的文件属性
return (A) attributeView.readAttributes();
}
/*
* 返回path处文件的文件属性视图
*
* type : 文件属性类型,不同的平台上有不同的实现
* options: 对于符号链接,是否将其链接到目标文件
*/
@Override
@SuppressWarnings("unchecked")
public <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> view, LinkOption... options) {
if(view == null) {
throw new NullPointerException();
}
// 将Path转换为WindowsPath
WindowsPath file = WindowsPath.toWindowsPath(path);
// 对于符号链接,是否将其链接到目标文件
boolean followLinks = Util.followLinks(options);
if(view == UserDefinedFileAttributeView.class) {
return (V) new WindowsUserDefinedFileAttributeView(file, followLinks);
}
if(view == BasicFileAttributeView.class) {
return (V) WindowsFileAttributeViews.createBasicView(file, followLinks);
}
if(view == DosFileAttributeView.class) {
return (V) WindowsFileAttributeViews.createDosView(file, followLinks);
}
if(view == FileOwnerAttributeView.class) {
return (V) new FileOwnerAttributeViewImpl(new WindowsAclFileAttributeView(file, followLinks));
}
if(view == AclFileAttributeView.class) {
return (V) new WindowsAclFileAttributeView(file, followLinks);
}
return null;
}
/*▲ 文件属性(视图) ████████████████████████████████████████████████████████████████████████████████┛ */
/*▼ 杂项 ████████████████████████████████████████████████████████████████████████████████┓ */
// 返回当前文件系统支持的协议,此处支持"file"协议
@Override
public String getScheme() {
return "file";
}
// 从指定的uri中解析出一个有效路径,此处要求改uri的协议为"file"
@Override
public Path getPath(URI uri) {
return WindowsUriSupport.fromUri(theFileSystem, uri);
}
// 判断两个路径(文件)是否相同
@Override
public boolean isSameFile(Path path1, Path path2) throws IOException {
WindowsPath file1 = WindowsPath.toWindowsPath(path1);
if(file1.equals(path2)) {
return true;
}
if(path2 == null) {
throw new NullPointerException();
}
if(!(path2 instanceof WindowsPath)) {
return false;
}
WindowsPath file2 = (WindowsPath) path2;
// check security manager access to both files
file1.checkRead();
file2.checkRead();
// open both files and see if they are the same
long h1 = 0L;
try {
h1 = file1.openForReadAttributeAccess(true);
} catch(WindowsException x) {
x.rethrowAsIOException(file1);
}
try {
WindowsFileAttributes attrs1 = null;
try {
// 返回h1文件的windows文件属性信息
attrs1 = WindowsFileAttributes.readAttributes(h1);
} catch(WindowsException x) {
x.rethrowAsIOException(file1);
}
long h2 = 0L;
try {
h2 = file2.openForReadAttributeAccess(true);
} catch(WindowsException x) {
x.rethrowAsIOException(file2);
}
try {
WindowsFileAttributes attrs2 = null;
try {
// 返回h2文件的windows文件属性信息
attrs2 = WindowsFileAttributes.readAttributes(h2);
} catch(WindowsException x) {
x.rethrowAsIOException(file2);
}
return WindowsFileAttributes.isSameFile(attrs1, attrs2);
} finally {
CloseHandle(h2);
}
} finally {
CloseHandle(h1);
}
}
// 判断obj处的文件是否为隐藏文件
@Override
public boolean isHidden(Path path) throws IOException {
// 将Path转换为WindowsPath
WindowsPath file = WindowsPath.toWindowsPath(path);
file.checkRead();
WindowsFileAttributes attrs = null;
try {
attrs = WindowsFileAttributes.get(file, true);
} catch(WindowsException x) {
x.rethrowAsIOException(file);
}
// DOS hidden attribute not meaningful when set on directories
if(attrs.isDirectory()) {
return false;
}
return attrs.isHidden();
}
// 判断是否可以对path处的文件(需存在)应用指定的访问模式;没有指定访问模式的话,默认检查文件是否可读
@Override
public void checkAccess(Path path, AccessMode... modes) throws IOException {
WindowsPath file = WindowsPath.toWindowsPath(path);
boolean r = false;
boolean w = false;
boolean x = false;
for(AccessMode mode : modes) {
switch(mode) {
case READ:
r = true;
break;
case WRITE:
w = true;
break;
case EXECUTE:
x = true;
break;
default:
throw new AssertionError("Should not get here");
}
}
// special-case read access to avoid needing to determine effective access to file; default if modes not specified
if(!w && !x) {
// 判断给定的文件是否存在且可读
checkReadAccess(file);
return;
}
int mask = 0;
if(r) {
file.checkRead();
mask |= FILE_READ_DATA;
}
if(w) {
file.checkWrite();
mask |= FILE_WRITE_DATA;
}
if(x) {
SecurityManager sm = System.getSecurityManager();
if(sm != null) {
sm.checkExec(file.getPathForPermissionCheck());
}
mask |= FILE_EXECUTE;
}
if(!hasDesiredAccess(file, mask)) {
throw new AccessDeniedException(file.getPathForExceptionMessage(), null, "Permissions does not allow requested access");
}
// for write access we need to check if the DOS readonly attribute and if the volume is read-only
if(w) {
try {
WindowsFileAttributes attrs = WindowsFileAttributes.get(file, true);
if(!attrs.isDirectory() && attrs.isReadOnly()) {
throw new AccessDeniedException(file.getPathForExceptionMessage(), null, "DOS readonly attribute is set");
}
} catch(WindowsException exc) {
exc.rethrowAsIOException(file);
}
// 创建file文件的windows文件存储对象
WindowsFileStore fileStore = WindowsFileStore.create(file);
if(fileStore.isReadOnly()) {
throw new AccessDeniedException(file.getPathForExceptionMessage(), null, "Read-only file system");
}
}
}
/*▲ 杂项 ████████████████████████████████████████████████████████████████████████████████┛ */
// 检查给定的URI是否合规
private void checkUri(URI uri) {
if(!uri.getScheme().equalsIgnoreCase(getScheme())) {
throw new IllegalArgumentException("URI does not match this provider");
}
if(uri.getRawAuthority() != null) {
throw new IllegalArgumentException("Authority component present");
}
String path = uri.getPath();
if(path == null) {
throw new IllegalArgumentException("Path component is undefined");
}
if(!path.equals("/")) {
throw new IllegalArgumentException("Path component should be '/'");
}
if(uri.getRawQuery() != null) {
throw new IllegalArgumentException("Query component present");
}
if(uri.getRawFragment() != null) {
throw new IllegalArgumentException("Fragment component present");
}
}
/**
* Checks if the given file(or directory) exists and is readable.
*/
// 判断给定的文件是否存在且可读
private void checkReadAccess(WindowsPath file) throws IOException {
try {
Set<OpenOption> opts = Collections.emptySet();
// 创建/打开一个文件,并返回其关联的非异步文件通道;这里没有设置操作参数,因而会使用"读"模式操作文件,相当于间接检测了可读性
FileChannel fc = WindowsChannelFactory.newFileChannel(file.getPathForWin32Calls(), file.getPathForPermissionCheck(), opts, 0L);
fc.close();
} catch(WindowsException exc) {
/*
* Windows errors are very inconsistent when the file is a directory
* (ERROR_PATH_NOT_FOUND returned for root directories for example)
* so we retry by attempting to open it as a directory.
*/
try {
new WindowsDirectoryStream(file, null).close();
} catch(IOException ioe) {
// translate and throw original exception
exc.rethrowAsIOException(file);
}
}
}
/**
* Checks the file security against desired access.
*/
private static boolean hasDesiredAccess(WindowsPath file, int rights) throws IOException {
// read security descriptor containing ACL (symlinks are followed)
boolean hasRights = false;
String target = WindowsLinkSupport.getFinalPath(file, true);
NativeBuffer aclBuffer = WindowsAclFileAttributeView.getFileSecurity(target, DACL_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION);
try {
hasRights = checkAccessMask(aclBuffer.address(), rights, FILE_GENERIC_READ, FILE_GENERIC_WRITE, FILE_GENERIC_EXECUTE, FILE_ALL_ACCESS);
} catch(WindowsException exc) {
exc.rethrowAsIOException(file);
} finally {
aclBuffer.release();
}
return hasRights;
}
}
|
3e00b8559390c7a07910241df7bd2008f6115e59 | 1,501 | java | Java | recommender/src/main/java/de/dailab/newsreel/recommender/util/SingleThreadExecutor.java | jasjisdo/spark-newsreel-recommender | 4ea4bb97bf70f853d89db63cd3803b6c0c074248 | [
"Apache-2.0"
] | 6 | 2016-07-12T15:32:00.000Z | 2020-03-28T09:32:25.000Z | recommender/src/main/java/de/dailab/newsreel/recommender/util/SingleThreadExecutor.java | jasjisdo/spark-newsreel-recommender | 4ea4bb97bf70f853d89db63cd3803b6c0c074248 | [
"Apache-2.0"
] | 1 | 2021-06-23T20:25:09.000Z | 2021-06-23T20:25:09.000Z | recommender/src/main/java/de/dailab/newsreel/recommender/util/SingleThreadExecutor.java | jasjisdo/spark-newsreel-recommender | 4ea4bb97bf70f853d89db63cd3803b6c0c074248 | [
"Apache-2.0"
] | 4 | 2016-08-22T06:55:41.000Z | 2019-09-28T10:37:14.000Z | 27.796296 | 91 | 0.624917 | 286 | package de.dailab.newsreel.recommender.util;
import org.apache.log4j.Logger;
import java.util.Random;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ThreadFactory;
/**
* Created by jens on 19.01.16.
*/
public class SingleThreadExecutor {
private static final int MAX_QUEUE_SIZE = 1;
private static final int MAX_SLEEP_TIME = 1000;
private static final int MIN_SLEEP_TIME = 100;
private static final Logger log = Logger.getLogger(SingleThreadExecutor.class);
private final ConcurrentLinkedQueue<Thread> q = new ConcurrentLinkedQueue<>();
private final Random r = new Random(System.currentTimeMillis());
public SingleThreadExecutor() {
new Thread() {
@Override
public void run() {
while (true)
execution();
}
}.start();
}
private void execution() {
try {
Thread.currentThread().sleep(sleepTime());
} catch (InterruptedException e) {
log.warn("Worker Thread interrupted while being idle",e);
}
if (q.isEmpty()) return;
Thread current = q.poll();
current.run();
return;
}
private long sleepTime() {
Double range = r.nextDouble() * (MAX_SLEEP_TIME - MIN_SLEEP_TIME) + MIN_SLEEP_TIME;
return range.longValue();
}
public void submit(Thread thread) {
if (q.size() >= MAX_QUEUE_SIZE) return;
q.add(thread);
}
}
|
3e00b97c69138a1b8d611d478ff5f1a334146be2 | 10,242 | java | Java | servicetalk-concurrent-api/src/testFixtures/java/io/servicetalk/concurrent/api/TestCollectingPublisherSubscriber.java | shekhar-rajak/servicetalk | 412222cb49cb54101f8d8afc79c52a5c3f1f6e6a | [
"Apache-2.0"
] | 1 | 2020-06-20T06:16:02.000Z | 2020-06-20T06:16:02.000Z | servicetalk-concurrent-api/src/testFixtures/java/io/servicetalk/concurrent/api/TestCollectingPublisherSubscriber.java | shekhar-rajak/servicetalk | 412222cb49cb54101f8d8afc79c52a5c3f1f6e6a | [
"Apache-2.0"
] | 6 | 2020-09-23T02:02:23.000Z | 2021-12-29T02:02:05.000Z | servicetalk-concurrent-api/src/testFixtures/java/io/servicetalk/concurrent/api/TestCollectingPublisherSubscriber.java | shekhar-rajak/servicetalk | 412222cb49cb54101f8d8afc79c52a5c3f1f6e6a | [
"Apache-2.0"
] | null | null | null | 42.675 | 117 | 0.673599 | 287 | /*
* Copyright © 2020 Apple Inc. and the ServiceTalk project authors
*
* 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 io.servicetalk.concurrent.api;
import io.servicetalk.concurrent.PublisherSource.Subscriber;
import io.servicetalk.concurrent.PublisherSource.Subscription;
import io.servicetalk.concurrent.internal.TerminalNotification;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import static io.servicetalk.concurrent.internal.TerminalNotification.complete;
import static io.servicetalk.concurrent.internal.TerminalNotification.error;
import static java.util.Objects.requireNonNull;
import static java.util.stream.Collectors.toList;
/**
* A {@link Subscriber} that enqueues {@link #onNext(Object)} and terminal signals while providing blocking methods
* to consume these events. There are two approaches to using this class:
* <pre>
* TestCollectingPublisherSubscriber<String> sub = new TestCollectingPublisherSubscriber<>();
*
* // Approach 1 - verify individual items sequentially.
* String s = sub.takeOnNext();
* // verify s
* sub.awaitOnComplete(); // this will verify that all onNext signals have been consumed
*
* // Approach 2 - wait for terminal, verify items in bulk.
* sub.awaitOnComplete(false); // wait for the terminal signal, ignore if there are unconsumed onNext signals.
* List<String> onNextSignals = sub.pollAllOnNext();
* // verify all onNextSignals occurred in the expected order
* </pre>
* @param <T> The type of data in {@link #onNext(Object)}.
*/
public final class TestCollectingPublisherSubscriber<T> implements Subscriber<T> {
private static final Object NULL_ON_NEXT = new Object();
private final BlockingQueue<Object> items = new LinkedBlockingQueue<>();
private final CountDownLatch onTerminalLatch = new CountDownLatch(1);
private final CountDownLatch onSubscribeLatch = new CountDownLatch(1);
@Nullable
private TerminalNotification onTerminal;
@Nullable
private Subscription subscription;
@Override
public void onSubscribe(final Subscription subscription) {
requireNonNull(subscription,
"Null Subscription is not permitted " +
"https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.3/README.md#2.13");
verifyNoTerminal("onSubscribe", null, false);
if (this.subscription != null) {
throw new IllegalStateException("The Subscription has already been set to " + this.subscription +
". New Subscription " + subscription + " is not supported.");
}
this.subscription = subscription;
onSubscribeLatch.countDown();
}
@Override
public void onNext(@Nullable final T t) {
verifyOnSubscribedAndNoTerminal("onNext", t, true);
items.add(t == null ? NULL_ON_NEXT : t);
}
@Override
public void onError(final Throwable t) {
verifyOnSubscribedAndNoTerminal("onError", t, true);
onTerminal = error(t);
onTerminalLatch.countDown();
}
@Override
public void onComplete() {
verifyOnSubscribedAndNoTerminal("onComplete", null, false);
onTerminal = complete();
onTerminalLatch.countDown();
}
private void verifyNoTerminal(String method, @Nullable Object param, boolean useParam) {
if (onTerminal != null) {
throw new IllegalStateException("Subscriber has already terminated [" + onTerminal +
"] " + method + (useParam ? " [ " + param + "]" : "") + " is not valid. " +
"See https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.3/README.md#1.7");
}
}
private void verifyOnSubscribedAndNoTerminal(String method, @Nullable Object param, boolean useParam) {
verifyNoTerminal(method, param, useParam);
if (subscription == null) {
throw new IllegalStateException("onSubscribe must be called before any other signals. " +
"https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.3/README.md#1.9");
}
}
/**
* Block until {@link #onSubscribe(Subscription)}.
*
* @return The {@link Subscription} from {@link #onSubscribe(Subscription)}.
* @throws InterruptedException if an interrupt occurs while blocking for waiting for
* {@link #onSubscribe(Subscription)}.
*/
public Subscription awaitSubscription() throws InterruptedException {
onSubscribeLatch.await();
assert subscription != null;
return subscription;
}
/**
* Blocks until the next {@link #onNext(Object)} method invocation.
*
* @return item delivered to {@link #onNext(Object)}.
* @throws InterruptedException if an interrupt occurs while blocking for the next item.
*/
@Nullable
@SuppressWarnings("unchecked")
public T takeOnNext() throws InterruptedException {
Object item = items.take();
return item == NULL_ON_NEXT ? null : (T) item;
}
/**
* Consume all currently available {@link #onNext(Object)} signals.
*
* @return {@link List} containing all currently available {@link #onNext(Object)} signals.
*/
@SuppressWarnings("unchecked")
public List<T> pollAllOnNext() {
List<Object> consumedItems = new ArrayList<>();
items.drainTo(consumedItems);
return consumedItems.stream().map(item -> item == NULL_ON_NEXT ? null : (T) item).collect(toList());
}
/**
* Block until a terminal signal is received, throws if {@link #onComplete()} and returns normally if
* {@link #onError(Throwable)}. This method will verify that all {@link #onNext(Object)} signals have been
* consumed.
*
* @return the exception received by {@link #onError(Throwable)}.
* @throws InterruptedException If an interrupt occurs while blocking for the terminal event.
*/
public Throwable awaitOnError() throws InterruptedException {
return awaitOnError(true);
}
/**
* Block until a terminal signal is received, throws if {@link #onComplete()} and returns normally if
* {@link #onError(Throwable)}.
*
* @param verifyOnNextConsumed {@code true} to verify that all {@link #onNext(Object)} signals have been consumed
* and throw if not. {@code false} to ignore if {@link #onNext(Object)} signals have been consumed or not.
* @return the exception received by {@link #onError(Throwable)}.
* @throws InterruptedException If an interrupt occurs while blocking for the terminal event.
*/
public Throwable awaitOnError(boolean verifyOnNextConsumed) throws InterruptedException {
onTerminalLatch.await();
assert onTerminal != null;
if (onTerminal == complete()) {
throw new IllegalStateException("wanted onError but Subscriber terminated with onComplete");
}
assert onTerminal.cause() != null;
if (verifyOnNextConsumed) {
verifyAllOnNextProcessed();
}
return onTerminal.cause();
}
/**
* Block until a terminal signal is received, throws if {@link #onError(Throwable)} and returns normally if
* {@link #onComplete()}. This method will verify that all {@link #onNext(Object)} signals have been consumed.
*
* @throws InterruptedException If an interrupt occurs while blocking for the terminal event.
*/
public void awaitOnComplete() throws InterruptedException {
awaitOnComplete(true);
}
/**
* Block until a terminal signal is received, throws if {@link #onError(Throwable)} and returns normally if
* {@link #onComplete()}.
*
* @param verifyOnNextConsumed {@code true} to verify that all {@link #onNext(Object)} signals have been consumed
* and throw if not. {@code false} to ignore if {@link #onNext(Object)} signals have been consumed or not.
* @throws InterruptedException If an interrupt occurs while blocking for the terminal event.
*/
public void awaitOnComplete(boolean verifyOnNextConsumed) throws InterruptedException {
onTerminalLatch.await();
assert onTerminal != null;
if (onTerminal != complete()) {
throw new IllegalStateException("wanted onComplete but Subscriber terminated with onError",
onTerminal.cause());
}
if (verifyOnNextConsumed) {
verifyAllOnNextProcessed();
}
}
/**
* Block for a terminal event.
*
* @param timeout The duration of time to wait.
* @param unit The unit of time to apply to the duration.
* @return {@code true} if a terminal event has been received before the timeout duration.
* @throws InterruptedException If an interrupt occurs while blocking for the terminal event.
*/
public boolean pollTerminal(long timeout, TimeUnit unit) throws InterruptedException {
return onTerminalLatch.await(timeout, unit);
}
private void verifyAllOnNextProcessed() {
if (!items.isEmpty()) {
StringBuilder b = new StringBuilder();
int itemCount = 0;
Object item;
while ((item = items.poll()) != null) {
++itemCount;
b.append("[").append(item == NULL_ON_NEXT ? null : item).append("] ");
}
throw new IllegalStateException(itemCount + " onNext items were not processed: " + b.toString());
}
}
}
|
3e00b989485d8d1a2ead28cbfac6a83a6b291ff0 | 8,338 | java | Java | wave/src/main/java/org/waveprotocol/wave/model/adt/docbased/DocumentBasedMonotonicValue.java | ADSempere/incubator-retired-wave | 1231ce99afb54491005f37183b25b3def010b68d | [
"Apache-2.0"
] | 163 | 2015-04-21T15:48:00.000Z | 2020-04-29T17:03:26.000Z | wave/src/main/java/org/waveprotocol/wave/model/adt/docbased/DocumentBasedMonotonicValue.java | tobiasquinteiro/incubator-retired-wave | e4cb87ffce3b7c65832ffefae22835c64724adbd | [
"Apache-2.0"
] | 236 | 2015-05-07T13:03:10.000Z | 2018-08-29T18:15:23.000Z | wave/src/main/java/org/waveprotocol/wave/model/adt/docbased/DocumentBasedMonotonicValue.java | tobiasquinteiro/incubator-retired-wave | e4cb87ffce3b7c65832ffefae22835c64724adbd | [
"Apache-2.0"
] | 52 | 2015-01-25T02:11:06.000Z | 2018-11-28T12:00:21.000Z | 29.992806 | 99 | 0.687575 | 288 | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 org.waveprotocol.wave.model.adt.docbased;
import org.waveprotocol.wave.model.adt.ObservableMonotonicValue;
import org.waveprotocol.wave.model.document.ObservableMutableDocument;
import org.waveprotocol.wave.model.document.util.DocHelper;
import org.waveprotocol.wave.model.document.util.DocumentEventRouter;
import org.waveprotocol.wave.model.util.CopyOnWriteSet;
import org.waveprotocol.wave.model.util.ElementListener;
import org.waveprotocol.wave.model.util.Preconditions;
import org.waveprotocol.wave.model.util.Serializer;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* Provides a monotonically increasing value, implemented using a region of a
* concurrent document.
*
*/
public class DocumentBasedMonotonicValue<E, C extends Comparable<C>>
implements ObservableMonotonicValue<C>, ElementListener<E> {
/** Backing document service. */
private final DocumentEventRouter<? super E, E, ?> router;
/** Serializer for converting between attribute values and entry values. */
private final Serializer<C> serializer;
/** Element containing value entries. */
private final E container;
/** Name to use for entry elements. */
private final String entryTagName;
/** Name to use for the value attribute. */
private final String valueAttrName;
/** Element holding the current value. */
private E value;
private final Set<E> obsoleteEntries = new HashSet<E>();
/** Listeners. */
private final CopyOnWriteSet<Listener<? super C>> listeners = CopyOnWriteSet.create();
/**
* Creates a monotonic map.
*
* @param router router for the document holding the map state
* @param entryContainer element in which entry elements should be created
* @param serializer converter between strings and values
* @param entryTagName name to use for entry elements
* @param valueAttrName name to use for value attributes
*/
private DocumentBasedMonotonicValue(DocumentEventRouter<? super E, E, ?> router,
E entryContainer, Serializer<C> serializer, String entryTagName, String valueAttrName) {
this.router = router;
this.container = entryContainer;
this.serializer = serializer;
this.entryTagName = entryTagName;
this.valueAttrName = valueAttrName;
}
/**
* Creates a monotonic map.
*
* @see #DocumentBasedMonotonicValue(DocumentEventRouter, Object, Serializer, String, String)
*/
public static <E, C extends Comparable<C>> DocumentBasedMonotonicValue<E, C> create(
DocumentEventRouter<? super E, E, ?> router,
E entryContainer, Serializer<C> serializer,
String entryTagName, String valueAttrName) {
DocumentBasedMonotonicValue<E, C> value = new DocumentBasedMonotonicValue<E, C>(
router, entryContainer, serializer, entryTagName, valueAttrName);
router.addChildListener(entryContainer, value);
value.load();
return value;
}
private ObservableMutableDocument<? super E, E, ?> getDocument() {
return router.getDocument();
}
/**
* Loads from the document state, aggressively removing obsolete values.
*/
private void load() {
ObservableMutableDocument<? super E, E, ?> document = getDocument();
E value = DocHelper.getFirstChildElement(document, container);
E nextValue;
while (value != null) {
nextValue = DocHelper.getNextSiblingElement(document, value);
onElementAdded(value);
value = nextValue;
}
}
/**
* {@inheritDoc}
*/
@Override
public C get() {
return (value != null) ? valueOf(value) : null;
}
/**
* {@inheritDoc}
*/
@Override
public void set(C value) {
Preconditions.checkNotNull(value, "value must not be null");
C currentValue = get();
if (currentValue == null || currentValue.compareTo(value) < 0) {
createEntry(value);
cleanup();
}
}
/**
* Deletes the cached entry element for a particular key, if one exists.
*/
private void invalidateCacheEntry() {
invalidateEntry(value);
value = null;
}
/**
* Deletes an entry from the document.
*
* @param entry
*/
private void invalidateEntry(E entry) {
if (entry != null) {
obsoleteEntries.add(entry);
}
}
/**
* Creates an entry element for the specified map entry.
*
* @param value
*/
private void createEntry(C value) {
Map<String, String> attrs = new HashMap<String, String>();
attrs.put(valueAttrName, serializer.toString(value));
E entry = getDocument().createChildElement(container, entryTagName, attrs);
}
private void cleanup() {
if (!obsoleteEntries.isEmpty()) {
ObservableMutableDocument<? super E, E, ?> document = getDocument();
Collection<E> toDelete = new ArrayList<E>(obsoleteEntries);
for (E e : toDelete) {
document.deleteNode(e);
}
// Deletion callbacks should cleanup obsoleteEntries collection one by one.
assert obsoleteEntries.isEmpty();
}
}
/**
* Gets the value of an entry.
*
* @param entry
* @return the value of an entry.
*/
private C valueOf(E entry) {
return serializer.fromString(getDocument().getAttribute(entry, valueAttrName));
}
//
// Document mutation callbacks.
//
/**
* Clears the cache reference to an entry, if the cache refers to it, in
* response to an entry element being removed.
*/
@Override
public void onElementRemoved(E entry) {
if (!entryTagName.equals(getDocument().getTagName(entry))) {
return;
}
// It is possible, in transient states, that there are multiple entries in the document for the
// same key. Therefore, we can not blindly remove the entry from the cache based on key alone.
if (value == entry) {
C oldValue = get();
value = null;
triggerOnEntryChanged(oldValue, null);
} else {
obsoleteEntries.remove(entry);
}
}
/**
* Updates the entry cache, if necessary, in response to an entry element
* being added.
*
* This method also aggressively deletes any entries that are not greater
* than the cached entry.
*/
@Override
public void onElementAdded(E entry) {
ObservableMutableDocument<? super E, E, ?> document = getDocument();
assert container.equals(document.getParentElement(entry));
if (!entryTagName.equals(document.getTagName(entry))) {
return;
}
C newValue = valueOf(entry);
C oldValue = get();
// If the new value should end up in the cache, delete the old one (if applicable) and update
// the entry cache.
// Otherwise, the new value is aggressively deleted.
if (oldValue == null || oldValue.compareTo(newValue) < 0) {
invalidateCacheEntry(); // This should clean up the old entry in onEntryRemoved.
value = entry;
triggerOnEntryChanged(oldValue, newValue);
} else {
invalidateEntry(entry);
}
}
/**
* Broadcasts a state-change event to registered listeners.
*
* @param oldValue old value
* @param newValue new value
*/
private void triggerOnEntryChanged(C oldValue, C newValue) {
for (Listener<? super C> l : listeners) {
l.onSet(oldValue, newValue);
}
}
/**
* {@inheritDoc}
*/
@Override
public void addListener(Listener<? super C> l) {
listeners.add(l);
}
/**
* {@inheritDoc}
*/
@Override
public void removeListener(Listener<? super C> l) {
listeners.remove(l);
}
}
|
3e00b99e4dd26fc1394fc008d30926239d86aa24 | 407 | java | Java | src/main/java/cn/ning3f1/wechat/message/req/TextMessage.java | NingeekW/SIMSoBaseOnWechat | fe3b18d41258df967a6857fdf5aec1dab9bf562a | [
"MIT"
] | null | null | null | src/main/java/cn/ning3f1/wechat/message/req/TextMessage.java | NingeekW/SIMSoBaseOnWechat | fe3b18d41258df967a6857fdf5aec1dab9bf562a | [
"MIT"
] | null | null | null | src/main/java/cn/ning3f1/wechat/message/req/TextMessage.java | NingeekW/SIMSoBaseOnWechat | fe3b18d41258df967a6857fdf5aec1dab9bf562a | [
"MIT"
] | null | null | null | 18.5 | 48 | 0.611794 | 289 | package cn.ning3f1.wechat.message.req;
/**
* ClassName:TextMessage.java
* @Description:文本消息
* @author Ning
*
* @time 2017年1月11日上午10:55:17
*
*/
public class TextMessage extends BaseMessage {
// 消息内容
private String Content;
public String getContent() {
return Content;
}
public void setContent(String content) {
Content = content;
}
} |
3e00ba2190aa6cfc6baea603a444bf0541e3c773 | 8,342 | java | Java | topsoilApp/src/main/java/org/cirdles/topsoil/app/control/plot/panel/DataOptionsController.java | GarreBrenn/Topsoil | c7555ab416fac8e16f6507c06643fc1b52978e44 | [
"Apache-2.0"
] | 14 | 2015-02-04T02:51:31.000Z | 2019-08-29T14:39:27.000Z | topsoilApp/src/main/java/org/cirdles/topsoil/app/control/plot/panel/DataOptionsController.java | GarreBrenn/Topsoil | c7555ab416fac8e16f6507c06643fc1b52978e44 | [
"Apache-2.0"
] | 203 | 2015-01-29T16:40:36.000Z | 2020-09-28T15:56:12.000Z | topsoilApp/src/main/java/org/cirdles/topsoil/app/control/plot/panel/DataOptionsController.java | GarreBrenn/Topsoil | c7555ab416fac8e16f6507c06643fc1b52978e44 | [
"Apache-2.0"
] | 45 | 2015-01-16T15:19:32.000Z | 2020-06-12T10:04:01.000Z | 45.584699 | 131 | 0.73112 | 290 | package org.cirdles.topsoil.app.control.plot.panel;
import javafx.beans.binding.Bindings;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import org.cirdles.topsoil.app.control.FXMLUtils;
import org.cirdles.topsoil.IsotopeSystem;
import org.cirdles.topsoil.data.Uncertainty;
import org.cirdles.topsoil.plot.PlotOption;
import java.io.IOException;
import static org.cirdles.topsoil.app.control.plot.panel.PlotOptionsPanel.fireEventOnChanged;
public class DataOptionsController extends AnchorPane {
//**********************************************//
// CONSTANTS //
//**********************************************//
private static final String CONTROLLER_FXML = "data-options-menu.fxml";
//**********************************************//
// CONTROLS //
//**********************************************//
@FXML ComboBox<IsotopeSystem> isotopeSystemComboBox;
@FXML ComboBox<Uncertainty> uncertaintyComboBox;
@FXML CheckBox pointsCheckBox;
@FXML ColorPicker pointsFillColorPicker;
@FXML CheckBox uncertaintyCheckBox;
@FXML RadioButton ellipsesRadioButton;
@FXML ColorPicker ellipsesFillColorPicker;
@FXML RadioButton unctBarsRadioButton;
@FXML ColorPicker unctBarsFillColorPicker;
@FXML CheckBox showUnincludedCheckBox;
private ToggleGroup uncertaintyToggleGroup = new ToggleGroup();
//**********************************************//
// PROPERTIES //
//**********************************************//
private StringProperty pointsFillValue = new SimpleStringProperty();
private DoubleProperty pointsOpacityValue = new SimpleDoubleProperty(1.0);
private StringProperty ellipsesFillValue = new SimpleStringProperty();
private DoubleProperty ellipsesOpacityValue = new SimpleDoubleProperty(1.0);
private StringProperty unctBarsFillValue = new SimpleStringProperty();
private DoubleProperty unctBarsOpacityValue = new SimpleDoubleProperty(1.0);
//**********************************************//
// CONSTRUCTORS //
//**********************************************//
public DataOptionsController() {
try {
FXMLUtils.loadController(CONTROLLER_FXML, DataOptionsController.class, this);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@FXML protected void initialize() {
// Populate IsotopeSystem ComboBox
isotopeSystemComboBox.getItems().addAll(IsotopeSystem.values());
isotopeSystemComboBox.getSelectionModel().select(IsotopeSystem.GENERIC);
// Populate Uncertainty ComboBox
uncertaintyComboBox.getItems().addAll(Uncertainty.ONE_SIGMA_ABSOLUTE, Uncertainty
.TWO_SIGMA_ABSOLUTE, Uncertainty.NINETY_FIVE_PERCENT_CONFIDENCE);
uncertaintyComboBox.getSelectionModel().select(Uncertainty.ONE_SIGMA_ABSOLUTE);
// Configure ellipses/unctbars RadioButtons
RadioButtonSelectionHandler ellipsesSelectionHandler = new RadioButtonSelectionHandler(ellipsesRadioButton);
ellipsesRadioButton.setToggleGroup(uncertaintyToggleGroup);
ellipsesRadioButton.setOnMousePressed(ellipsesSelectionHandler.getOnMousePressed());
ellipsesRadioButton.setOnMouseReleased(ellipsesSelectionHandler.getOnMouseReleased());
RadioButtonSelectionHandler unctBarsSelectionHandler = new RadioButtonSelectionHandler(unctBarsRadioButton);
unctBarsRadioButton.setToggleGroup(uncertaintyToggleGroup);
unctBarsRadioButton.setOnMousePressed(unctBarsSelectionHandler.getOnMousePressed());
unctBarsRadioButton.setOnMouseReleased(unctBarsSelectionHandler.getOnMouseReleased());
uncertaintyToggleGroup.selectedToggleProperty().addListener((obsVal, oldVal, newVal) -> {
if (newVal == null)
oldVal.setSelected(true);
});
// Configure disableProperty functionality
ellipsesRadioButton.disableProperty().bind(Bindings.or(uncertaintyCheckBox.disableProperty(),
Bindings.not(uncertaintyCheckBox.selectedProperty())));
ellipsesFillColorPicker.disableProperty().bind(Bindings.or(ellipsesRadioButton.disableProperty(),
Bindings.not(ellipsesRadioButton.selectedProperty())));
unctBarsRadioButton.disableProperty().bind(Bindings.or(uncertaintyCheckBox.disableProperty(),
Bindings.not(uncertaintyCheckBox.selectedProperty())));
unctBarsFillColorPicker.disableProperty().bind(Bindings.or(unctBarsRadioButton.disableProperty(),
Bindings.not(unctBarsRadioButton.selectedProperty())));
// Configure properties that need to have values converted
pointsFillValue.bind(Bindings.createStringBinding(() -> PlotOptionsPanel.convertColor(pointsFillColorPicker.getValue()),
pointsFillColorPicker.valueProperty()));
pointsOpacityValue.bind(Bindings.createDoubleBinding(() -> PlotOptionsPanel.convertOpacity(pointsFillColorPicker.getValue()),
pointsFillColorPicker.valueProperty()));
ellipsesFillValue.bind(Bindings.createStringBinding(() -> PlotOptionsPanel.convertColor(ellipsesFillColorPicker.getValue()),
ellipsesFillColorPicker.valueProperty()));
ellipsesOpacityValue.bind(Bindings.createDoubleBinding(() -> PlotOptionsPanel.convertOpacity(ellipsesFillColorPicker.getValue()),
ellipsesFillColorPicker.valueProperty()));
unctBarsFillValue.bind(Bindings.createStringBinding(() -> PlotOptionsPanel. convertColor(unctBarsFillColorPicker.getValue()),
unctBarsFillColorPicker.valueProperty()));
unctBarsOpacityValue.bind(Bindings.createDoubleBinding(() -> PlotOptionsPanel.convertOpacity(unctBarsFillColorPicker.getValue()),
unctBarsFillColorPicker.valueProperty()));
// Fire property changed events
fireEventOnChanged(isotopeSystemComboBox.valueProperty(), isotopeSystemComboBox, PlotOption.ISOTOPE_SYSTEM);
fireEventOnChanged(uncertaintyComboBox.valueProperty(), uncertaintyComboBox, PlotOption.UNCERTAINTY);
fireEventOnChanged(pointsCheckBox.selectedProperty(), pointsCheckBox, PlotOption.POINTS);
fireEventOnChanged(uncertaintyCheckBox.selectedProperty(), uncertaintyCheckBox, PlotOption.UNCTBARS);
fireEventOnChanged(uncertaintyCheckBox.selectedProperty(), uncertaintyCheckBox, PlotOption.ELLIPSES);
fireEventOnChanged(ellipsesRadioButton.selectedProperty(), ellipsesRadioButton, PlotOption.ELLIPSES);
fireEventOnChanged(unctBarsRadioButton.selectedProperty(), unctBarsRadioButton, PlotOption.UNCTBARS);
fireEventOnChanged(showUnincludedCheckBox.selectedProperty(), showUnincludedCheckBox, PlotOption.SHOW_UNINCLUDED);
fireEventOnChanged(pointsFillValue, pointsFillColorPicker, PlotOption.POINTS_FILL);
fireEventOnChanged(pointsOpacityValue, pointsFillColorPicker, PlotOption.POINTS_OPACITY);
fireEventOnChanged(ellipsesFillValue, ellipsesFillColorPicker, PlotOption.ELLIPSES_FILL);
fireEventOnChanged(ellipsesOpacityValue, ellipsesFillColorPicker, PlotOption.ELLIPSES_OPACITY);
fireEventOnChanged(unctBarsFillValue, unctBarsFillColorPicker, PlotOption.UNCTBARS_FILL);
fireEventOnChanged(unctBarsOpacityValue, unctBarsFillColorPicker, PlotOption.UNCTBARS_OPACITY);
uncertaintyCheckBox.fire();
showUnincludedCheckBox.fire();
}
//**********************************************//
// INNER CLASSES //
//**********************************************//
private static class RadioButtonSelectionHandler {
private RadioButton button;
private boolean selected;
private EventHandler<MouseEvent> onMousePressed = (event) -> {
if (button.isSelected()) {
selected = true;
}
};
private EventHandler<MouseEvent> onMouseReleased = (event) -> {
if (selected) {
button.setSelected(false);
}
selected = false;
};
RadioButtonSelectionHandler(RadioButton button) {
this.button = button;
}
EventHandler<MouseEvent> getOnMousePressed() {
return onMousePressed;
}
EventHandler<MouseEvent> getOnMouseReleased() {
return onMouseReleased;
}
}
} |
3e00bac5dd3c20de27d3ceec0782e423dee69cbb | 822 | java | Java | src/main/java/com/storefront/model/OrderStatusEvent.java | bilelibrahim/orders | 7ed02dbc3fece4dacc7509412e3b8a051a944c3f | [
"Apache-2.0"
] | 5 | 2018-07-09T06:58:29.000Z | 2021-06-30T09:32:43.000Z | src/main/java/com/storefront/model/OrderStatusEvent.java | bilelibrahim/orders | 7ed02dbc3fece4dacc7509412e3b8a051a944c3f | [
"Apache-2.0"
] | null | null | null | src/main/java/com/storefront/model/OrderStatusEvent.java | bilelibrahim/orders | 7ed02dbc3fece4dacc7509412e3b8a051a944c3f | [
"Apache-2.0"
] | 11 | 2018-11-16T12:48:42.000Z | 2022-01-16T12:08:31.000Z | 21.631579 | 77 | 0.708029 | 291 | package com.storefront.model;
import lombok.Data;
import lombok.NonNull;
import java.sql.Timestamp;
@Data
public class OrderStatusEvent {
@NonNull
private Long timestamp;
@NonNull
private OrderStatusType orderStatusType;
private String note;
public OrderStatusEvent() {
this.timestamp = new Timestamp(System.currentTimeMillis()).getTime();
}
public OrderStatusEvent(OrderStatusType orderStatusType) {
this.timestamp = new Timestamp(System.currentTimeMillis()).getTime();
this.orderStatusType = orderStatusType;
}
public OrderStatusEvent(OrderStatusType orderStatusType, String note) {
this.timestamp = new Timestamp(System.currentTimeMillis()).getTime();
this.orderStatusType = orderStatusType;
this.note = note;
}
}
|
3e00bad25afc9a65557532d1d3ace37f078da087 | 1,056 | java | Java | htmlelements-matchers/src/main/java/ru/yandex/qatools/htmlelements/matchers/decorators/Waiter.java | artkoshelev/htmlelements | 24b01068026b43ee10b8595c7b59fdbcea8046bd | [
"Apache-2.0"
] | 213 | 2015-01-04T00:30:57.000Z | 2022-03-21T14:14:18.000Z | htmlelements-matchers/src/main/java/ru/yandex/qatools/htmlelements/matchers/decorators/Waiter.java | groov1kk/htmlelements | b94936252495abeeb06a4a451fe02ae3828428b4 | [
"Apache-2.0"
] | 80 | 2015-01-23T10:23:50.000Z | 2022-03-15T05:58:52.000Z | htmlelements-matchers/src/main/java/ru/yandex/qatools/htmlelements/matchers/decorators/Waiter.java | groov1kk/htmlelements | b94936252495abeeb06a4a451fe02ae3828428b4 | [
"Apache-2.0"
] | 113 | 2015-01-05T03:30:16.000Z | 2022-01-25T10:35:43.000Z | 24.159091 | 77 | 0.707432 | 292 | package ru.yandex.qatools.htmlelements.matchers.decorators;
import org.hamcrest.SelfDescribing;
import static java.util.concurrent.TimeUnit.SECONDS;
/**
* @author Alexander Tolmachev efpyi@example.com
* Date: 01.03.13
*/
public abstract class Waiter implements SelfDescribing {
private static final long DEFAULT_POLLING_INTERVAL = SECONDS.toMillis(1);
private long pollingInterval;
private long startTime;
protected Waiter() {
pollingInterval = DEFAULT_POLLING_INTERVAL;
}
public void startWaiting() {
startTime = System.currentTimeMillis();
}
public abstract boolean shouldStopWaiting();
public long getPollingInterval() {
return pollingInterval;
}
public Waiter withPollingInterval(long pollingInterval) {
setPollingInterval(pollingInterval);
return this;
}
protected long getStartTime() {
return startTime;
}
protected void setPollingInterval(long pollingInterval) {
this.pollingInterval = pollingInterval;
}
}
|
3e00bae8e6f67389455b6b4b99b438da2afc9860 | 3,546 | java | Java | src/main/java/org/bklab/flow/CruEntityDialogForm.java | CNBroderick/vaadin-14-flow | 73835ded553058120351e9a4f775a4471a63e887 | [
"Unlicense"
] | null | null | null | src/main/java/org/bklab/flow/CruEntityDialogForm.java | CNBroderick/vaadin-14-flow | 73835ded553058120351e9a4f775a4471a63e887 | [
"Unlicense"
] | 14 | 2021-03-10T11:31:38.000Z | 2022-02-18T23:06:22.000Z | src/main/java/org/bklab/flow/CruEntityDialogForm.java | CNBroderick/vaadin-14-flow | 73835ded553058120351e9a4f775a4471a63e887 | [
"Unlicense"
] | null | null | null | 29.747899 | 121 | 0.666102 | 293 | /*
* Copyright (c) 2008 - 2020. - Broderick Labs.
* Author: Broderick Johansson
* E-mail: anpch@example.com
* Modify date:2020-03-25 18:41:12
* _____________________________
* Project name: vaadin-14-flow
* Class name:org.bklab.flow.CruEntityDialogForm
* Copyright (c) 2008 - 2020. - Broderick Labs.
*/
package org.bklab.flow;
import com.vaadin.flow.component.dialog.Dialog;
import com.vaadin.flow.data.binder.Binder;
import org.bklab.flow.dialog.ConfirmedDialog;
import org.bklab.flow.dialog.ErrorDialog;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Consumer;
public abstract class CruEntityDialogForm<T> {
protected final ConfirmedDialog dialog = new ConfirmedDialog();
private final Map<String, Object> property = new ConcurrentHashMap<>();
protected T entity;
protected Boolean updateMode = Boolean.FALSE;
protected Boolean readMode = Boolean.FALSE;
protected String title = "";
protected List<Consumer<T>> saveListeners = new ArrayList<>();
private CruEntityDialogForm() {
}
public CruEntityDialogForm(T entity) {
this.entity = entity;
this.updateMode = Boolean.TRUE;
}
public CruEntityDialogForm(Class<T> t) {
try {
this.entity = t.getDeclaredConstructor().newInstance();
} catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
e.printStackTrace();
}
}
public CruEntityDialogForm<T> readMode() {
this.updateMode = Boolean.FALSE;
this.readMode = Boolean.TRUE;
return this;
}
protected CruEntityDialogForm<T> addProperty(String name, Object property) {
this.property.put(name, property);
return this;
}
protected <E> E getProperty(String name) {
return (E) this.property.getOrDefault(name, null);
}
protected <E> E getProperty(String name, E defaultValue) {
return (E) this.property.getOrDefault(name, defaultValue);
}
protected CruEntityDialogForm<T> updateTitle(String title) {
if (updateMode) this.title = title;
return this;
}
protected CruEntityDialogForm<T> readTitle(String title) {
if (readMode) this.title = title;
return this;
}
protected CruEntityDialogForm<T> createTitle(String title) {
if (!updateMode) this.title = title;
return this;
}
protected String generateTitle(String create, String update, String query) {
if (updateMode) this.title = update;
if (!updateMode) this.title = create;
if (readMode) this.title = query;
return title;
}
public Dialog create() {
try {
return createDialog();
} catch (Exception e) {
e.printStackTrace();
return new ErrorDialog("打开对话框失败:" + e.getLocalizedMessage()).throwable(e).create();
}
}
public CruEntityDialogForm<T> addSaveListener(Consumer<T> saveListener) {
if (saveListener != null) this.saveListeners.add(saveListener);
return this;
}
protected Binder<T> createBinder() {
Binder<T> binder = new Binder<>();
binder.setBean(entity);
return binder;
}
protected void callSaveListeners() {
this.saveListeners.forEach(t -> t.accept(entity));
}
abstract protected Dialog createDialog();
}
|
3e00bae9b9139d8b899401d13e709e5b89cd764f | 3,568 | java | Java | src/VR/org/vivecraft/gui/GuiRadial.java | jrbudda/Vivecraft_117 | b562f40c326c933b2a01a8268890332c4c43b3b4 | [
"BSD-3-Clause"
] | 56 | 2021-07-24T00:24:19.000Z | 2022-03-10T19:53:26.000Z | src/VR/org/vivecraft/gui/GuiRadial.java | jrbudda/Vivecraft_117 | b562f40c326c933b2a01a8268890332c4c43b3b4 | [
"BSD-3-Clause"
] | 25 | 2021-08-16T16:59:22.000Z | 2022-02-23T22:41:48.000Z | src/VR/org/vivecraft/gui/GuiRadial.java | jrbudda/Vivecraft_117 | b562f40c326c933b2a01a8268890332c4c43b3b4 | [
"BSD-3-Clause"
] | 18 | 2021-07-29T07:25:46.000Z | 2022-03-28T23:09:28.000Z | 26.043796 | 101 | 0.400785 | 294 | package org.vivecraft.gui;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.KeyMapping;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.resources.language.I18n;
import org.vivecraft.gui.framework.TwoHandedScreen;
import org.vivecraft.provider.MCVR;
import org.vivecraft.provider.openvr_jna.VRInputAction;
public class GuiRadial extends TwoHandedScreen
{
private boolean isShift = false;
String[] arr;
public void init()
{
this.arr = this.minecraft.vrSettings.vrRadialItems;
String[] astring = this.minecraft.vrSettings.vrRadialItemsAlt;
this.clearWidgets();
int i = 8;
int j = 120;
int k = 360 / i;
int l = 48;
int i1 = this.width / 2;
int j1 = this.height / 2;
if (this.isShift)
{
this.arr = astring;
}
for (int k1 = 0; k1 < i; ++k1)
{
KeyMapping keymapping = null;
for (KeyMapping keymapping1 : this.minecraft.options.keyMappings)
{
if (keymapping1.getName().equalsIgnoreCase(this.arr[k1]))
{
keymapping = keymapping1;
}
}
String s = "?";
if (keymapping != null)
{
s = I18n.m_118938_(keymapping.getName());
}
int i2 = Math.max(j, this.font.width(s));
int j2 = 0;
int k2 = 0;
if (k1 == 0)
{
j2 = 0;
k2 = -l;
}
else if (k1 == 1)
{
j2 = i2 / 2 + 8;
k2 = -l / 2;
}
else if (k1 == 2)
{
j2 = i2 / 2 + 32;
k2 = 0;
}
else if (k1 == 3)
{
j2 = i2 / 2 + 8;
k2 = l / 2;
}
else if (k1 == 4)
{
j2 = 0;
k2 = l;
}
else if (k1 == 5)
{
j2 = -i2 / 2 - 8;
k2 = l / 2;
}
else if (k1 == 6)
{
j2 = -i2 / 2 - 32;
k2 = 0;
}
else if (k1 == 7)
{
j2 = -i2 / 2 - 8;
k2 = -l / 2;
}
int l1 = k1;
if (s != "?")
{
this.addRenderableWidget(new Button(i1 + j2 - i2 / 2, j1 + k2 - 10, i2, 20, s, (p) ->
{
if (l1 < 200)
{
VRInputAction vrinputaction = MCVR.get().getInputAction(this.arr[l1]);
if (vrinputaction != null)
{
vrinputaction.pressBinding();
vrinputaction.unpressBinding(2);
}
}
else if (l1 == 201)
{
this.setShift(!this.isShift);
}
}));
}
}
}
public void setShift(boolean shift)
{
if (shift != this.isShift)
{
this.isShift = shift;
this.init();
}
}
public void render(PoseStack pMatrixStack, int pMouseX, int pMouseY, float pPartialTicks)
{
this.renderBackground(pMatrixStack);
super.render(pMatrixStack, 0, 0, pPartialTicks);
}
}
|
3e00baf807539bdca6662c5d4c5d662df34903b5 | 348,709 | java | Java | Library/build/generated/source/r/release/com/lhh/ptrrv/library/R.java | wz1993/PullToRefreshRecyclerView | 77b1bcf744aca7dbb2c34a691365130800bff207 | [
"Apache-2.0"
] | 455 | 2015-11-15T20:41:05.000Z | 2021-08-09T11:52:57.000Z | Library/build/generated/source/r/debug/com/lhh/ptrrv/library/R.java | lijunjingg/Android-PullToRefreshRecyclerView | 889ec18ef73abb422c8525c36c52aa75f9187863 | [
"Apache-2.0"
] | 28 | 2015-12-30T08:12:18.000Z | 2018-10-11T11:42:38.000Z | Library/build/generated/source/r/debug/com/lhh/ptrrv/library/R.java | lijunjingg/Android-PullToRefreshRecyclerView | 889ec18ef73abb422c8525c36c52aa75f9187863 | [
"Apache-2.0"
] | 148 | 2015-11-27T05:07:06.000Z | 2022-02-28T09:46:21.000Z | 58.079447 | 175 | 0.651905 | 295 | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.lhh.ptrrv.library;
public final class R {
public static final class anim {
public static int abc_fade_in=0x7f040000;
public static int abc_fade_out=0x7f040001;
public static int abc_grow_fade_in_from_bottom=0x7f040002;
public static int abc_popup_enter=0x7f040003;
public static int abc_popup_exit=0x7f040004;
public static int abc_shrink_fade_out_from_bottom=0x7f040005;
public static int abc_slide_in_bottom=0x7f040006;
public static int abc_slide_in_top=0x7f040007;
public static int abc_slide_out_bottom=0x7f040008;
public static int abc_slide_out_top=0x7f040009;
}
public static final class attr {
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionBarDivider=0x7f010067;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionBarItemBackground=0x7f010068;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionBarPopupTheme=0x7f010061;
/** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>May be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>wrap_content</code></td><td>0</td><td></td></tr>
</table>
*/
public static int actionBarSize=0x7f010066;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionBarSplitStyle=0x7f010063;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionBarStyle=0x7f010062;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionBarTabBarStyle=0x7f01005d;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionBarTabStyle=0x7f01005c;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionBarTabTextStyle=0x7f01005e;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionBarTheme=0x7f010064;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionBarWidgetTheme=0x7f010065;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionButtonStyle=0x7f010081;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionDropDownStyle=0x7f01007d;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionLayout=0x7f010031;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionMenuTextAppearance=0x7f010069;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static int actionMenuTextColor=0x7f01006a;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeBackground=0x7f01006d;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeCloseButtonStyle=0x7f01006c;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeCloseDrawable=0x7f01006f;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeCopyDrawable=0x7f010071;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeCutDrawable=0x7f010070;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeFindDrawable=0x7f010075;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModePasteDrawable=0x7f010072;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModePopupWindowStyle=0x7f010077;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeSelectAllDrawable=0x7f010073;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeShareDrawable=0x7f010074;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeSplitBackground=0x7f01006e;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeStyle=0x7f01006b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionModeWebSearchDrawable=0x7f010076;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionOverflowButtonStyle=0x7f01005f;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int actionOverflowMenuStyle=0x7f010060;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int actionProviderClass=0x7f010033;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int actionViewClass=0x7f010032;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int activityChooserViewStyle=0x7f010088;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int alertDialogButtonGroupStyle=0x7f0100a9;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int alertDialogCenterButtons=0x7f0100aa;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int alertDialogStyle=0x7f0100a8;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int alertDialogTheme=0x7f0100ab;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int autoCompleteTextViewStyle=0x7f0100b0;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int background=0x7f01000c;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static int backgroundSplit=0x7f01000e;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static int backgroundStacked=0x7f01000d;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int backgroundTint=0x7f0100c9;
/** <p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>src_over</code></td><td>3</td><td></td></tr>
<tr><td><code>src_in</code></td><td>5</td><td></td></tr>
<tr><td><code>src_atop</code></td><td>9</td><td></td></tr>
<tr><td><code>multiply</code></td><td>14</td><td></td></tr>
<tr><td><code>screen</code></td><td>15</td><td></td></tr>
</table>
*/
public static int backgroundTintMode=0x7f0100ca;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int barSize=0x7f01002b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int buttonBarButtonStyle=0x7f010083;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int buttonBarNegativeButtonStyle=0x7f0100ae;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int buttonBarNeutralButtonStyle=0x7f0100af;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int buttonBarPositiveButtonStyle=0x7f0100ad;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int buttonBarStyle=0x7f010082;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int buttonPanelSideLayout=0x7f01001f;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int buttonStyle=0x7f0100b1;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int buttonStyleSmall=0x7f0100b2;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int checkboxStyle=0x7f0100b3;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int checkedTextViewStyle=0x7f0100b4;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int closeIcon=0x7f01003e;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int closeItemLayout=0x7f01001c;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int collapseContentDescription=0x7f0100c3;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int collapseIcon=0x7f0100c2;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int color=0x7f010025;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int colorAccent=0x7f0100a2;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int colorButtonNormal=0x7f0100a6;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int colorControlActivated=0x7f0100a4;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int colorControlHighlight=0x7f0100a5;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int colorControlNormal=0x7f0100a3;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int colorPrimary=0x7f0100a0;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int colorPrimaryDark=0x7f0100a1;
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int colorSwitchThumbNormal=0x7f0100a7;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int commitIcon=0x7f010043;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int contentInsetEnd=0x7f010017;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int contentInsetLeft=0x7f010018;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int contentInsetRight=0x7f010019;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int contentInsetStart=0x7f010016;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int customNavigationLayout=0x7f01000f;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int dialogPreferredPadding=0x7f01007b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int dialogTheme=0x7f01007a;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int disableChildrenWhenDisabled=0x7f01004a;
/** <p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr>
<tr><td><code>showHome</code></td><td>0x2</td><td></td></tr>
<tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr>
<tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr>
<tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr>
<tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr>
</table>
*/
public static int displayOptions=0x7f010005;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int divider=0x7f01000b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int dividerHorizontal=0x7f010087;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int dividerPadding=0x7f01002f;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int dividerVertical=0x7f010086;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int drawableSize=0x7f010027;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int drawerArrowStyle=0x7f010000;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int dropDownListViewStyle=0x7f010098;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int dropdownListPreferredItemHeight=0x7f01007e;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int editTextBackground=0x7f01008e;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static int editTextColor=0x7f01008d;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int editTextStyle=0x7f0100b5;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int elevation=0x7f01001a;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int expandActivityOverflowButtonDrawable=0x7f01001e;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int gapBetweenBars=0x7f010028;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int goIcon=0x7f01003f;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int height=0x7f010001;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int hideOnContentScroll=0x7f010015;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int homeAsUpIndicator=0x7f010080;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int homeLayout=0x7f010010;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int icon=0x7f010009;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int iconifiedByDefault=0x7f01003c;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int indeterminateProgressStyle=0x7f010012;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int initialActivityCount=0x7f01001d;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int isLightTheme=0x7f010002;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int itemPadding=0x7f010014;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int layout=0x7f01003b;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int layoutManager=0x7f010037;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int listChoiceBackgroundIndicator=0x7f01009f;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int listDividerAlertDialog=0x7f01007c;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int listItemLayout=0x7f010023;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int listLayout=0x7f010020;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int listPopupWindowStyle=0x7f010099;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int listPreferredItemHeight=0x7f010093;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int listPreferredItemHeightLarge=0x7f010095;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int listPreferredItemHeightSmall=0x7f010094;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int listPreferredItemPaddingLeft=0x7f010096;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int listPreferredItemPaddingRight=0x7f010097;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int logo=0x7f01000a;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int maxButtonHeight=0x7f0100c1;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int measureWithLargestChild=0x7f01002d;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int middleBarArrowSize=0x7f01002a;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int multiChoiceItemLayout=0x7f010021;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int navigationContentDescription=0x7f0100c5;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int navigationIcon=0x7f0100c4;
/** <p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>normal</code></td><td>0</td><td></td></tr>
<tr><td><code>listMode</code></td><td>1</td><td></td></tr>
<tr><td><code>tabMode</code></td><td>2</td><td></td></tr>
</table>
*/
public static int navigationMode=0x7f010004;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int overlapAnchor=0x7f010035;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int paddingEnd=0x7f0100c7;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int paddingStart=0x7f0100c6;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int panelBackground=0x7f01009c;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int panelMenuListTheme=0x7f01009e;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int panelMenuListWidth=0x7f01009d;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int popupMenuStyle=0x7f01008b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int popupPromptView=0x7f010049;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int popupTheme=0x7f01001b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int popupWindowStyle=0x7f01008c;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int preserveIconSpacing=0x7f010034;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int progressBarPadding=0x7f010013;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int progressBarStyle=0x7f010011;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int prompt=0x7f010047;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int queryBackground=0x7f010045;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int queryHint=0x7f01003d;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int radioButtonStyle=0x7f0100b6;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int ratingBarStyle=0x7f0100b7;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int reverseLayout=0x7f010039;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int searchHintIcon=0x7f010041;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int searchIcon=0x7f010040;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int searchViewStyle=0x7f010092;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int selectableItemBackground=0x7f010084;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int selectableItemBackgroundBorderless=0x7f010085;
/** <p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>never</code></td><td>0</td><td></td></tr>
<tr><td><code>ifRoom</code></td><td>1</td><td></td></tr>
<tr><td><code>always</code></td><td>2</td><td></td></tr>
<tr><td><code>withText</code></td><td>4</td><td></td></tr>
<tr><td><code>collapseActionView</code></td><td>8</td><td></td></tr>
</table>
*/
public static int showAsAction=0x7f010030;
/** <p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>beginning</code></td><td>1</td><td></td></tr>
<tr><td><code>middle</code></td><td>2</td><td></td></tr>
<tr><td><code>end</code></td><td>4</td><td></td></tr>
</table>
*/
public static int showDividers=0x7f01002e;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int showText=0x7f010051;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int singleChoiceItemLayout=0x7f010022;
/** <p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int spanCount=0x7f010038;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int spinBars=0x7f010026;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int spinnerDropDownItemStyle=0x7f01007f;
/** <p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>dialog</code></td><td>0</td><td></td></tr>
<tr><td><code>dropdown</code></td><td>1</td><td></td></tr>
</table>
*/
public static int spinnerMode=0x7f010048;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int spinnerStyle=0x7f0100b8;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int splitTrack=0x7f010050;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int stackFromEnd=0x7f01003a;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int state_above_anchor=0x7f010036;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int submitBackground=0x7f010046;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int subtitle=0x7f010006;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int subtitleTextAppearance=0x7f0100bb;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int subtitleTextStyle=0x7f010008;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int suggestionRowLayout=0x7f010044;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int switchMinWidth=0x7f01004e;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int switchPadding=0x7f01004f;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int switchStyle=0x7f0100b9;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int switchTextAppearance=0x7f01004d;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a boolean value, either "<code>true</code>" or "<code>false</code>".
*/
public static int textAllCaps=0x7f010024;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int textAppearanceLargePopupMenu=0x7f010078;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int textAppearanceListItem=0x7f01009a;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int textAppearanceListItemSmall=0x7f01009b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int textAppearanceSearchResultSubtitle=0x7f010090;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int textAppearanceSearchResultTitle=0x7f01008f;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int textAppearanceSmallPopupMenu=0x7f010079;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static int textColorAlertDialogListItem=0x7f0100ac;
/** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static int textColorSearchUrl=0x7f010091;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int theme=0x7f0100c8;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int thickness=0x7f01002c;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int thumbTextPadding=0x7f01004c;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int title=0x7f010003;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int titleMarginBottom=0x7f0100c0;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int titleMarginEnd=0x7f0100be;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int titleMarginStart=0x7f0100bd;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int titleMarginTop=0x7f0100bf;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int titleMargins=0x7f0100bc;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int titleTextAppearance=0x7f0100ba;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int titleTextStyle=0x7f010007;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int toolbarNavigationButtonStyle=0x7f01008a;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int toolbarStyle=0x7f010089;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int topBottomBarArrowSize=0x7f010029;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int track=0x7f01004b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static int voiceIcon=0x7f010042;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int windowActionBar=0x7f010052;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int windowActionBarOverlay=0x7f010054;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int windowActionModeOverlay=0x7f010055;
/** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int windowFixedHeightMajor=0x7f010059;
/** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int windowFixedHeightMinor=0x7f010057;
/** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int windowFixedWidthMajor=0x7f010056;
/** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int windowFixedWidthMinor=0x7f010058;
/** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int windowMinWidthMajor=0x7f01005a;
/** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int windowMinWidthMinor=0x7f01005b;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static int windowNoTitle=0x7f010053;
}
public static final class bool {
public static int abc_action_bar_embed_tabs=0x7f080002;
public static int abc_action_bar_embed_tabs_pre_jb=0x7f080000;
public static int abc_action_bar_expanded_action_views_exclusive=0x7f080003;
public static int abc_config_actionMenuItemAllCaps=0x7f080004;
public static int abc_config_allowActionMenuItemTextWithIcon=0x7f080001;
public static int abc_config_closeDialogWhenTouchOutside=0x7f080005;
public static int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f080006;
}
public static final class color {
public static int abc_background_cache_hint_selector_material_dark=0x7f0a0036;
public static int abc_background_cache_hint_selector_material_light=0x7f0a0037;
public static int abc_input_method_navigation_guard=0x7f0a0000;
public static int abc_primary_text_disable_only_material_dark=0x7f0a0038;
public static int abc_primary_text_disable_only_material_light=0x7f0a0039;
public static int abc_primary_text_material_dark=0x7f0a003a;
public static int abc_primary_text_material_light=0x7f0a003b;
public static int abc_search_url_text=0x7f0a003c;
public static int abc_search_url_text_normal=0x7f0a0001;
public static int abc_search_url_text_pressed=0x7f0a0002;
public static int abc_search_url_text_selected=0x7f0a0003;
public static int abc_secondary_text_material_dark=0x7f0a003d;
public static int abc_secondary_text_material_light=0x7f0a003e;
public static int accent_material_dark=0x7f0a0004;
public static int accent_material_light=0x7f0a0005;
public static int background_floating_material_dark=0x7f0a0006;
public static int background_floating_material_light=0x7f0a0007;
public static int background_material_dark=0x7f0a0008;
public static int background_material_light=0x7f0a0009;
public static int bright_foreground_disabled_material_dark=0x7f0a000a;
public static int bright_foreground_disabled_material_light=0x7f0a000b;
public static int bright_foreground_inverse_material_dark=0x7f0a000c;
public static int bright_foreground_inverse_material_light=0x7f0a000d;
public static int bright_foreground_material_dark=0x7f0a000e;
public static int bright_foreground_material_light=0x7f0a000f;
public static int button_material_dark=0x7f0a0010;
public static int button_material_light=0x7f0a0011;
public static int dim_foreground_disabled_material_dark=0x7f0a0012;
public static int dim_foreground_disabled_material_light=0x7f0a0013;
public static int dim_foreground_material_dark=0x7f0a0014;
public static int dim_foreground_material_light=0x7f0a0015;
public static int highlighted_text_material_dark=0x7f0a0016;
public static int highlighted_text_material_light=0x7f0a0017;
public static int hint_foreground_material_dark=0x7f0a0018;
public static int hint_foreground_material_light=0x7f0a0019;
public static int link_text_material_dark=0x7f0a001a;
public static int link_text_material_light=0x7f0a001b;
public static int material_blue_grey_800=0x7f0a001c;
public static int material_blue_grey_900=0x7f0a001d;
public static int material_blue_grey_950=0x7f0a001e;
public static int material_deep_teal_200=0x7f0a001f;
public static int material_deep_teal_500=0x7f0a0020;
public static int primary_dark_material_dark=0x7f0a0021;
public static int primary_dark_material_light=0x7f0a0022;
public static int primary_material_dark=0x7f0a0023;
public static int primary_material_light=0x7f0a0024;
public static int primary_text_default_material_dark=0x7f0a0025;
public static int primary_text_default_material_light=0x7f0a0026;
public static int primary_text_disabled_material_dark=0x7f0a0027;
public static int primary_text_disabled_material_light=0x7f0a0028;
public static int ripple_material_dark=0x7f0a0029;
public static int ripple_material_light=0x7f0a002a;
public static int secondary_text_default_material_dark=0x7f0a002b;
public static int secondary_text_default_material_light=0x7f0a002c;
public static int secondary_text_disabled_material_dark=0x7f0a002d;
public static int secondary_text_disabled_material_light=0x7f0a002e;
public static int swap_holo_bule_bright=0x7f0a002f;
public static int swap_holo_green_bright=0x7f0a0030;
public static int swap_holo_pure_bright=0x7f0a0031;
public static int switch_thumb_disabled_material_dark=0x7f0a0032;
public static int switch_thumb_disabled_material_light=0x7f0a0033;
public static int switch_thumb_material_dark=0x7f0a003f;
public static int switch_thumb_material_light=0x7f0a0040;
public static int switch_thumb_normal_material_dark=0x7f0a0034;
public static int switch_thumb_normal_material_light=0x7f0a0035;
}
public static final class dimen {
public static int abc_action_bar_content_inset_material=0x7f06000c;
public static int abc_action_bar_default_height_material=0x7f060001;
public static int abc_action_bar_default_padding_material=0x7f060002;
public static int abc_action_bar_icon_vertical_padding_material=0x7f060010;
public static int abc_action_bar_navigation_padding_start_material=0x7f06000d;
public static int abc_action_bar_overflow_padding_end_material=0x7f06000e;
public static int abc_action_bar_overflow_padding_start_material=0x7f060011;
public static int abc_action_bar_progress_bar_size=0x7f060003;
public static int abc_action_bar_stacked_max_height=0x7f060012;
public static int abc_action_bar_stacked_tab_max_width=0x7f060013;
public static int abc_action_bar_subtitle_bottom_margin_material=0x7f060014;
public static int abc_action_bar_subtitle_top_margin_material=0x7f060015;
public static int abc_action_button_min_height_material=0x7f060016;
public static int abc_action_button_min_width_material=0x7f060017;
public static int abc_action_button_min_width_overflow_material=0x7f060018;
public static int abc_alert_dialog_button_bar_height=0x7f060000;
public static int abc_button_inset_horizontal_material=0x7f060019;
public static int abc_button_inset_vertical_material=0x7f06001a;
public static int abc_button_padding_horizontal_material=0x7f06001b;
public static int abc_button_padding_vertical_material=0x7f06001c;
public static int abc_config_prefDialogWidth=0x7f060006;
public static int abc_control_corner_material=0x7f06001d;
public static int abc_control_inset_material=0x7f06001e;
public static int abc_control_padding_material=0x7f06001f;
public static int abc_dialog_list_padding_vertical_material=0x7f060020;
public static int abc_dialog_min_width_major=0x7f060021;
public static int abc_dialog_min_width_minor=0x7f060022;
public static int abc_dialog_padding_material=0x7f060023;
public static int abc_dialog_padding_top_material=0x7f060024;
public static int abc_disabled_alpha_material_dark=0x7f060025;
public static int abc_disabled_alpha_material_light=0x7f060026;
public static int abc_dropdownitem_icon_width=0x7f060027;
public static int abc_dropdownitem_text_padding_left=0x7f060028;
public static int abc_dropdownitem_text_padding_right=0x7f060029;
public static int abc_edit_text_inset_bottom_material=0x7f06002a;
public static int abc_edit_text_inset_horizontal_material=0x7f06002b;
public static int abc_edit_text_inset_top_material=0x7f06002c;
public static int abc_floating_window_z=0x7f06002d;
public static int abc_list_item_padding_horizontal_material=0x7f06002e;
public static int abc_panel_menu_list_width=0x7f06002f;
public static int abc_search_view_preferred_width=0x7f060030;
public static int abc_search_view_text_min_width=0x7f060007;
public static int abc_switch_padding=0x7f06000f;
public static int abc_text_size_body_1_material=0x7f060031;
public static int abc_text_size_body_2_material=0x7f060032;
public static int abc_text_size_button_material=0x7f060033;
public static int abc_text_size_caption_material=0x7f060034;
public static int abc_text_size_display_1_material=0x7f060035;
public static int abc_text_size_display_2_material=0x7f060036;
public static int abc_text_size_display_3_material=0x7f060037;
public static int abc_text_size_display_4_material=0x7f060038;
public static int abc_text_size_headline_material=0x7f060039;
public static int abc_text_size_large_material=0x7f06003a;
public static int abc_text_size_medium_material=0x7f06003b;
public static int abc_text_size_menu_material=0x7f06003c;
public static int abc_text_size_small_material=0x7f06003d;
public static int abc_text_size_subhead_material=0x7f06003e;
public static int abc_text_size_subtitle_material_toolbar=0x7f060004;
public static int abc_text_size_title_material=0x7f06003f;
public static int abc_text_size_title_material_toolbar=0x7f060005;
public static int dialog_fixed_height_major=0x7f060008;
public static int dialog_fixed_height_minor=0x7f060009;
public static int dialog_fixed_width_major=0x7f06000a;
public static int dialog_fixed_width_minor=0x7f06000b;
public static int disabled_alpha_material_dark=0x7f060040;
public static int disabled_alpha_material_light=0x7f060041;
public static int item_touch_helper_max_drag_scroll_per_frame=0x7f060042;
}
public static final class drawable {
public static int abc_ab_share_pack_mtrl_alpha=0x7f020000;
public static int abc_btn_borderless_material=0x7f020001;
public static int abc_btn_check_material=0x7f020002;
public static int abc_btn_check_to_on_mtrl_000=0x7f020003;
public static int abc_btn_check_to_on_mtrl_015=0x7f020004;
public static int abc_btn_default_mtrl_shape=0x7f020005;
public static int abc_btn_radio_material=0x7f020006;
public static int abc_btn_radio_to_on_mtrl_000=0x7f020007;
public static int abc_btn_radio_to_on_mtrl_015=0x7f020008;
public static int abc_btn_rating_star_off_mtrl_alpha=0x7f020009;
public static int abc_btn_rating_star_on_mtrl_alpha=0x7f02000a;
public static int abc_btn_switch_to_on_mtrl_00001=0x7f02000b;
public static int abc_btn_switch_to_on_mtrl_00012=0x7f02000c;
public static int abc_cab_background_internal_bg=0x7f02000d;
public static int abc_cab_background_top_material=0x7f02000e;
public static int abc_cab_background_top_mtrl_alpha=0x7f02000f;
public static int abc_dialog_material_background_dark=0x7f020010;
public static int abc_dialog_material_background_light=0x7f020011;
public static int abc_edit_text_material=0x7f020012;
public static int abc_ic_ab_back_mtrl_am_alpha=0x7f020013;
public static int abc_ic_clear_mtrl_alpha=0x7f020014;
public static int abc_ic_commit_search_api_mtrl_alpha=0x7f020015;
public static int abc_ic_go_search_api_mtrl_alpha=0x7f020016;
public static int abc_ic_menu_copy_mtrl_am_alpha=0x7f020017;
public static int abc_ic_menu_cut_mtrl_alpha=0x7f020018;
public static int abc_ic_menu_moreoverflow_mtrl_alpha=0x7f020019;
public static int abc_ic_menu_paste_mtrl_am_alpha=0x7f02001a;
public static int abc_ic_menu_selectall_mtrl_alpha=0x7f02001b;
public static int abc_ic_menu_share_mtrl_alpha=0x7f02001c;
public static int abc_ic_search_api_mtrl_alpha=0x7f02001d;
public static int abc_ic_voice_search_api_mtrl_alpha=0x7f02001e;
public static int abc_item_background_holo_dark=0x7f02001f;
public static int abc_item_background_holo_light=0x7f020020;
public static int abc_list_divider_mtrl_alpha=0x7f020021;
public static int abc_list_focused_holo=0x7f020022;
public static int abc_list_longpressed_holo=0x7f020023;
public static int abc_list_pressed_holo_dark=0x7f020024;
public static int abc_list_pressed_holo_light=0x7f020025;
public static int abc_list_selector_background_transition_holo_dark=0x7f020026;
public static int abc_list_selector_background_transition_holo_light=0x7f020027;
public static int abc_list_selector_disabled_holo_dark=0x7f020028;
public static int abc_list_selector_disabled_holo_light=0x7f020029;
public static int abc_list_selector_holo_dark=0x7f02002a;
public static int abc_list_selector_holo_light=0x7f02002b;
public static int abc_menu_hardkey_panel_mtrl_mult=0x7f02002c;
public static int abc_popup_background_mtrl_mult=0x7f02002d;
public static int abc_ratingbar_full_material=0x7f02002e;
public static int abc_spinner_mtrl_am_alpha=0x7f02002f;
public static int abc_spinner_textfield_background_material=0x7f020030;
public static int abc_switch_thumb_material=0x7f020031;
public static int abc_switch_track_mtrl_alpha=0x7f020032;
public static int abc_tab_indicator_material=0x7f020033;
public static int abc_tab_indicator_mtrl_alpha=0x7f020034;
public static int abc_text_cursor_mtrl_alpha=0x7f020035;
public static int abc_textfield_activated_mtrl_alpha=0x7f020036;
public static int abc_textfield_default_mtrl_alpha=0x7f020037;
public static int abc_textfield_search_activated_mtrl_alpha=0x7f020038;
public static int abc_textfield_search_default_mtrl_alpha=0x7f020039;
public static int abc_textfield_search_material=0x7f02003a;
}
public static final class id {
public static int action_bar=0x7f0b0041;
public static int action_bar_activity_content=0x7f0b0000;
public static int action_bar_container=0x7f0b0040;
public static int action_bar_root=0x7f0b003c;
public static int action_bar_spinner=0x7f0b0001;
public static int action_bar_subtitle=0x7f0b0025;
public static int action_bar_title=0x7f0b0024;
public static int action_context_bar=0x7f0b0042;
public static int action_menu_divider=0x7f0b0002;
public static int action_menu_presenter=0x7f0b0003;
public static int action_mode_bar=0x7f0b003e;
public static int action_mode_bar_stub=0x7f0b003d;
public static int action_mode_close_button=0x7f0b0026;
public static int activity_chooser_view_content=0x7f0b0027;
public static int alertTitle=0x7f0b0031;
public static int always=0x7f0b0017;
public static int beginning=0x7f0b0014;
public static int buttonPanel=0x7f0b0037;
public static int checkbox=0x7f0b0039;
public static int collapseActionView=0x7f0b0018;
public static int contentPanel=0x7f0b0032;
public static int custom=0x7f0b0036;
public static int customPanel=0x7f0b0035;
public static int decor_content_parent=0x7f0b003f;
public static int default_activity_button=0x7f0b002a;
public static int dialog=0x7f0b001c;
public static int disableHome=0x7f0b000d;
public static int dropdown=0x7f0b001d;
public static int edit_query=0x7f0b0043;
public static int end=0x7f0b0015;
public static int expand_activities_button=0x7f0b0028;
public static int expanded_menu=0x7f0b0038;
public static int home=0x7f0b0004;
public static int homeAsUp=0x7f0b000e;
public static int icon=0x7f0b002c;
public static int ifRoom=0x7f0b0019;
public static int image=0x7f0b0029;
public static int item_touch_helper_previous_elevation=0x7f0b0005;
public static int listMode=0x7f0b000a;
public static int list_item=0x7f0b002b;
public static int middle=0x7f0b0016;
public static int multiply=0x7f0b001f;
public static int never=0x7f0b001a;
public static int none=0x7f0b000f;
public static int normal=0x7f0b000b;
public static int parentPanel=0x7f0b002e;
public static int progress_circular=0x7f0b0006;
public static int progress_horizontal=0x7f0b0007;
public static int radio=0x7f0b003b;
public static int recycler_view=0x7f0b0050;
public static int screen=0x7f0b0020;
public static int scrollView=0x7f0b0033;
public static int search_badge=0x7f0b0045;
public static int search_bar=0x7f0b0044;
public static int search_button=0x7f0b0046;
public static int search_close_btn=0x7f0b004b;
public static int search_edit_frame=0x7f0b0047;
public static int search_go_btn=0x7f0b004d;
public static int search_mag_icon=0x7f0b0048;
public static int search_plate=0x7f0b0049;
public static int search_src_text=0x7f0b004a;
public static int search_voice_btn=0x7f0b004e;
public static int select_dialog_listview=0x7f0b004f;
public static int shortcut=0x7f0b003a;
public static int showCustom=0x7f0b0010;
public static int showHome=0x7f0b0011;
public static int showTitle=0x7f0b0012;
public static int split_action_bar=0x7f0b0008;
public static int src_atop=0x7f0b0021;
public static int src_in=0x7f0b0022;
public static int src_over=0x7f0b0023;
public static int submit_area=0x7f0b004c;
public static int tabMode=0x7f0b000c;
public static int textSpacerNoButtons=0x7f0b0034;
public static int title=0x7f0b002d;
public static int title_template=0x7f0b0030;
public static int topPanel=0x7f0b002f;
public static int up=0x7f0b0009;
public static int useLogo=0x7f0b0013;
public static int withText=0x7f0b001b;
public static int wrap_content=0x7f0b001e;
}
public static final class integer {
public static int abc_config_activityDefaultDur=0x7f090001;
public static int abc_config_activityShortDur=0x7f090002;
public static int abc_max_action_buttons=0x7f090000;
}
public static final class layout {
public static int abc_action_bar_title_item=0x7f030000;
public static int abc_action_bar_up_container=0x7f030001;
public static int abc_action_bar_view_list_nav_layout=0x7f030002;
public static int abc_action_menu_item_layout=0x7f030003;
public static int abc_action_menu_layout=0x7f030004;
public static int abc_action_mode_bar=0x7f030005;
public static int abc_action_mode_close_item_material=0x7f030006;
public static int abc_activity_chooser_view=0x7f030007;
public static int abc_activity_chooser_view_list_item=0x7f030008;
public static int abc_alert_dialog_material=0x7f030009;
public static int abc_dialog_title_material=0x7f03000a;
public static int abc_expanded_menu_layout=0x7f03000b;
public static int abc_list_menu_item_checkbox=0x7f03000c;
public static int abc_list_menu_item_icon=0x7f03000d;
public static int abc_list_menu_item_layout=0x7f03000e;
public static int abc_list_menu_item_radio=0x7f03000f;
public static int abc_popup_menu_item_layout=0x7f030010;
public static int abc_screen_content_include=0x7f030011;
public static int abc_screen_simple=0x7f030012;
public static int abc_screen_simple_overlay_action_mode=0x7f030013;
public static int abc_screen_toolbar=0x7f030014;
public static int abc_search_dropdown_item_icons_2line=0x7f030015;
public static int abc_search_view=0x7f030016;
public static int abc_select_dialog_material=0x7f030017;
public static int abc_simple_dropdown_hint=0x7f030018;
public static int ptrrv_root_view=0x7f030019;
public static int select_dialog_item_material=0x7f03001a;
public static int select_dialog_multichoice_material=0x7f03001b;
public static int select_dialog_singlechoice_material=0x7f03001c;
public static int support_simple_spinner_dropdown_item=0x7f03001d;
}
public static final class string {
public static int abc_action_bar_home_description=0x7f050000;
public static int abc_action_bar_home_description_format=0x7f05000d;
public static int abc_action_bar_home_subtitle_description_format=0x7f05000e;
public static int abc_action_bar_up_description=0x7f050001;
public static int abc_action_menu_overflow_description=0x7f050002;
public static int abc_action_mode_done=0x7f050003;
public static int abc_activity_chooser_view_see_all=0x7f050004;
public static int abc_activitychooserview_choose_application=0x7f050005;
public static int abc_search_hint=0x7f05000f;
public static int abc_searchview_description_clear=0x7f050006;
public static int abc_searchview_description_query=0x7f050007;
public static int abc_searchview_description_search=0x7f050008;
public static int abc_searchview_description_submit=0x7f050009;
public static int abc_searchview_description_voice=0x7f05000a;
public static int abc_shareactionprovider_share_with=0x7f05000b;
public static int abc_shareactionprovider_share_with_application=0x7f05000c;
public static int abc_toolbar_collapse_description=0x7f050010;
public static int loading=0x7f050011;
}
public static final class style {
public static int AlertDialog_AppCompat=0x7f07006b;
public static int AlertDialog_AppCompat_Light=0x7f07006c;
public static int Animation_AppCompat_Dialog=0x7f07006d;
public static int Animation_AppCompat_DropDownUp=0x7f07006e;
public static int Base_AlertDialog_AppCompat=0x7f07006f;
public static int Base_AlertDialog_AppCompat_Light=0x7f070070;
public static int Base_Animation_AppCompat_Dialog=0x7f070071;
public static int Base_Animation_AppCompat_DropDownUp=0x7f070072;
public static int Base_DialogWindowTitle_AppCompat=0x7f070073;
public static int Base_DialogWindowTitleBackground_AppCompat=0x7f070074;
public static int Base_TextAppearance_AppCompat=0x7f070025;
public static int Base_TextAppearance_AppCompat_Body1=0x7f070026;
public static int Base_TextAppearance_AppCompat_Body2=0x7f070027;
public static int Base_TextAppearance_AppCompat_Button=0x7f070016;
public static int Base_TextAppearance_AppCompat_Caption=0x7f070028;
public static int Base_TextAppearance_AppCompat_Display1=0x7f070029;
public static int Base_TextAppearance_AppCompat_Display2=0x7f07002a;
public static int Base_TextAppearance_AppCompat_Display3=0x7f07002b;
public static int Base_TextAppearance_AppCompat_Display4=0x7f07002c;
public static int Base_TextAppearance_AppCompat_Headline=0x7f07002d;
public static int Base_TextAppearance_AppCompat_Inverse=0x7f070003;
public static int Base_TextAppearance_AppCompat_Large=0x7f07002e;
public static int Base_TextAppearance_AppCompat_Large_Inverse=0x7f070004;
public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f07002f;
public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f070030;
public static int Base_TextAppearance_AppCompat_Medium=0x7f070031;
public static int Base_TextAppearance_AppCompat_Medium_Inverse=0x7f070005;
public static int Base_TextAppearance_AppCompat_Menu=0x7f070032;
public static int Base_TextAppearance_AppCompat_SearchResult=0x7f070075;
public static int Base_TextAppearance_AppCompat_SearchResult_Subtitle=0x7f070033;
public static int Base_TextAppearance_AppCompat_SearchResult_Title=0x7f070034;
public static int Base_TextAppearance_AppCompat_Small=0x7f070035;
public static int Base_TextAppearance_AppCompat_Small_Inverse=0x7f070006;
public static int Base_TextAppearance_AppCompat_Subhead=0x7f070036;
public static int Base_TextAppearance_AppCompat_Subhead_Inverse=0x7f070007;
public static int Base_TextAppearance_AppCompat_Title=0x7f070037;
public static int Base_TextAppearance_AppCompat_Title_Inverse=0x7f070008;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f070038;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f070039;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f07003a;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f07003b;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f07003c;
public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f07003d;
public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f07003e;
public static int Base_TextAppearance_AppCompat_Widget_DropDownItem=0x7f070076;
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f07003f;
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f070040;
public static int Base_TextAppearance_AppCompat_Widget_Switch=0x7f070041;
public static int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem=0x7f070042;
public static int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f070077;
public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle=0x7f070043;
public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Title=0x7f070044;
public static int Base_Theme_AppCompat=0x7f070045;
public static int Base_Theme_AppCompat_CompactMenu=0x7f070078;
public static int Base_Theme_AppCompat_Dialog=0x7f070009;
public static int Base_Theme_AppCompat_Dialog_Alert=0x7f070079;
public static int Base_Theme_AppCompat_Dialog_FixedSize=0x7f07007a;
public static int Base_Theme_AppCompat_Dialog_MinWidth=0x7f07007b;
public static int Base_Theme_AppCompat_DialogWhenLarge=0x7f070001;
public static int Base_Theme_AppCompat_Light=0x7f070046;
public static int Base_Theme_AppCompat_Light_DarkActionBar=0x7f07007c;
public static int Base_Theme_AppCompat_Light_Dialog=0x7f07000a;
public static int Base_Theme_AppCompat_Light_Dialog_Alert=0x7f07007d;
public static int Base_Theme_AppCompat_Light_Dialog_FixedSize=0x7f07007e;
public static int Base_Theme_AppCompat_Light_Dialog_MinWidth=0x7f07007f;
public static int Base_Theme_AppCompat_Light_DialogWhenLarge=0x7f070002;
public static int Base_ThemeOverlay_AppCompat=0x7f070080;
public static int Base_ThemeOverlay_AppCompat_ActionBar=0x7f070081;
public static int Base_ThemeOverlay_AppCompat_Dark=0x7f070082;
public static int Base_ThemeOverlay_AppCompat_Dark_ActionBar=0x7f070083;
public static int Base_ThemeOverlay_AppCompat_Light=0x7f070084;
public static int Base_V11_Theme_AppCompat_Dialog=0x7f07000b;
public static int Base_V11_Theme_AppCompat_Light_Dialog=0x7f07000c;
public static int Base_V21_Theme_AppCompat=0x7f070047;
public static int Base_V21_Theme_AppCompat_Dialog=0x7f070048;
public static int Base_V21_Theme_AppCompat_Light=0x7f070049;
public static int Base_V21_Theme_AppCompat_Light_Dialog=0x7f07004a;
public static int Base_V7_Theme_AppCompat=0x7f070085;
public static int Base_V7_Theme_AppCompat_Dialog=0x7f070086;
public static int Base_V7_Theme_AppCompat_Light=0x7f070087;
public static int Base_V7_Theme_AppCompat_Light_Dialog=0x7f070088;
public static int Base_Widget_AppCompat_ActionBar=0x7f070089;
public static int Base_Widget_AppCompat_ActionBar_Solid=0x7f07008a;
public static int Base_Widget_AppCompat_ActionBar_TabBar=0x7f07008b;
public static int Base_Widget_AppCompat_ActionBar_TabText=0x7f07004b;
public static int Base_Widget_AppCompat_ActionBar_TabView=0x7f07004c;
public static int Base_Widget_AppCompat_ActionButton=0x7f07004d;
public static int Base_Widget_AppCompat_ActionButton_CloseMode=0x7f07004e;
public static int Base_Widget_AppCompat_ActionButton_Overflow=0x7f07004f;
public static int Base_Widget_AppCompat_ActionMode=0x7f07008c;
public static int Base_Widget_AppCompat_ActivityChooserView=0x7f07008d;
public static int Base_Widget_AppCompat_AutoCompleteTextView=0x7f070050;
public static int Base_Widget_AppCompat_Button=0x7f070051;
public static int Base_Widget_AppCompat_Button_Borderless=0x7f070052;
public static int Base_Widget_AppCompat_Button_Borderless_Colored=0x7f070053;
public static int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog=0x7f07008e;
public static int Base_Widget_AppCompat_Button_Small=0x7f070054;
public static int Base_Widget_AppCompat_ButtonBar=0x7f070055;
public static int Base_Widget_AppCompat_ButtonBar_AlertDialog=0x7f07008f;
public static int Base_Widget_AppCompat_CompoundButton_CheckBox=0x7f070056;
public static int Base_Widget_AppCompat_CompoundButton_RadioButton=0x7f070057;
public static int Base_Widget_AppCompat_CompoundButton_Switch=0x7f070090;
public static int Base_Widget_AppCompat_DrawerArrowToggle=0x7f070000;
public static int Base_Widget_AppCompat_DrawerArrowToggle_Common=0x7f070091;
public static int Base_Widget_AppCompat_DropDownItem_Spinner=0x7f070058;
public static int Base_Widget_AppCompat_EditText=0x7f070092;
public static int Base_Widget_AppCompat_Light_ActionBar=0x7f070093;
public static int Base_Widget_AppCompat_Light_ActionBar_Solid=0x7f070094;
public static int Base_Widget_AppCompat_Light_ActionBar_TabBar=0x7f070095;
public static int Base_Widget_AppCompat_Light_ActionBar_TabText=0x7f070059;
public static int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f07005a;
public static int Base_Widget_AppCompat_Light_ActionBar_TabView=0x7f07005b;
public static int Base_Widget_AppCompat_Light_PopupMenu=0x7f07005c;
public static int Base_Widget_AppCompat_Light_PopupMenu_Overflow=0x7f07005d;
public static int Base_Widget_AppCompat_ListPopupWindow=0x7f07005e;
public static int Base_Widget_AppCompat_ListView=0x7f07005f;
public static int Base_Widget_AppCompat_ListView_DropDown=0x7f070060;
public static int Base_Widget_AppCompat_ListView_Menu=0x7f070061;
public static int Base_Widget_AppCompat_PopupMenu=0x7f070062;
public static int Base_Widget_AppCompat_PopupMenu_Overflow=0x7f070063;
public static int Base_Widget_AppCompat_PopupWindow=0x7f070096;
public static int Base_Widget_AppCompat_ProgressBar=0x7f07000d;
public static int Base_Widget_AppCompat_ProgressBar_Horizontal=0x7f07000e;
public static int Base_Widget_AppCompat_RatingBar=0x7f070064;
public static int Base_Widget_AppCompat_SearchView=0x7f070097;
public static int Base_Widget_AppCompat_SearchView_ActionBar=0x7f070098;
public static int Base_Widget_AppCompat_Spinner=0x7f07000f;
public static int Base_Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f070065;
public static int Base_Widget_AppCompat_Spinner_Underlined=0x7f070066;
public static int Base_Widget_AppCompat_TextView_SpinnerItem=0x7f070067;
public static int Base_Widget_AppCompat_Toolbar=0x7f070099;
public static int Base_Widget_AppCompat_Toolbar_Button_Navigation=0x7f070068;
public static int Platform_AppCompat=0x7f070010;
public static int Platform_AppCompat_Light=0x7f070011;
public static int Platform_ThemeOverlay_AppCompat_Dark=0x7f070069;
public static int Platform_ThemeOverlay_AppCompat_Light=0x7f07006a;
public static int Platform_V11_AppCompat=0x7f070012;
public static int Platform_V11_AppCompat_Light=0x7f070013;
public static int Platform_V12_AppCompat=0x7f070014;
public static int Platform_V12_AppCompat_Light=0x7f070015;
public static int Platform_V14_AppCompat=0x7f070017;
public static int Platform_V14_AppCompat_Light=0x7f070018;
public static int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem=0x7f070019;
public static int RtlOverlay_Widget_AppCompat_ActionButton_Overflow=0x7f07001a;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem=0x7f07001b;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup=0x7f07001c;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text=0x7f07001d;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown=0x7f07001e;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1=0x7f07001f;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2=0x7f070020;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Query=0x7f070021;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Text=0x7f070022;
public static int RtlOverlay_Widget_AppCompat_SearchView_MagIcon=0x7f070023;
public static int RtlOverlay_Widget_AppCompat_Toolbar_Button_Navigation=0x7f070024;
public static int TextAppearance_AppCompat=0x7f07009a;
public static int TextAppearance_AppCompat_Body1=0x7f07009b;
public static int TextAppearance_AppCompat_Body2=0x7f07009c;
public static int TextAppearance_AppCompat_Button=0x7f07009d;
public static int TextAppearance_AppCompat_Caption=0x7f07009e;
public static int TextAppearance_AppCompat_Display1=0x7f07009f;
public static int TextAppearance_AppCompat_Display2=0x7f0700a0;
public static int TextAppearance_AppCompat_Display3=0x7f0700a1;
public static int TextAppearance_AppCompat_Display4=0x7f0700a2;
public static int TextAppearance_AppCompat_Headline=0x7f0700a3;
public static int TextAppearance_AppCompat_Inverse=0x7f0700a4;
public static int TextAppearance_AppCompat_Large=0x7f0700a5;
public static int TextAppearance_AppCompat_Large_Inverse=0x7f0700a6;
public static int TextAppearance_AppCompat_Light_SearchResult_Subtitle=0x7f0700a7;
public static int TextAppearance_AppCompat_Light_SearchResult_Title=0x7f0700a8;
public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f0700a9;
public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f0700aa;
public static int TextAppearance_AppCompat_Medium=0x7f0700ab;
public static int TextAppearance_AppCompat_Medium_Inverse=0x7f0700ac;
public static int TextAppearance_AppCompat_Menu=0x7f0700ad;
public static int TextAppearance_AppCompat_SearchResult_Subtitle=0x7f0700ae;
public static int TextAppearance_AppCompat_SearchResult_Title=0x7f0700af;
public static int TextAppearance_AppCompat_Small=0x7f0700b0;
public static int TextAppearance_AppCompat_Small_Inverse=0x7f0700b1;
public static int TextAppearance_AppCompat_Subhead=0x7f0700b2;
public static int TextAppearance_AppCompat_Subhead_Inverse=0x7f0700b3;
public static int TextAppearance_AppCompat_Title=0x7f0700b4;
public static int TextAppearance_AppCompat_Title_Inverse=0x7f0700b5;
public static int TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f0700b6;
public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f0700b7;
public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f0700b8;
public static int TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f0700b9;
public static int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f0700ba;
public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f0700bb;
public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse=0x7f0700bc;
public static int TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f0700bd;
public static int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse=0x7f0700be;
public static int TextAppearance_AppCompat_Widget_DropDownItem=0x7f0700bf;
public static int TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f0700c0;
public static int TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f0700c1;
public static int TextAppearance_AppCompat_Widget_Switch=0x7f0700c2;
public static int TextAppearance_AppCompat_Widget_TextView_SpinnerItem=0x7f0700c3;
public static int TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f0700c4;
public static int TextAppearance_Widget_AppCompat_Toolbar_Subtitle=0x7f0700c5;
public static int TextAppearance_Widget_AppCompat_Toolbar_Title=0x7f0700c6;
public static int Theme_AppCompat=0x7f0700c7;
public static int Theme_AppCompat_CompactMenu=0x7f0700c8;
public static int Theme_AppCompat_Dialog=0x7f0700c9;
public static int Theme_AppCompat_Dialog_Alert=0x7f0700ca;
public static int Theme_AppCompat_Dialog_MinWidth=0x7f0700cb;
public static int Theme_AppCompat_DialogWhenLarge=0x7f0700cc;
public static int Theme_AppCompat_Light=0x7f0700cd;
public static int Theme_AppCompat_Light_DarkActionBar=0x7f0700ce;
public static int Theme_AppCompat_Light_Dialog=0x7f0700cf;
public static int Theme_AppCompat_Light_Dialog_Alert=0x7f0700d0;
public static int Theme_AppCompat_Light_Dialog_MinWidth=0x7f0700d1;
public static int Theme_AppCompat_Light_DialogWhenLarge=0x7f0700d2;
public static int Theme_AppCompat_Light_NoActionBar=0x7f0700d3;
public static int Theme_AppCompat_NoActionBar=0x7f0700d4;
public static int ThemeOverlay_AppCompat=0x7f0700d5;
public static int ThemeOverlay_AppCompat_ActionBar=0x7f0700d6;
public static int ThemeOverlay_AppCompat_Dark=0x7f0700d7;
public static int ThemeOverlay_AppCompat_Dark_ActionBar=0x7f0700d8;
public static int ThemeOverlay_AppCompat_Light=0x7f0700d9;
public static int Widget_AppCompat_ActionBar=0x7f0700da;
public static int Widget_AppCompat_ActionBar_Solid=0x7f0700db;
public static int Widget_AppCompat_ActionBar_TabBar=0x7f0700dc;
public static int Widget_AppCompat_ActionBar_TabText=0x7f0700dd;
public static int Widget_AppCompat_ActionBar_TabView=0x7f0700de;
public static int Widget_AppCompat_ActionButton=0x7f0700df;
public static int Widget_AppCompat_ActionButton_CloseMode=0x7f0700e0;
public static int Widget_AppCompat_ActionButton_Overflow=0x7f0700e1;
public static int Widget_AppCompat_ActionMode=0x7f0700e2;
public static int Widget_AppCompat_ActivityChooserView=0x7f0700e3;
public static int Widget_AppCompat_AutoCompleteTextView=0x7f0700e4;
public static int Widget_AppCompat_Button=0x7f0700e5;
public static int Widget_AppCompat_Button_Borderless=0x7f0700e6;
public static int Widget_AppCompat_Button_Borderless_Colored=0x7f0700e7;
public static int Widget_AppCompat_Button_ButtonBar_AlertDialog=0x7f0700e8;
public static int Widget_AppCompat_Button_Small=0x7f0700e9;
public static int Widget_AppCompat_ButtonBar=0x7f0700ea;
public static int Widget_AppCompat_ButtonBar_AlertDialog=0x7f0700eb;
public static int Widget_AppCompat_CompoundButton_CheckBox=0x7f0700ec;
public static int Widget_AppCompat_CompoundButton_RadioButton=0x7f0700ed;
public static int Widget_AppCompat_CompoundButton_Switch=0x7f0700ee;
public static int Widget_AppCompat_DrawerArrowToggle=0x7f0700ef;
public static int Widget_AppCompat_DropDownItem_Spinner=0x7f0700f0;
public static int Widget_AppCompat_EditText=0x7f0700f1;
public static int Widget_AppCompat_Light_ActionBar=0x7f0700f2;
public static int Widget_AppCompat_Light_ActionBar_Solid=0x7f0700f3;
public static int Widget_AppCompat_Light_ActionBar_Solid_Inverse=0x7f0700f4;
public static int Widget_AppCompat_Light_ActionBar_TabBar=0x7f0700f5;
public static int Widget_AppCompat_Light_ActionBar_TabBar_Inverse=0x7f0700f6;
public static int Widget_AppCompat_Light_ActionBar_TabText=0x7f0700f7;
public static int Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f0700f8;
public static int Widget_AppCompat_Light_ActionBar_TabView=0x7f0700f9;
public static int Widget_AppCompat_Light_ActionBar_TabView_Inverse=0x7f0700fa;
public static int Widget_AppCompat_Light_ActionButton=0x7f0700fb;
public static int Widget_AppCompat_Light_ActionButton_CloseMode=0x7f0700fc;
public static int Widget_AppCompat_Light_ActionButton_Overflow=0x7f0700fd;
public static int Widget_AppCompat_Light_ActionMode_Inverse=0x7f0700fe;
public static int Widget_AppCompat_Light_ActivityChooserView=0x7f0700ff;
public static int Widget_AppCompat_Light_AutoCompleteTextView=0x7f070100;
public static int Widget_AppCompat_Light_DropDownItem_Spinner=0x7f070101;
public static int Widget_AppCompat_Light_ListPopupWindow=0x7f070102;
public static int Widget_AppCompat_Light_ListView_DropDown=0x7f070103;
public static int Widget_AppCompat_Light_PopupMenu=0x7f070104;
public static int Widget_AppCompat_Light_PopupMenu_Overflow=0x7f070105;
public static int Widget_AppCompat_Light_SearchView=0x7f070106;
public static int Widget_AppCompat_Light_Spinner_DropDown_ActionBar=0x7f070107;
public static int Widget_AppCompat_ListPopupWindow=0x7f070108;
public static int Widget_AppCompat_ListView=0x7f070109;
public static int Widget_AppCompat_ListView_DropDown=0x7f07010a;
public static int Widget_AppCompat_ListView_Menu=0x7f07010b;
public static int Widget_AppCompat_PopupMenu=0x7f07010c;
public static int Widget_AppCompat_PopupMenu_Overflow=0x7f07010d;
public static int Widget_AppCompat_PopupWindow=0x7f07010e;
public static int Widget_AppCompat_ProgressBar=0x7f07010f;
public static int Widget_AppCompat_ProgressBar_Horizontal=0x7f070110;
public static int Widget_AppCompat_RatingBar=0x7f070111;
public static int Widget_AppCompat_SearchView=0x7f070112;
public static int Widget_AppCompat_SearchView_ActionBar=0x7f070113;
public static int Widget_AppCompat_Spinner=0x7f070114;
public static int Widget_AppCompat_Spinner_DropDown=0x7f070115;
public static int Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f070116;
public static int Widget_AppCompat_Spinner_Underlined=0x7f070117;
public static int Widget_AppCompat_TextView_SpinnerItem=0x7f070118;
public static int Widget_AppCompat_Toolbar=0x7f070119;
public static int Widget_AppCompat_Toolbar_Button_Navigation=0x7f07011a;
}
public static final class styleable {
/** Attributes that can be used with a ActionBar.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionBar_background com.lhh.ptrrv.library:background}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_backgroundSplit com.lhh.ptrrv.library:backgroundSplit}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_backgroundStacked com.lhh.ptrrv.library:backgroundStacked}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_contentInsetEnd com.lhh.ptrrv.library:contentInsetEnd}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_contentInsetLeft com.lhh.ptrrv.library:contentInsetLeft}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_contentInsetRight com.lhh.ptrrv.library:contentInsetRight}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_contentInsetStart com.lhh.ptrrv.library:contentInsetStart}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_customNavigationLayout com.lhh.ptrrv.library:customNavigationLayout}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_displayOptions com.lhh.ptrrv.library:displayOptions}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_divider com.lhh.ptrrv.library:divider}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_elevation com.lhh.ptrrv.library:elevation}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_height com.lhh.ptrrv.library:height}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_hideOnContentScroll com.lhh.ptrrv.library:hideOnContentScroll}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_homeAsUpIndicator com.lhh.ptrrv.library:homeAsUpIndicator}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_homeLayout com.lhh.ptrrv.library:homeLayout}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_icon com.lhh.ptrrv.library:icon}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_indeterminateProgressStyle com.lhh.ptrrv.library:indeterminateProgressStyle}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_itemPadding com.lhh.ptrrv.library:itemPadding}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_logo com.lhh.ptrrv.library:logo}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_navigationMode com.lhh.ptrrv.library:navigationMode}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_popupTheme com.lhh.ptrrv.library:popupTheme}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_progressBarPadding com.lhh.ptrrv.library:progressBarPadding}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_progressBarStyle com.lhh.ptrrv.library:progressBarStyle}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_subtitle com.lhh.ptrrv.library:subtitle}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_subtitleTextStyle com.lhh.ptrrv.library:subtitleTextStyle}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_title com.lhh.ptrrv.library:title}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBar_titleTextStyle com.lhh.ptrrv.library:titleTextStyle}</code></td><td></td></tr>
</table>
@see #ActionBar_background
@see #ActionBar_backgroundSplit
@see #ActionBar_backgroundStacked
@see #ActionBar_contentInsetEnd
@see #ActionBar_contentInsetLeft
@see #ActionBar_contentInsetRight
@see #ActionBar_contentInsetStart
@see #ActionBar_customNavigationLayout
@see #ActionBar_displayOptions
@see #ActionBar_divider
@see #ActionBar_elevation
@see #ActionBar_height
@see #ActionBar_hideOnContentScroll
@see #ActionBar_homeAsUpIndicator
@see #ActionBar_homeLayout
@see #ActionBar_icon
@see #ActionBar_indeterminateProgressStyle
@see #ActionBar_itemPadding
@see #ActionBar_logo
@see #ActionBar_navigationMode
@see #ActionBar_popupTheme
@see #ActionBar_progressBarPadding
@see #ActionBar_progressBarStyle
@see #ActionBar_subtitle
@see #ActionBar_subtitleTextStyle
@see #ActionBar_title
@see #ActionBar_titleTextStyle
*/
public static final int[] ActionBar = {
0x7f010001, 0x7f010003, 0x7f010004, 0x7f010005,
0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009,
0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d,
0x7f01000e, 0x7f01000f, 0x7f010010, 0x7f010011,
0x7f010012, 0x7f010013, 0x7f010014, 0x7f010015,
0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019,
0x7f01001a, 0x7f01001b, 0x7f010080
};
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#background}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:background
*/
public static int ActionBar_background = 10;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#backgroundSplit}
attribute's value can be found in the {@link #ActionBar} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
@attr name com.lhh.ptrrv.library:backgroundSplit
*/
public static int ActionBar_backgroundSplit = 12;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#backgroundStacked}
attribute's value can be found in the {@link #ActionBar} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
@attr name com.lhh.ptrrv.library:backgroundStacked
*/
public static int ActionBar_backgroundStacked = 11;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#contentInsetEnd}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:contentInsetEnd
*/
public static int ActionBar_contentInsetEnd = 21;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#contentInsetLeft}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:contentInsetLeft
*/
public static int ActionBar_contentInsetLeft = 22;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#contentInsetRight}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:contentInsetRight
*/
public static int ActionBar_contentInsetRight = 23;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#contentInsetStart}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:contentInsetStart
*/
public static int ActionBar_contentInsetStart = 20;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#customNavigationLayout}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:customNavigationLayout
*/
public static int ActionBar_customNavigationLayout = 13;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#displayOptions}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr>
<tr><td><code>showHome</code></td><td>0x2</td><td></td></tr>
<tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr>
<tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr>
<tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr>
<tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr>
</table>
@attr name com.lhh.ptrrv.library:displayOptions
*/
public static int ActionBar_displayOptions = 3;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#divider}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:divider
*/
public static int ActionBar_divider = 9;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#elevation}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:elevation
*/
public static int ActionBar_elevation = 24;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#height}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:height
*/
public static int ActionBar_height = 0;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#hideOnContentScroll}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:hideOnContentScroll
*/
public static int ActionBar_hideOnContentScroll = 19;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#homeAsUpIndicator}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:homeAsUpIndicator
*/
public static int ActionBar_homeAsUpIndicator = 26;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#homeLayout}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:homeLayout
*/
public static int ActionBar_homeLayout = 14;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#icon}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:icon
*/
public static int ActionBar_icon = 7;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#indeterminateProgressStyle}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:indeterminateProgressStyle
*/
public static int ActionBar_indeterminateProgressStyle = 16;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#itemPadding}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:itemPadding
*/
public static int ActionBar_itemPadding = 18;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#logo}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:logo
*/
public static int ActionBar_logo = 8;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#navigationMode}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>normal</code></td><td>0</td><td></td></tr>
<tr><td><code>listMode</code></td><td>1</td><td></td></tr>
<tr><td><code>tabMode</code></td><td>2</td><td></td></tr>
</table>
@attr name com.lhh.ptrrv.library:navigationMode
*/
public static int ActionBar_navigationMode = 2;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#popupTheme}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:popupTheme
*/
public static int ActionBar_popupTheme = 25;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#progressBarPadding}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:progressBarPadding
*/
public static int ActionBar_progressBarPadding = 17;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#progressBarStyle}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:progressBarStyle
*/
public static int ActionBar_progressBarStyle = 15;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#subtitle}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:subtitle
*/
public static int ActionBar_subtitle = 4;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#subtitleTextStyle}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:subtitleTextStyle
*/
public static int ActionBar_subtitleTextStyle = 6;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#title}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:title
*/
public static int ActionBar_title = 1;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#titleTextStyle}
attribute's value can be found in the {@link #ActionBar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:titleTextStyle
*/
public static int ActionBar_titleTextStyle = 5;
/** Attributes that can be used with a ActionBarLayout.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionBarLayout_android_layout_gravity android:layout_gravity}</code></td><td></td></tr>
</table>
@see #ActionBarLayout_android_layout_gravity
*/
public static final int[] ActionBarLayout = {
0x010100b3
};
/**
<p>This symbol is the offset where the {@link android.R.attr#layout_gravity}
attribute's value can be found in the {@link #ActionBarLayout} array.
@attr name android:layout_gravity
*/
public static int ActionBarLayout_android_layout_gravity = 0;
/** Attributes that can be used with a ActionMenuItemView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionMenuItemView_android_minWidth android:minWidth}</code></td><td></td></tr>
</table>
@see #ActionMenuItemView_android_minWidth
*/
public static final int[] ActionMenuItemView = {
0x0101013f
};
/**
<p>This symbol is the offset where the {@link android.R.attr#minWidth}
attribute's value can be found in the {@link #ActionMenuItemView} array.
@attr name android:minWidth
*/
public static int ActionMenuItemView_android_minWidth = 0;
/** Attributes that can be used with a ActionMenuView.
*/
public static final int[] ActionMenuView = {
};
/** Attributes that can be used with a ActionMode.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionMode_background com.lhh.ptrrv.library:background}</code></td><td></td></tr>
<tr><td><code>{@link #ActionMode_backgroundSplit com.lhh.ptrrv.library:backgroundSplit}</code></td><td></td></tr>
<tr><td><code>{@link #ActionMode_closeItemLayout com.lhh.ptrrv.library:closeItemLayout}</code></td><td></td></tr>
<tr><td><code>{@link #ActionMode_height com.lhh.ptrrv.library:height}</code></td><td></td></tr>
<tr><td><code>{@link #ActionMode_subtitleTextStyle com.lhh.ptrrv.library:subtitleTextStyle}</code></td><td></td></tr>
<tr><td><code>{@link #ActionMode_titleTextStyle com.lhh.ptrrv.library:titleTextStyle}</code></td><td></td></tr>
</table>
@see #ActionMode_background
@see #ActionMode_backgroundSplit
@see #ActionMode_closeItemLayout
@see #ActionMode_height
@see #ActionMode_subtitleTextStyle
@see #ActionMode_titleTextStyle
*/
public static final int[] ActionMode = {
0x7f010001, 0x7f010007, 0x7f010008, 0x7f01000c,
0x7f01000e, 0x7f01001c
};
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#background}
attribute's value can be found in the {@link #ActionMode} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:background
*/
public static int ActionMode_background = 3;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#backgroundSplit}
attribute's value can be found in the {@link #ActionMode} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
@attr name com.lhh.ptrrv.library:backgroundSplit
*/
public static int ActionMode_backgroundSplit = 4;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#closeItemLayout}
attribute's value can be found in the {@link #ActionMode} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:closeItemLayout
*/
public static int ActionMode_closeItemLayout = 5;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#height}
attribute's value can be found in the {@link #ActionMode} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:height
*/
public static int ActionMode_height = 0;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#subtitleTextStyle}
attribute's value can be found in the {@link #ActionMode} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:subtitleTextStyle
*/
public static int ActionMode_subtitleTextStyle = 2;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#titleTextStyle}
attribute's value can be found in the {@link #ActionMode} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:titleTextStyle
*/
public static int ActionMode_titleTextStyle = 1;
/** Attributes that can be used with a ActivityChooserView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActivityChooserView_expandActivityOverflowButtonDrawable com.lhh.ptrrv.library:expandActivityOverflowButtonDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #ActivityChooserView_initialActivityCount com.lhh.ptrrv.library:initialActivityCount}</code></td><td></td></tr>
</table>
@see #ActivityChooserView_expandActivityOverflowButtonDrawable
@see #ActivityChooserView_initialActivityCount
*/
public static final int[] ActivityChooserView = {
0x7f01001d, 0x7f01001e
};
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#expandActivityOverflowButtonDrawable}
attribute's value can be found in the {@link #ActivityChooserView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:expandActivityOverflowButtonDrawable
*/
public static int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#initialActivityCount}
attribute's value can be found in the {@link #ActivityChooserView} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:initialActivityCount
*/
public static int ActivityChooserView_initialActivityCount = 0;
/** Attributes that can be used with a AlertDialog.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #AlertDialog_android_layout android:layout}</code></td><td></td></tr>
<tr><td><code>{@link #AlertDialog_buttonPanelSideLayout com.lhh.ptrrv.library:buttonPanelSideLayout}</code></td><td></td></tr>
<tr><td><code>{@link #AlertDialog_listItemLayout com.lhh.ptrrv.library:listItemLayout}</code></td><td></td></tr>
<tr><td><code>{@link #AlertDialog_listLayout com.lhh.ptrrv.library:listLayout}</code></td><td></td></tr>
<tr><td><code>{@link #AlertDialog_multiChoiceItemLayout com.lhh.ptrrv.library:multiChoiceItemLayout}</code></td><td></td></tr>
<tr><td><code>{@link #AlertDialog_singleChoiceItemLayout com.lhh.ptrrv.library:singleChoiceItemLayout}</code></td><td></td></tr>
</table>
@see #AlertDialog_android_layout
@see #AlertDialog_buttonPanelSideLayout
@see #AlertDialog_listItemLayout
@see #AlertDialog_listLayout
@see #AlertDialog_multiChoiceItemLayout
@see #AlertDialog_singleChoiceItemLayout
*/
public static final int[] AlertDialog = {
0x010100f2, 0x7f01001f, 0x7f010020, 0x7f010021,
0x7f010022, 0x7f010023
};
/**
<p>This symbol is the offset where the {@link android.R.attr#layout}
attribute's value can be found in the {@link #AlertDialog} array.
@attr name android:layout
*/
public static int AlertDialog_android_layout = 0;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#buttonPanelSideLayout}
attribute's value can be found in the {@link #AlertDialog} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:buttonPanelSideLayout
*/
public static int AlertDialog_buttonPanelSideLayout = 1;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#listItemLayout}
attribute's value can be found in the {@link #AlertDialog} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:listItemLayout
*/
public static int AlertDialog_listItemLayout = 5;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#listLayout}
attribute's value can be found in the {@link #AlertDialog} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:listLayout
*/
public static int AlertDialog_listLayout = 2;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#multiChoiceItemLayout}
attribute's value can be found in the {@link #AlertDialog} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:multiChoiceItemLayout
*/
public static int AlertDialog_multiChoiceItemLayout = 3;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#singleChoiceItemLayout}
attribute's value can be found in the {@link #AlertDialog} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:singleChoiceItemLayout
*/
public static int AlertDialog_singleChoiceItemLayout = 4;
/** Attributes that can be used with a AppCompatTextView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #AppCompatTextView_android_textAppearance android:textAppearance}</code></td><td></td></tr>
<tr><td><code>{@link #AppCompatTextView_textAllCaps com.lhh.ptrrv.library:textAllCaps}</code></td><td></td></tr>
</table>
@see #AppCompatTextView_android_textAppearance
@see #AppCompatTextView_textAllCaps
*/
public static final int[] AppCompatTextView = {
0x01010034, 0x7f010024
};
/**
<p>This symbol is the offset where the {@link android.R.attr#textAppearance}
attribute's value can be found in the {@link #AppCompatTextView} array.
@attr name android:textAppearance
*/
public static int AppCompatTextView_android_textAppearance = 0;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#textAllCaps}
attribute's value can be found in the {@link #AppCompatTextView} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a boolean value, either "<code>true</code>" or "<code>false</code>".
@attr name com.lhh.ptrrv.library:textAllCaps
*/
public static int AppCompatTextView_textAllCaps = 1;
/** Attributes that can be used with a DrawerArrowToggle.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #DrawerArrowToggle_barSize com.lhh.ptrrv.library:barSize}</code></td><td></td></tr>
<tr><td><code>{@link #DrawerArrowToggle_color com.lhh.ptrrv.library:color}</code></td><td></td></tr>
<tr><td><code>{@link #DrawerArrowToggle_drawableSize com.lhh.ptrrv.library:drawableSize}</code></td><td></td></tr>
<tr><td><code>{@link #DrawerArrowToggle_gapBetweenBars com.lhh.ptrrv.library:gapBetweenBars}</code></td><td></td></tr>
<tr><td><code>{@link #DrawerArrowToggle_middleBarArrowSize com.lhh.ptrrv.library:middleBarArrowSize}</code></td><td></td></tr>
<tr><td><code>{@link #DrawerArrowToggle_spinBars com.lhh.ptrrv.library:spinBars}</code></td><td></td></tr>
<tr><td><code>{@link #DrawerArrowToggle_thickness com.lhh.ptrrv.library:thickness}</code></td><td></td></tr>
<tr><td><code>{@link #DrawerArrowToggle_topBottomBarArrowSize com.lhh.ptrrv.library:topBottomBarArrowSize}</code></td><td></td></tr>
</table>
@see #DrawerArrowToggle_barSize
@see #DrawerArrowToggle_color
@see #DrawerArrowToggle_drawableSize
@see #DrawerArrowToggle_gapBetweenBars
@see #DrawerArrowToggle_middleBarArrowSize
@see #DrawerArrowToggle_spinBars
@see #DrawerArrowToggle_thickness
@see #DrawerArrowToggle_topBottomBarArrowSize
*/
public static final int[] DrawerArrowToggle = {
0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028,
0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c
};
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#barSize}
attribute's value can be found in the {@link #DrawerArrowToggle} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:barSize
*/
public static int DrawerArrowToggle_barSize = 6;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#color}
attribute's value can be found in the {@link #DrawerArrowToggle} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:color
*/
public static int DrawerArrowToggle_color = 0;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#drawableSize}
attribute's value can be found in the {@link #DrawerArrowToggle} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:drawableSize
*/
public static int DrawerArrowToggle_drawableSize = 2;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#gapBetweenBars}
attribute's value can be found in the {@link #DrawerArrowToggle} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:gapBetweenBars
*/
public static int DrawerArrowToggle_gapBetweenBars = 3;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#middleBarArrowSize}
attribute's value can be found in the {@link #DrawerArrowToggle} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:middleBarArrowSize
*/
public static int DrawerArrowToggle_middleBarArrowSize = 5;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#spinBars}
attribute's value can be found in the {@link #DrawerArrowToggle} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:spinBars
*/
public static int DrawerArrowToggle_spinBars = 1;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#thickness}
attribute's value can be found in the {@link #DrawerArrowToggle} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:thickness
*/
public static int DrawerArrowToggle_thickness = 7;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#topBottomBarArrowSize}
attribute's value can be found in the {@link #DrawerArrowToggle} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:topBottomBarArrowSize
*/
public static int DrawerArrowToggle_topBottomBarArrowSize = 4;
/** Attributes that can be used with a LinearLayoutCompat.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #LinearLayoutCompat_android_baselineAligned android:baselineAligned}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_android_baselineAlignedChildIndex android:baselineAlignedChildIndex}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_android_gravity android:gravity}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_android_orientation android:orientation}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_android_weightSum android:weightSum}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_divider com.lhh.ptrrv.library:divider}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_dividerPadding com.lhh.ptrrv.library:dividerPadding}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_measureWithLargestChild com.lhh.ptrrv.library:measureWithLargestChild}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_showDividers com.lhh.ptrrv.library:showDividers}</code></td><td></td></tr>
</table>
@see #LinearLayoutCompat_android_baselineAligned
@see #LinearLayoutCompat_android_baselineAlignedChildIndex
@see #LinearLayoutCompat_android_gravity
@see #LinearLayoutCompat_android_orientation
@see #LinearLayoutCompat_android_weightSum
@see #LinearLayoutCompat_divider
@see #LinearLayoutCompat_dividerPadding
@see #LinearLayoutCompat_measureWithLargestChild
@see #LinearLayoutCompat_showDividers
*/
public static final int[] LinearLayoutCompat = {
0x010100af, 0x010100c4, 0x01010126, 0x01010127,
0x01010128, 0x7f01000b, 0x7f01002d, 0x7f01002e,
0x7f01002f
};
/**
<p>This symbol is the offset where the {@link android.R.attr#baselineAligned}
attribute's value can be found in the {@link #LinearLayoutCompat} array.
@attr name android:baselineAligned
*/
public static int LinearLayoutCompat_android_baselineAligned = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#baselineAlignedChildIndex}
attribute's value can be found in the {@link #LinearLayoutCompat} array.
@attr name android:baselineAlignedChildIndex
*/
public static int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#gravity}
attribute's value can be found in the {@link #LinearLayoutCompat} array.
@attr name android:gravity
*/
public static int LinearLayoutCompat_android_gravity = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#orientation}
attribute's value can be found in the {@link #LinearLayoutCompat} array.
@attr name android:orientation
*/
public static int LinearLayoutCompat_android_orientation = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#weightSum}
attribute's value can be found in the {@link #LinearLayoutCompat} array.
@attr name android:weightSum
*/
public static int LinearLayoutCompat_android_weightSum = 4;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#divider}
attribute's value can be found in the {@link #LinearLayoutCompat} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:divider
*/
public static int LinearLayoutCompat_divider = 5;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#dividerPadding}
attribute's value can be found in the {@link #LinearLayoutCompat} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:dividerPadding
*/
public static int LinearLayoutCompat_dividerPadding = 8;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#measureWithLargestChild}
attribute's value can be found in the {@link #LinearLayoutCompat} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:measureWithLargestChild
*/
public static int LinearLayoutCompat_measureWithLargestChild = 6;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#showDividers}
attribute's value can be found in the {@link #LinearLayoutCompat} array.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>beginning</code></td><td>1</td><td></td></tr>
<tr><td><code>middle</code></td><td>2</td><td></td></tr>
<tr><td><code>end</code></td><td>4</td><td></td></tr>
</table>
@attr name com.lhh.ptrrv.library:showDividers
*/
public static int LinearLayoutCompat_showDividers = 7;
/** Attributes that can be used with a LinearLayoutCompat_Layout.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #LinearLayoutCompat_Layout_android_layout_gravity android:layout_gravity}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_Layout_android_layout_height android:layout_height}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_Layout_android_layout_weight android:layout_weight}</code></td><td></td></tr>
<tr><td><code>{@link #LinearLayoutCompat_Layout_android_layout_width android:layout_width}</code></td><td></td></tr>
</table>
@see #LinearLayoutCompat_Layout_android_layout_gravity
@see #LinearLayoutCompat_Layout_android_layout_height
@see #LinearLayoutCompat_Layout_android_layout_weight
@see #LinearLayoutCompat_Layout_android_layout_width
*/
public static final int[] LinearLayoutCompat_Layout = {
0x010100b3, 0x010100f4, 0x010100f5, 0x01010181
};
/**
<p>This symbol is the offset where the {@link android.R.attr#layout_gravity}
attribute's value can be found in the {@link #LinearLayoutCompat_Layout} array.
@attr name android:layout_gravity
*/
public static int LinearLayoutCompat_Layout_android_layout_gravity = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#layout_height}
attribute's value can be found in the {@link #LinearLayoutCompat_Layout} array.
@attr name android:layout_height
*/
public static int LinearLayoutCompat_Layout_android_layout_height = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#layout_weight}
attribute's value can be found in the {@link #LinearLayoutCompat_Layout} array.
@attr name android:layout_weight
*/
public static int LinearLayoutCompat_Layout_android_layout_weight = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#layout_width}
attribute's value can be found in the {@link #LinearLayoutCompat_Layout} array.
@attr name android:layout_width
*/
public static int LinearLayoutCompat_Layout_android_layout_width = 1;
/** Attributes that can be used with a ListPopupWindow.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ListPopupWindow_android_dropDownHorizontalOffset android:dropDownHorizontalOffset}</code></td><td></td></tr>
<tr><td><code>{@link #ListPopupWindow_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td></td></tr>
</table>
@see #ListPopupWindow_android_dropDownHorizontalOffset
@see #ListPopupWindow_android_dropDownVerticalOffset
*/
public static final int[] ListPopupWindow = {
0x010102ac, 0x010102ad
};
/**
<p>This symbol is the offset where the {@link android.R.attr#dropDownHorizontalOffset}
attribute's value can be found in the {@link #ListPopupWindow} array.
@attr name android:dropDownHorizontalOffset
*/
public static int ListPopupWindow_android_dropDownHorizontalOffset = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#dropDownVerticalOffset}
attribute's value can be found in the {@link #ListPopupWindow} array.
@attr name android:dropDownVerticalOffset
*/
public static int ListPopupWindow_android_dropDownVerticalOffset = 1;
/** Attributes that can be used with a MenuGroup.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MenuGroup_android_checkableBehavior android:checkableBehavior}</code></td><td></td></tr>
<tr><td><code>{@link #MenuGroup_android_enabled android:enabled}</code></td><td></td></tr>
<tr><td><code>{@link #MenuGroup_android_id android:id}</code></td><td></td></tr>
<tr><td><code>{@link #MenuGroup_android_menuCategory android:menuCategory}</code></td><td></td></tr>
<tr><td><code>{@link #MenuGroup_android_orderInCategory android:orderInCategory}</code></td><td></td></tr>
<tr><td><code>{@link #MenuGroup_android_visible android:visible}</code></td><td></td></tr>
</table>
@see #MenuGroup_android_checkableBehavior
@see #MenuGroup_android_enabled
@see #MenuGroup_android_id
@see #MenuGroup_android_menuCategory
@see #MenuGroup_android_orderInCategory
@see #MenuGroup_android_visible
*/
public static final int[] MenuGroup = {
0x0101000e, 0x010100d0, 0x01010194, 0x010101de,
0x010101df, 0x010101e0
};
/**
<p>This symbol is the offset where the {@link android.R.attr#checkableBehavior}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:checkableBehavior
*/
public static int MenuGroup_android_checkableBehavior = 5;
/**
<p>This symbol is the offset where the {@link android.R.attr#enabled}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:enabled
*/
public static int MenuGroup_android_enabled = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#id}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:id
*/
public static int MenuGroup_android_id = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#menuCategory}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:menuCategory
*/
public static int MenuGroup_android_menuCategory = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#orderInCategory}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:orderInCategory
*/
public static int MenuGroup_android_orderInCategory = 4;
/**
<p>This symbol is the offset where the {@link android.R.attr#visible}
attribute's value can be found in the {@link #MenuGroup} array.
@attr name android:visible
*/
public static int MenuGroup_android_visible = 2;
/** Attributes that can be used with a MenuItem.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MenuItem_actionLayout com.lhh.ptrrv.library:actionLayout}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_actionProviderClass com.lhh.ptrrv.library:actionProviderClass}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_actionViewClass com.lhh.ptrrv.library:actionViewClass}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_checked android:checked}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_enabled android:enabled}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_icon android:icon}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_id android:id}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_menuCategory android:menuCategory}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_numericShortcut android:numericShortcut}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_onClick android:onClick}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_orderInCategory android:orderInCategory}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td></td></tr>
<tr><td><code>{@link #MenuItem_showAsAction com.lhh.ptrrv.library:showAsAction}</code></td><td></td></tr>
</table>
@see #MenuItem_actionLayout
@see #MenuItem_actionProviderClass
@see #MenuItem_actionViewClass
@see #MenuItem_android_alphabeticShortcut
@see #MenuItem_android_checkable
@see #MenuItem_android_checked
@see #MenuItem_android_enabled
@see #MenuItem_android_icon
@see #MenuItem_android_id
@see #MenuItem_android_menuCategory
@see #MenuItem_android_numericShortcut
@see #MenuItem_android_onClick
@see #MenuItem_android_orderInCategory
@see #MenuItem_android_title
@see #MenuItem_android_titleCondensed
@see #MenuItem_android_visible
@see #MenuItem_showAsAction
*/
public static final int[] MenuItem = {
0x01010002, 0x0101000e, 0x010100d0, 0x01010106,
0x01010194, 0x010101de, 0x010101df, 0x010101e1,
0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5,
0x0101026f, 0x7f010030, 0x7f010031, 0x7f010032,
0x7f010033
};
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionLayout}
attribute's value can be found in the {@link #MenuItem} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionLayout
*/
public static int MenuItem_actionLayout = 14;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionProviderClass}
attribute's value can be found in the {@link #MenuItem} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:actionProviderClass
*/
public static int MenuItem_actionProviderClass = 16;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionViewClass}
attribute's value can be found in the {@link #MenuItem} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:actionViewClass
*/
public static int MenuItem_actionViewClass = 15;
/**
<p>This symbol is the offset where the {@link android.R.attr#alphabeticShortcut}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:alphabeticShortcut
*/
public static int MenuItem_android_alphabeticShortcut = 9;
/**
<p>This symbol is the offset where the {@link android.R.attr#checkable}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:checkable
*/
public static int MenuItem_android_checkable = 11;
/**
<p>This symbol is the offset where the {@link android.R.attr#checked}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:checked
*/
public static int MenuItem_android_checked = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#enabled}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:enabled
*/
public static int MenuItem_android_enabled = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#icon}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:icon
*/
public static int MenuItem_android_icon = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#id}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:id
*/
public static int MenuItem_android_id = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#menuCategory}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:menuCategory
*/
public static int MenuItem_android_menuCategory = 5;
/**
<p>This symbol is the offset where the {@link android.R.attr#numericShortcut}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:numericShortcut
*/
public static int MenuItem_android_numericShortcut = 10;
/**
<p>This symbol is the offset where the {@link android.R.attr#onClick}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:onClick
*/
public static int MenuItem_android_onClick = 12;
/**
<p>This symbol is the offset where the {@link android.R.attr#orderInCategory}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:orderInCategory
*/
public static int MenuItem_android_orderInCategory = 6;
/**
<p>This symbol is the offset where the {@link android.R.attr#title}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:title
*/
public static int MenuItem_android_title = 7;
/**
<p>This symbol is the offset where the {@link android.R.attr#titleCondensed}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:titleCondensed
*/
public static int MenuItem_android_titleCondensed = 8;
/**
<p>This symbol is the offset where the {@link android.R.attr#visible}
attribute's value can be found in the {@link #MenuItem} array.
@attr name android:visible
*/
public static int MenuItem_android_visible = 4;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#showAsAction}
attribute's value can be found in the {@link #MenuItem} array.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>never</code></td><td>0</td><td></td></tr>
<tr><td><code>ifRoom</code></td><td>1</td><td></td></tr>
<tr><td><code>always</code></td><td>2</td><td></td></tr>
<tr><td><code>withText</code></td><td>4</td><td></td></tr>
<tr><td><code>collapseActionView</code></td><td>8</td><td></td></tr>
</table>
@attr name com.lhh.ptrrv.library:showAsAction
*/
public static int MenuItem_showAsAction = 13;
/** Attributes that can be used with a MenuView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MenuView_android_headerBackground android:headerBackground}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_horizontalDivider android:horizontalDivider}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_itemBackground android:itemBackground}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_itemIconDisabledAlpha android:itemIconDisabledAlpha}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_itemTextAppearance android:itemTextAppearance}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_verticalDivider android:verticalDivider}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td></td></tr>
<tr><td><code>{@link #MenuView_preserveIconSpacing com.lhh.ptrrv.library:preserveIconSpacing}</code></td><td></td></tr>
</table>
@see #MenuView_android_headerBackground
@see #MenuView_android_horizontalDivider
@see #MenuView_android_itemBackground
@see #MenuView_android_itemIconDisabledAlpha
@see #MenuView_android_itemTextAppearance
@see #MenuView_android_verticalDivider
@see #MenuView_android_windowAnimationStyle
@see #MenuView_preserveIconSpacing
*/
public static final int[] MenuView = {
0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e,
0x0101012f, 0x01010130, 0x01010131, 0x7f010034
};
/**
<p>This symbol is the offset where the {@link android.R.attr#headerBackground}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:headerBackground
*/
public static int MenuView_android_headerBackground = 4;
/**
<p>This symbol is the offset where the {@link android.R.attr#horizontalDivider}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:horizontalDivider
*/
public static int MenuView_android_horizontalDivider = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#itemBackground}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:itemBackground
*/
public static int MenuView_android_itemBackground = 5;
/**
<p>This symbol is the offset where the {@link android.R.attr#itemIconDisabledAlpha}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:itemIconDisabledAlpha
*/
public static int MenuView_android_itemIconDisabledAlpha = 6;
/**
<p>This symbol is the offset where the {@link android.R.attr#itemTextAppearance}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:itemTextAppearance
*/
public static int MenuView_android_itemTextAppearance = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#verticalDivider}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:verticalDivider
*/
public static int MenuView_android_verticalDivider = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#windowAnimationStyle}
attribute's value can be found in the {@link #MenuView} array.
@attr name android:windowAnimationStyle
*/
public static int MenuView_android_windowAnimationStyle = 0;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#preserveIconSpacing}
attribute's value can be found in the {@link #MenuView} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:preserveIconSpacing
*/
public static int MenuView_preserveIconSpacing = 7;
/** Attributes that can be used with a PopupWindow.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #PopupWindow_android_popupBackground android:popupBackground}</code></td><td></td></tr>
<tr><td><code>{@link #PopupWindow_overlapAnchor com.lhh.ptrrv.library:overlapAnchor}</code></td><td></td></tr>
</table>
@see #PopupWindow_android_popupBackground
@see #PopupWindow_overlapAnchor
*/
public static final int[] PopupWindow = {
0x01010176, 0x7f010035
};
/**
<p>This symbol is the offset where the {@link android.R.attr#popupBackground}
attribute's value can be found in the {@link #PopupWindow} array.
@attr name android:popupBackground
*/
public static int PopupWindow_android_popupBackground = 0;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#overlapAnchor}
attribute's value can be found in the {@link #PopupWindow} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:overlapAnchor
*/
public static int PopupWindow_overlapAnchor = 1;
/** Attributes that can be used with a PopupWindowBackgroundState.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #PopupWindowBackgroundState_state_above_anchor com.lhh.ptrrv.library:state_above_anchor}</code></td><td></td></tr>
</table>
@see #PopupWindowBackgroundState_state_above_anchor
*/
public static final int[] PopupWindowBackgroundState = {
0x7f010036
};
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#state_above_anchor}
attribute's value can be found in the {@link #PopupWindowBackgroundState} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:state_above_anchor
*/
public static int PopupWindowBackgroundState_state_above_anchor = 0;
/** Attributes that can be used with a RecyclerView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #RecyclerView_android_orientation android:orientation}</code></td><td></td></tr>
<tr><td><code>{@link #RecyclerView_layoutManager com.lhh.ptrrv.library:layoutManager}</code></td><td></td></tr>
<tr><td><code>{@link #RecyclerView_reverseLayout com.lhh.ptrrv.library:reverseLayout}</code></td><td></td></tr>
<tr><td><code>{@link #RecyclerView_spanCount com.lhh.ptrrv.library:spanCount}</code></td><td></td></tr>
<tr><td><code>{@link #RecyclerView_stackFromEnd com.lhh.ptrrv.library:stackFromEnd}</code></td><td></td></tr>
</table>
@see #RecyclerView_android_orientation
@see #RecyclerView_layoutManager
@see #RecyclerView_reverseLayout
@see #RecyclerView_spanCount
@see #RecyclerView_stackFromEnd
*/
public static final int[] RecyclerView = {
0x010100c4, 0x7f010037, 0x7f010038, 0x7f010039,
0x7f01003a
};
/**
<p>This symbol is the offset where the {@link android.R.attr#orientation}
attribute's value can be found in the {@link #RecyclerView} array.
@attr name android:orientation
*/
public static int RecyclerView_android_orientation = 0;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#layoutManager}
attribute's value can be found in the {@link #RecyclerView} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:layoutManager
*/
public static int RecyclerView_layoutManager = 1;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#reverseLayout}
attribute's value can be found in the {@link #RecyclerView} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:reverseLayout
*/
public static int RecyclerView_reverseLayout = 3;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#spanCount}
attribute's value can be found in the {@link #RecyclerView} array.
<p>Must be an integer value, such as "<code>100</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:spanCount
*/
public static int RecyclerView_spanCount = 2;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#stackFromEnd}
attribute's value can be found in the {@link #RecyclerView} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:stackFromEnd
*/
public static int RecyclerView_stackFromEnd = 4;
/** Attributes that can be used with a SearchView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #SearchView_android_focusable android:focusable}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_closeIcon com.lhh.ptrrv.library:closeIcon}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_commitIcon com.lhh.ptrrv.library:commitIcon}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_goIcon com.lhh.ptrrv.library:goIcon}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_iconifiedByDefault com.lhh.ptrrv.library:iconifiedByDefault}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_layout com.lhh.ptrrv.library:layout}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_queryBackground com.lhh.ptrrv.library:queryBackground}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_queryHint com.lhh.ptrrv.library:queryHint}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_searchHintIcon com.lhh.ptrrv.library:searchHintIcon}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_searchIcon com.lhh.ptrrv.library:searchIcon}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_submitBackground com.lhh.ptrrv.library:submitBackground}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_suggestionRowLayout com.lhh.ptrrv.library:suggestionRowLayout}</code></td><td></td></tr>
<tr><td><code>{@link #SearchView_voiceIcon com.lhh.ptrrv.library:voiceIcon}</code></td><td></td></tr>
</table>
@see #SearchView_android_focusable
@see #SearchView_android_imeOptions
@see #SearchView_android_inputType
@see #SearchView_android_maxWidth
@see #SearchView_closeIcon
@see #SearchView_commitIcon
@see #SearchView_goIcon
@see #SearchView_iconifiedByDefault
@see #SearchView_layout
@see #SearchView_queryBackground
@see #SearchView_queryHint
@see #SearchView_searchHintIcon
@see #SearchView_searchIcon
@see #SearchView_submitBackground
@see #SearchView_suggestionRowLayout
@see #SearchView_voiceIcon
*/
public static final int[] SearchView = {
0x010100da, 0x0101011f, 0x01010220, 0x01010264,
0x7f01003b, 0x7f01003c, 0x7f01003d, 0x7f01003e,
0x7f01003f, 0x7f010040, 0x7f010041, 0x7f010042,
0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046
};
/**
<p>This symbol is the offset where the {@link android.R.attr#focusable}
attribute's value can be found in the {@link #SearchView} array.
@attr name android:focusable
*/
public static int SearchView_android_focusable = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#imeOptions}
attribute's value can be found in the {@link #SearchView} array.
@attr name android:imeOptions
*/
public static int SearchView_android_imeOptions = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#inputType}
attribute's value can be found in the {@link #SearchView} array.
@attr name android:inputType
*/
public static int SearchView_android_inputType = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#maxWidth}
attribute's value can be found in the {@link #SearchView} array.
@attr name android:maxWidth
*/
public static int SearchView_android_maxWidth = 1;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#closeIcon}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:closeIcon
*/
public static int SearchView_closeIcon = 7;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#commitIcon}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:commitIcon
*/
public static int SearchView_commitIcon = 12;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#goIcon}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:goIcon
*/
public static int SearchView_goIcon = 8;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#iconifiedByDefault}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:iconifiedByDefault
*/
public static int SearchView_iconifiedByDefault = 5;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#layout}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:layout
*/
public static int SearchView_layout = 4;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#queryBackground}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:queryBackground
*/
public static int SearchView_queryBackground = 14;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#queryHint}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:queryHint
*/
public static int SearchView_queryHint = 6;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#searchHintIcon}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:searchHintIcon
*/
public static int SearchView_searchHintIcon = 10;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#searchIcon}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:searchIcon
*/
public static int SearchView_searchIcon = 9;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#submitBackground}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:submitBackground
*/
public static int SearchView_submitBackground = 15;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#suggestionRowLayout}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:suggestionRowLayout
*/
public static int SearchView_suggestionRowLayout = 13;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#voiceIcon}
attribute's value can be found in the {@link #SearchView} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:voiceIcon
*/
public static int SearchView_voiceIcon = 11;
/** Attributes that can be used with a Spinner.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #Spinner_android_background android:background}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_android_dropDownHorizontalOffset android:dropDownHorizontalOffset}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_android_dropDownSelector android:dropDownSelector}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_disableChildrenWhenDisabled com.lhh.ptrrv.library:disableChildrenWhenDisabled}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_popupPromptView com.lhh.ptrrv.library:popupPromptView}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_prompt com.lhh.ptrrv.library:prompt}</code></td><td></td></tr>
<tr><td><code>{@link #Spinner_spinnerMode com.lhh.ptrrv.library:spinnerMode}</code></td><td></td></tr>
</table>
@see #Spinner_android_background
@see #Spinner_android_dropDownHorizontalOffset
@see #Spinner_android_dropDownSelector
@see #Spinner_android_dropDownVerticalOffset
@see #Spinner_android_dropDownWidth
@see #Spinner_android_gravity
@see #Spinner_android_popupBackground
@see #Spinner_disableChildrenWhenDisabled
@see #Spinner_popupPromptView
@see #Spinner_prompt
@see #Spinner_spinnerMode
*/
public static final int[] Spinner = {
0x010100af, 0x010100d4, 0x01010175, 0x01010176,
0x01010262, 0x010102ac, 0x010102ad, 0x7f010047,
0x7f010048, 0x7f010049, 0x7f01004a
};
/**
<p>This symbol is the offset where the {@link android.R.attr#background}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:background
*/
public static int Spinner_android_background = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#dropDownHorizontalOffset}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:dropDownHorizontalOffset
*/
public static int Spinner_android_dropDownHorizontalOffset = 5;
/**
<p>This symbol is the offset where the {@link android.R.attr#dropDownSelector}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:dropDownSelector
*/
public static int Spinner_android_dropDownSelector = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#dropDownVerticalOffset}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:dropDownVerticalOffset
*/
public static int Spinner_android_dropDownVerticalOffset = 6;
/**
<p>This symbol is the offset where the {@link android.R.attr#dropDownWidth}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:dropDownWidth
*/
public static int Spinner_android_dropDownWidth = 4;
/**
<p>This symbol is the offset where the {@link android.R.attr#gravity}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:gravity
*/
public static int Spinner_android_gravity = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#popupBackground}
attribute's value can be found in the {@link #Spinner} array.
@attr name android:popupBackground
*/
public static int Spinner_android_popupBackground = 3;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#disableChildrenWhenDisabled}
attribute's value can be found in the {@link #Spinner} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:disableChildrenWhenDisabled
*/
public static int Spinner_disableChildrenWhenDisabled = 10;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#popupPromptView}
attribute's value can be found in the {@link #Spinner} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:popupPromptView
*/
public static int Spinner_popupPromptView = 9;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#prompt}
attribute's value can be found in the {@link #Spinner} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:prompt
*/
public static int Spinner_prompt = 7;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#spinnerMode}
attribute's value can be found in the {@link #Spinner} array.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>dialog</code></td><td>0</td><td></td></tr>
<tr><td><code>dropdown</code></td><td>1</td><td></td></tr>
</table>
@attr name com.lhh.ptrrv.library:spinnerMode
*/
public static int Spinner_spinnerMode = 8;
/** Attributes that can be used with a SwitchCompat.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #SwitchCompat_android_textOff android:textOff}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchCompat_android_textOn android:textOn}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchCompat_android_thumb android:thumb}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchCompat_showText com.lhh.ptrrv.library:showText}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchCompat_splitTrack com.lhh.ptrrv.library:splitTrack}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchCompat_switchMinWidth com.lhh.ptrrv.library:switchMinWidth}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchCompat_switchPadding com.lhh.ptrrv.library:switchPadding}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchCompat_switchTextAppearance com.lhh.ptrrv.library:switchTextAppearance}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchCompat_thumbTextPadding com.lhh.ptrrv.library:thumbTextPadding}</code></td><td></td></tr>
<tr><td><code>{@link #SwitchCompat_track com.lhh.ptrrv.library:track}</code></td><td></td></tr>
</table>
@see #SwitchCompat_android_textOff
@see #SwitchCompat_android_textOn
@see #SwitchCompat_android_thumb
@see #SwitchCompat_showText
@see #SwitchCompat_splitTrack
@see #SwitchCompat_switchMinWidth
@see #SwitchCompat_switchPadding
@see #SwitchCompat_switchTextAppearance
@see #SwitchCompat_thumbTextPadding
@see #SwitchCompat_track
*/
public static final int[] SwitchCompat = {
0x01010124, 0x01010125, 0x01010142, 0x7f01004b,
0x7f01004c, 0x7f01004d, 0x7f01004e, 0x7f01004f,
0x7f010050, 0x7f010051
};
/**
<p>This symbol is the offset where the {@link android.R.attr#textOff}
attribute's value can be found in the {@link #SwitchCompat} array.
@attr name android:textOff
*/
public static int SwitchCompat_android_textOff = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#textOn}
attribute's value can be found in the {@link #SwitchCompat} array.
@attr name android:textOn
*/
public static int SwitchCompat_android_textOn = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#thumb}
attribute's value can be found in the {@link #SwitchCompat} array.
@attr name android:thumb
*/
public static int SwitchCompat_android_thumb = 2;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#showText}
attribute's value can be found in the {@link #SwitchCompat} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:showText
*/
public static int SwitchCompat_showText = 9;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#splitTrack}
attribute's value can be found in the {@link #SwitchCompat} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:splitTrack
*/
public static int SwitchCompat_splitTrack = 8;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#switchMinWidth}
attribute's value can be found in the {@link #SwitchCompat} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:switchMinWidth
*/
public static int SwitchCompat_switchMinWidth = 6;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#switchPadding}
attribute's value can be found in the {@link #SwitchCompat} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:switchPadding
*/
public static int SwitchCompat_switchPadding = 7;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#switchTextAppearance}
attribute's value can be found in the {@link #SwitchCompat} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:switchTextAppearance
*/
public static int SwitchCompat_switchTextAppearance = 5;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#thumbTextPadding}
attribute's value can be found in the {@link #SwitchCompat} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:thumbTextPadding
*/
public static int SwitchCompat_thumbTextPadding = 4;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#track}
attribute's value can be found in the {@link #SwitchCompat} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:track
*/
public static int SwitchCompat_track = 3;
/** Attributes that can be used with a TextAppearance.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #TextAppearance_android_textColor android:textColor}</code></td><td></td></tr>
<tr><td><code>{@link #TextAppearance_android_textSize android:textSize}</code></td><td></td></tr>
<tr><td><code>{@link #TextAppearance_android_textStyle android:textStyle}</code></td><td></td></tr>
<tr><td><code>{@link #TextAppearance_android_typeface android:typeface}</code></td><td></td></tr>
<tr><td><code>{@link #TextAppearance_textAllCaps com.lhh.ptrrv.library:textAllCaps}</code></td><td></td></tr>
</table>
@see #TextAppearance_android_textColor
@see #TextAppearance_android_textSize
@see #TextAppearance_android_textStyle
@see #TextAppearance_android_typeface
@see #TextAppearance_textAllCaps
*/
public static final int[] TextAppearance = {
0x01010095, 0x01010096, 0x01010097, 0x01010098,
0x7f010024
};
/**
<p>This symbol is the offset where the {@link android.R.attr#textColor}
attribute's value can be found in the {@link #TextAppearance} array.
@attr name android:textColor
*/
public static int TextAppearance_android_textColor = 3;
/**
<p>This symbol is the offset where the {@link android.R.attr#textSize}
attribute's value can be found in the {@link #TextAppearance} array.
@attr name android:textSize
*/
public static int TextAppearance_android_textSize = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#textStyle}
attribute's value can be found in the {@link #TextAppearance} array.
@attr name android:textStyle
*/
public static int TextAppearance_android_textStyle = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#typeface}
attribute's value can be found in the {@link #TextAppearance} array.
@attr name android:typeface
*/
public static int TextAppearance_android_typeface = 1;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#textAllCaps}
attribute's value can be found in the {@link #TextAppearance} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a boolean value, either "<code>true</code>" or "<code>false</code>".
@attr name com.lhh.ptrrv.library:textAllCaps
*/
public static int TextAppearance_textAllCaps = 4;
/** Attributes that can be used with a Theme.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #Theme_actionBarDivider com.lhh.ptrrv.library:actionBarDivider}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionBarItemBackground com.lhh.ptrrv.library:actionBarItemBackground}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionBarPopupTheme com.lhh.ptrrv.library:actionBarPopupTheme}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionBarSize com.lhh.ptrrv.library:actionBarSize}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionBarSplitStyle com.lhh.ptrrv.library:actionBarSplitStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionBarStyle com.lhh.ptrrv.library:actionBarStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionBarTabBarStyle com.lhh.ptrrv.library:actionBarTabBarStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionBarTabStyle com.lhh.ptrrv.library:actionBarTabStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionBarTabTextStyle com.lhh.ptrrv.library:actionBarTabTextStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionBarTheme com.lhh.ptrrv.library:actionBarTheme}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionBarWidgetTheme com.lhh.ptrrv.library:actionBarWidgetTheme}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionButtonStyle com.lhh.ptrrv.library:actionButtonStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionDropDownStyle com.lhh.ptrrv.library:actionDropDownStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionMenuTextAppearance com.lhh.ptrrv.library:actionMenuTextAppearance}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionMenuTextColor com.lhh.ptrrv.library:actionMenuTextColor}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeBackground com.lhh.ptrrv.library:actionModeBackground}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeCloseButtonStyle com.lhh.ptrrv.library:actionModeCloseButtonStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeCloseDrawable com.lhh.ptrrv.library:actionModeCloseDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeCopyDrawable com.lhh.ptrrv.library:actionModeCopyDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeCutDrawable com.lhh.ptrrv.library:actionModeCutDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeFindDrawable com.lhh.ptrrv.library:actionModeFindDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModePasteDrawable com.lhh.ptrrv.library:actionModePasteDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModePopupWindowStyle com.lhh.ptrrv.library:actionModePopupWindowStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeSelectAllDrawable com.lhh.ptrrv.library:actionModeSelectAllDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeShareDrawable com.lhh.ptrrv.library:actionModeShareDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeSplitBackground com.lhh.ptrrv.library:actionModeSplitBackground}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeStyle com.lhh.ptrrv.library:actionModeStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionModeWebSearchDrawable com.lhh.ptrrv.library:actionModeWebSearchDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionOverflowButtonStyle com.lhh.ptrrv.library:actionOverflowButtonStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_actionOverflowMenuStyle com.lhh.ptrrv.library:actionOverflowMenuStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_activityChooserViewStyle com.lhh.ptrrv.library:activityChooserViewStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_alertDialogButtonGroupStyle com.lhh.ptrrv.library:alertDialogButtonGroupStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_alertDialogCenterButtons com.lhh.ptrrv.library:alertDialogCenterButtons}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_alertDialogStyle com.lhh.ptrrv.library:alertDialogStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_alertDialogTheme com.lhh.ptrrv.library:alertDialogTheme}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_android_windowIsFloating android:windowIsFloating}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_autoCompleteTextViewStyle com.lhh.ptrrv.library:autoCompleteTextViewStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_buttonBarButtonStyle com.lhh.ptrrv.library:buttonBarButtonStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_buttonBarNegativeButtonStyle com.lhh.ptrrv.library:buttonBarNegativeButtonStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_buttonBarNeutralButtonStyle com.lhh.ptrrv.library:buttonBarNeutralButtonStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_buttonBarPositiveButtonStyle com.lhh.ptrrv.library:buttonBarPositiveButtonStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_buttonBarStyle com.lhh.ptrrv.library:buttonBarStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_buttonStyle com.lhh.ptrrv.library:buttonStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_buttonStyleSmall com.lhh.ptrrv.library:buttonStyleSmall}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_checkboxStyle com.lhh.ptrrv.library:checkboxStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_checkedTextViewStyle com.lhh.ptrrv.library:checkedTextViewStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_colorAccent com.lhh.ptrrv.library:colorAccent}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_colorButtonNormal com.lhh.ptrrv.library:colorButtonNormal}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_colorControlActivated com.lhh.ptrrv.library:colorControlActivated}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_colorControlHighlight com.lhh.ptrrv.library:colorControlHighlight}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_colorControlNormal com.lhh.ptrrv.library:colorControlNormal}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_colorPrimary com.lhh.ptrrv.library:colorPrimary}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_colorPrimaryDark com.lhh.ptrrv.library:colorPrimaryDark}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_colorSwitchThumbNormal com.lhh.ptrrv.library:colorSwitchThumbNormal}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_dialogPreferredPadding com.lhh.ptrrv.library:dialogPreferredPadding}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_dialogTheme com.lhh.ptrrv.library:dialogTheme}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_dividerHorizontal com.lhh.ptrrv.library:dividerHorizontal}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_dividerVertical com.lhh.ptrrv.library:dividerVertical}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_dropDownListViewStyle com.lhh.ptrrv.library:dropDownListViewStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_dropdownListPreferredItemHeight com.lhh.ptrrv.library:dropdownListPreferredItemHeight}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_editTextBackground com.lhh.ptrrv.library:editTextBackground}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_editTextColor com.lhh.ptrrv.library:editTextColor}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_editTextStyle com.lhh.ptrrv.library:editTextStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_homeAsUpIndicator com.lhh.ptrrv.library:homeAsUpIndicator}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_listChoiceBackgroundIndicator com.lhh.ptrrv.library:listChoiceBackgroundIndicator}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_listDividerAlertDialog com.lhh.ptrrv.library:listDividerAlertDialog}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_listPopupWindowStyle com.lhh.ptrrv.library:listPopupWindowStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_listPreferredItemHeight com.lhh.ptrrv.library:listPreferredItemHeight}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_listPreferredItemHeightLarge com.lhh.ptrrv.library:listPreferredItemHeightLarge}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_listPreferredItemHeightSmall com.lhh.ptrrv.library:listPreferredItemHeightSmall}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_listPreferredItemPaddingLeft com.lhh.ptrrv.library:listPreferredItemPaddingLeft}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_listPreferredItemPaddingRight com.lhh.ptrrv.library:listPreferredItemPaddingRight}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_panelBackground com.lhh.ptrrv.library:panelBackground}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_panelMenuListTheme com.lhh.ptrrv.library:panelMenuListTheme}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_panelMenuListWidth com.lhh.ptrrv.library:panelMenuListWidth}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_popupMenuStyle com.lhh.ptrrv.library:popupMenuStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_popupWindowStyle com.lhh.ptrrv.library:popupWindowStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_radioButtonStyle com.lhh.ptrrv.library:radioButtonStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_ratingBarStyle com.lhh.ptrrv.library:ratingBarStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_searchViewStyle com.lhh.ptrrv.library:searchViewStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_selectableItemBackground com.lhh.ptrrv.library:selectableItemBackground}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_selectableItemBackgroundBorderless com.lhh.ptrrv.library:selectableItemBackgroundBorderless}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_spinnerDropDownItemStyle com.lhh.ptrrv.library:spinnerDropDownItemStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_spinnerStyle com.lhh.ptrrv.library:spinnerStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_switchStyle com.lhh.ptrrv.library:switchStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_textAppearanceLargePopupMenu com.lhh.ptrrv.library:textAppearanceLargePopupMenu}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_textAppearanceListItem com.lhh.ptrrv.library:textAppearanceListItem}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_textAppearanceListItemSmall com.lhh.ptrrv.library:textAppearanceListItemSmall}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_textAppearanceSearchResultSubtitle com.lhh.ptrrv.library:textAppearanceSearchResultSubtitle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_textAppearanceSearchResultTitle com.lhh.ptrrv.library:textAppearanceSearchResultTitle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_textAppearanceSmallPopupMenu com.lhh.ptrrv.library:textAppearanceSmallPopupMenu}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_textColorAlertDialogListItem com.lhh.ptrrv.library:textColorAlertDialogListItem}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_textColorSearchUrl com.lhh.ptrrv.library:textColorSearchUrl}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_toolbarNavigationButtonStyle com.lhh.ptrrv.library:toolbarNavigationButtonStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_toolbarStyle com.lhh.ptrrv.library:toolbarStyle}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_windowActionBar com.lhh.ptrrv.library:windowActionBar}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_windowActionBarOverlay com.lhh.ptrrv.library:windowActionBarOverlay}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_windowActionModeOverlay com.lhh.ptrrv.library:windowActionModeOverlay}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_windowFixedHeightMajor com.lhh.ptrrv.library:windowFixedHeightMajor}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_windowFixedHeightMinor com.lhh.ptrrv.library:windowFixedHeightMinor}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_windowFixedWidthMajor com.lhh.ptrrv.library:windowFixedWidthMajor}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_windowFixedWidthMinor com.lhh.ptrrv.library:windowFixedWidthMinor}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_windowMinWidthMajor com.lhh.ptrrv.library:windowMinWidthMajor}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_windowMinWidthMinor com.lhh.ptrrv.library:windowMinWidthMinor}</code></td><td></td></tr>
<tr><td><code>{@link #Theme_windowNoTitle com.lhh.ptrrv.library:windowNoTitle}</code></td><td></td></tr>
</table>
@see #Theme_actionBarDivider
@see #Theme_actionBarItemBackground
@see #Theme_actionBarPopupTheme
@see #Theme_actionBarSize
@see #Theme_actionBarSplitStyle
@see #Theme_actionBarStyle
@see #Theme_actionBarTabBarStyle
@see #Theme_actionBarTabStyle
@see #Theme_actionBarTabTextStyle
@see #Theme_actionBarTheme
@see #Theme_actionBarWidgetTheme
@see #Theme_actionButtonStyle
@see #Theme_actionDropDownStyle
@see #Theme_actionMenuTextAppearance
@see #Theme_actionMenuTextColor
@see #Theme_actionModeBackground
@see #Theme_actionModeCloseButtonStyle
@see #Theme_actionModeCloseDrawable
@see #Theme_actionModeCopyDrawable
@see #Theme_actionModeCutDrawable
@see #Theme_actionModeFindDrawable
@see #Theme_actionModePasteDrawable
@see #Theme_actionModePopupWindowStyle
@see #Theme_actionModeSelectAllDrawable
@see #Theme_actionModeShareDrawable
@see #Theme_actionModeSplitBackground
@see #Theme_actionModeStyle
@see #Theme_actionModeWebSearchDrawable
@see #Theme_actionOverflowButtonStyle
@see #Theme_actionOverflowMenuStyle
@see #Theme_activityChooserViewStyle
@see #Theme_alertDialogButtonGroupStyle
@see #Theme_alertDialogCenterButtons
@see #Theme_alertDialogStyle
@see #Theme_alertDialogTheme
@see #Theme_android_windowAnimationStyle
@see #Theme_android_windowIsFloating
@see #Theme_autoCompleteTextViewStyle
@see #Theme_buttonBarButtonStyle
@see #Theme_buttonBarNegativeButtonStyle
@see #Theme_buttonBarNeutralButtonStyle
@see #Theme_buttonBarPositiveButtonStyle
@see #Theme_buttonBarStyle
@see #Theme_buttonStyle
@see #Theme_buttonStyleSmall
@see #Theme_checkboxStyle
@see #Theme_checkedTextViewStyle
@see #Theme_colorAccent
@see #Theme_colorButtonNormal
@see #Theme_colorControlActivated
@see #Theme_colorControlHighlight
@see #Theme_colorControlNormal
@see #Theme_colorPrimary
@see #Theme_colorPrimaryDark
@see #Theme_colorSwitchThumbNormal
@see #Theme_dialogPreferredPadding
@see #Theme_dialogTheme
@see #Theme_dividerHorizontal
@see #Theme_dividerVertical
@see #Theme_dropDownListViewStyle
@see #Theme_dropdownListPreferredItemHeight
@see #Theme_editTextBackground
@see #Theme_editTextColor
@see #Theme_editTextStyle
@see #Theme_homeAsUpIndicator
@see #Theme_listChoiceBackgroundIndicator
@see #Theme_listDividerAlertDialog
@see #Theme_listPopupWindowStyle
@see #Theme_listPreferredItemHeight
@see #Theme_listPreferredItemHeightLarge
@see #Theme_listPreferredItemHeightSmall
@see #Theme_listPreferredItemPaddingLeft
@see #Theme_listPreferredItemPaddingRight
@see #Theme_panelBackground
@see #Theme_panelMenuListTheme
@see #Theme_panelMenuListWidth
@see #Theme_popupMenuStyle
@see #Theme_popupWindowStyle
@see #Theme_radioButtonStyle
@see #Theme_ratingBarStyle
@see #Theme_searchViewStyle
@see #Theme_selectableItemBackground
@see #Theme_selectableItemBackgroundBorderless
@see #Theme_spinnerDropDownItemStyle
@see #Theme_spinnerStyle
@see #Theme_switchStyle
@see #Theme_textAppearanceLargePopupMenu
@see #Theme_textAppearanceListItem
@see #Theme_textAppearanceListItemSmall
@see #Theme_textAppearanceSearchResultSubtitle
@see #Theme_textAppearanceSearchResultTitle
@see #Theme_textAppearanceSmallPopupMenu
@see #Theme_textColorAlertDialogListItem
@see #Theme_textColorSearchUrl
@see #Theme_toolbarNavigationButtonStyle
@see #Theme_toolbarStyle
@see #Theme_windowActionBar
@see #Theme_windowActionBarOverlay
@see #Theme_windowActionModeOverlay
@see #Theme_windowFixedHeightMajor
@see #Theme_windowFixedHeightMinor
@see #Theme_windowFixedWidthMajor
@see #Theme_windowFixedWidthMinor
@see #Theme_windowMinWidthMajor
@see #Theme_windowMinWidthMinor
@see #Theme_windowNoTitle
*/
public static final int[] Theme = {
0x01010057, 0x010100ae, 0x7f010052, 0x7f010053,
0x7f010054, 0x7f010055, 0x7f010056, 0x7f010057,
0x7f010058, 0x7f010059, 0x7f01005a, 0x7f01005b,
0x7f01005c, 0x7f01005d, 0x7f01005e, 0x7f01005f,
0x7f010060, 0x7f010061, 0x7f010062, 0x7f010063,
0x7f010064, 0x7f010065, 0x7f010066, 0x7f010067,
0x7f010068, 0x7f010069, 0x7f01006a, 0x7f01006b,
0x7f01006c, 0x7f01006d, 0x7f01006e, 0x7f01006f,
0x7f010070, 0x7f010071, 0x7f010072, 0x7f010073,
0x7f010074, 0x7f010075, 0x7f010076, 0x7f010077,
0x7f010078, 0x7f010079, 0x7f01007a, 0x7f01007b,
0x7f01007c, 0x7f01007d, 0x7f01007e, 0x7f01007f,
0x7f010080, 0x7f010081, 0x7f010082, 0x7f010083,
0x7f010084, 0x7f010085, 0x7f010086, 0x7f010087,
0x7f010088, 0x7f010089, 0x7f01008a, 0x7f01008b,
0x7f01008c, 0x7f01008d, 0x7f01008e, 0x7f01008f,
0x7f010090, 0x7f010091, 0x7f010092, 0x7f010093,
0x7f010094, 0x7f010095, 0x7f010096, 0x7f010097,
0x7f010098, 0x7f010099, 0x7f01009a, 0x7f01009b,
0x7f01009c, 0x7f01009d, 0x7f01009e, 0x7f01009f,
0x7f0100a0, 0x7f0100a1, 0x7f0100a2, 0x7f0100a3,
0x7f0100a4, 0x7f0100a5, 0x7f0100a6, 0x7f0100a7,
0x7f0100a8, 0x7f0100a9, 0x7f0100aa, 0x7f0100ab,
0x7f0100ac, 0x7f0100ad, 0x7f0100ae, 0x7f0100af,
0x7f0100b0, 0x7f0100b1, 0x7f0100b2, 0x7f0100b3,
0x7f0100b4, 0x7f0100b5, 0x7f0100b6, 0x7f0100b7,
0x7f0100b8, 0x7f0100b9
};
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarDivider}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionBarDivider
*/
public static int Theme_actionBarDivider = 23;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarItemBackground}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionBarItemBackground
*/
public static int Theme_actionBarItemBackground = 24;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarPopupTheme}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionBarPopupTheme
*/
public static int Theme_actionBarPopupTheme = 17;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarSize}
attribute's value can be found in the {@link #Theme} array.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>May be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>wrap_content</code></td><td>0</td><td></td></tr>
</table>
@attr name com.lhh.ptrrv.library:actionBarSize
*/
public static int Theme_actionBarSize = 22;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarSplitStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionBarSplitStyle
*/
public static int Theme_actionBarSplitStyle = 19;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionBarStyle
*/
public static int Theme_actionBarStyle = 18;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarTabBarStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionBarTabBarStyle
*/
public static int Theme_actionBarTabBarStyle = 13;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarTabStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionBarTabStyle
*/
public static int Theme_actionBarTabStyle = 12;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarTabTextStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionBarTabTextStyle
*/
public static int Theme_actionBarTabTextStyle = 14;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarTheme}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionBarTheme
*/
public static int Theme_actionBarTheme = 20;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionBarWidgetTheme}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionBarWidgetTheme
*/
public static int Theme_actionBarWidgetTheme = 21;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionButtonStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionButtonStyle
*/
public static int Theme_actionButtonStyle = 49;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionDropDownStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionDropDownStyle
*/
public static int Theme_actionDropDownStyle = 45;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionMenuTextAppearance}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionMenuTextAppearance
*/
public static int Theme_actionMenuTextAppearance = 25;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionMenuTextColor}
attribute's value can be found in the {@link #Theme} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
@attr name com.lhh.ptrrv.library:actionMenuTextColor
*/
public static int Theme_actionMenuTextColor = 26;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeBackground}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeBackground
*/
public static int Theme_actionModeBackground = 29;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeCloseButtonStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeCloseButtonStyle
*/
public static int Theme_actionModeCloseButtonStyle = 28;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeCloseDrawable}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeCloseDrawable
*/
public static int Theme_actionModeCloseDrawable = 31;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeCopyDrawable}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeCopyDrawable
*/
public static int Theme_actionModeCopyDrawable = 33;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeCutDrawable}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeCutDrawable
*/
public static int Theme_actionModeCutDrawable = 32;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeFindDrawable}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeFindDrawable
*/
public static int Theme_actionModeFindDrawable = 37;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModePasteDrawable}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModePasteDrawable
*/
public static int Theme_actionModePasteDrawable = 34;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModePopupWindowStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModePopupWindowStyle
*/
public static int Theme_actionModePopupWindowStyle = 39;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeSelectAllDrawable}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeSelectAllDrawable
*/
public static int Theme_actionModeSelectAllDrawable = 35;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeShareDrawable}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeShareDrawable
*/
public static int Theme_actionModeShareDrawable = 36;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeSplitBackground}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeSplitBackground
*/
public static int Theme_actionModeSplitBackground = 30;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeStyle
*/
public static int Theme_actionModeStyle = 27;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionModeWebSearchDrawable}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionModeWebSearchDrawable
*/
public static int Theme_actionModeWebSearchDrawable = 38;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionOverflowButtonStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionOverflowButtonStyle
*/
public static int Theme_actionOverflowButtonStyle = 15;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#actionOverflowMenuStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:actionOverflowMenuStyle
*/
public static int Theme_actionOverflowMenuStyle = 16;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#activityChooserViewStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:activityChooserViewStyle
*/
public static int Theme_activityChooserViewStyle = 56;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#alertDialogButtonGroupStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:alertDialogButtonGroupStyle
*/
public static int Theme_alertDialogButtonGroupStyle = 89;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#alertDialogCenterButtons}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:alertDialogCenterButtons
*/
public static int Theme_alertDialogCenterButtons = 90;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#alertDialogStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:alertDialogStyle
*/
public static int Theme_alertDialogStyle = 88;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#alertDialogTheme}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:alertDialogTheme
*/
public static int Theme_alertDialogTheme = 91;
/**
<p>This symbol is the offset where the {@link android.R.attr#windowAnimationStyle}
attribute's value can be found in the {@link #Theme} array.
@attr name android:windowAnimationStyle
*/
public static int Theme_android_windowAnimationStyle = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#windowIsFloating}
attribute's value can be found in the {@link #Theme} array.
@attr name android:windowIsFloating
*/
public static int Theme_android_windowIsFloating = 0;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#autoCompleteTextViewStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:autoCompleteTextViewStyle
*/
public static int Theme_autoCompleteTextViewStyle = 96;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#buttonBarButtonStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:buttonBarButtonStyle
*/
public static int Theme_buttonBarButtonStyle = 51;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#buttonBarNegativeButtonStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:buttonBarNegativeButtonStyle
*/
public static int Theme_buttonBarNegativeButtonStyle = 94;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#buttonBarNeutralButtonStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:buttonBarNeutralButtonStyle
*/
public static int Theme_buttonBarNeutralButtonStyle = 95;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#buttonBarPositiveButtonStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:buttonBarPositiveButtonStyle
*/
public static int Theme_buttonBarPositiveButtonStyle = 93;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#buttonBarStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:buttonBarStyle
*/
public static int Theme_buttonBarStyle = 50;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#buttonStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:buttonStyle
*/
public static int Theme_buttonStyle = 97;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#buttonStyleSmall}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:buttonStyleSmall
*/
public static int Theme_buttonStyleSmall = 98;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#checkboxStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:checkboxStyle
*/
public static int Theme_checkboxStyle = 99;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#checkedTextViewStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:checkedTextViewStyle
*/
public static int Theme_checkedTextViewStyle = 100;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#colorAccent}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:colorAccent
*/
public static int Theme_colorAccent = 82;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#colorButtonNormal}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:colorButtonNormal
*/
public static int Theme_colorButtonNormal = 86;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#colorControlActivated}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:colorControlActivated
*/
public static int Theme_colorControlActivated = 84;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#colorControlHighlight}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:colorControlHighlight
*/
public static int Theme_colorControlHighlight = 85;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#colorControlNormal}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:colorControlNormal
*/
public static int Theme_colorControlNormal = 83;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#colorPrimary}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:colorPrimary
*/
public static int Theme_colorPrimary = 80;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#colorPrimaryDark}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:colorPrimaryDark
*/
public static int Theme_colorPrimaryDark = 81;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#colorSwitchThumbNormal}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:colorSwitchThumbNormal
*/
public static int Theme_colorSwitchThumbNormal = 87;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#dialogPreferredPadding}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:dialogPreferredPadding
*/
public static int Theme_dialogPreferredPadding = 43;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#dialogTheme}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:dialogTheme
*/
public static int Theme_dialogTheme = 42;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#dividerHorizontal}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:dividerHorizontal
*/
public static int Theme_dividerHorizontal = 55;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#dividerVertical}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:dividerVertical
*/
public static int Theme_dividerVertical = 54;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#dropDownListViewStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:dropDownListViewStyle
*/
public static int Theme_dropDownListViewStyle = 72;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#dropdownListPreferredItemHeight}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:dropdownListPreferredItemHeight
*/
public static int Theme_dropdownListPreferredItemHeight = 46;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#editTextBackground}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:editTextBackground
*/
public static int Theme_editTextBackground = 62;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#editTextColor}
attribute's value can be found in the {@link #Theme} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
@attr name com.lhh.ptrrv.library:editTextColor
*/
public static int Theme_editTextColor = 61;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#editTextStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:editTextStyle
*/
public static int Theme_editTextStyle = 101;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#homeAsUpIndicator}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:homeAsUpIndicator
*/
public static int Theme_homeAsUpIndicator = 48;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#listChoiceBackgroundIndicator}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:listChoiceBackgroundIndicator
*/
public static int Theme_listChoiceBackgroundIndicator = 79;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#listDividerAlertDialog}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:listDividerAlertDialog
*/
public static int Theme_listDividerAlertDialog = 44;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#listPopupWindowStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:listPopupWindowStyle
*/
public static int Theme_listPopupWindowStyle = 73;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#listPreferredItemHeight}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:listPreferredItemHeight
*/
public static int Theme_listPreferredItemHeight = 67;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#listPreferredItemHeightLarge}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:listPreferredItemHeightLarge
*/
public static int Theme_listPreferredItemHeightLarge = 69;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#listPreferredItemHeightSmall}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:listPreferredItemHeightSmall
*/
public static int Theme_listPreferredItemHeightSmall = 68;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#listPreferredItemPaddingLeft}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:listPreferredItemPaddingLeft
*/
public static int Theme_listPreferredItemPaddingLeft = 70;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#listPreferredItemPaddingRight}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:listPreferredItemPaddingRight
*/
public static int Theme_listPreferredItemPaddingRight = 71;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#panelBackground}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:panelBackground
*/
public static int Theme_panelBackground = 76;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#panelMenuListTheme}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:panelMenuListTheme
*/
public static int Theme_panelMenuListTheme = 78;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#panelMenuListWidth}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:panelMenuListWidth
*/
public static int Theme_panelMenuListWidth = 77;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#popupMenuStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:popupMenuStyle
*/
public static int Theme_popupMenuStyle = 59;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#popupWindowStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:popupWindowStyle
*/
public static int Theme_popupWindowStyle = 60;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#radioButtonStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:radioButtonStyle
*/
public static int Theme_radioButtonStyle = 102;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#ratingBarStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:ratingBarStyle
*/
public static int Theme_ratingBarStyle = 103;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#searchViewStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:searchViewStyle
*/
public static int Theme_searchViewStyle = 66;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#selectableItemBackground}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:selectableItemBackground
*/
public static int Theme_selectableItemBackground = 52;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#selectableItemBackgroundBorderless}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:selectableItemBackgroundBorderless
*/
public static int Theme_selectableItemBackgroundBorderless = 53;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#spinnerDropDownItemStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:spinnerDropDownItemStyle
*/
public static int Theme_spinnerDropDownItemStyle = 47;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#spinnerStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:spinnerStyle
*/
public static int Theme_spinnerStyle = 104;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#switchStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:switchStyle
*/
public static int Theme_switchStyle = 105;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#textAppearanceLargePopupMenu}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:textAppearanceLargePopupMenu
*/
public static int Theme_textAppearanceLargePopupMenu = 40;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#textAppearanceListItem}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:textAppearanceListItem
*/
public static int Theme_textAppearanceListItem = 74;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#textAppearanceListItemSmall}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:textAppearanceListItemSmall
*/
public static int Theme_textAppearanceListItemSmall = 75;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#textAppearanceSearchResultSubtitle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:textAppearanceSearchResultSubtitle
*/
public static int Theme_textAppearanceSearchResultSubtitle = 64;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#textAppearanceSearchResultTitle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:textAppearanceSearchResultTitle
*/
public static int Theme_textAppearanceSearchResultTitle = 63;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#textAppearanceSmallPopupMenu}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:textAppearanceSmallPopupMenu
*/
public static int Theme_textAppearanceSmallPopupMenu = 41;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#textColorAlertDialogListItem}
attribute's value can be found in the {@link #Theme} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
@attr name com.lhh.ptrrv.library:textColorAlertDialogListItem
*/
public static int Theme_textColorAlertDialogListItem = 92;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#textColorSearchUrl}
attribute's value can be found in the {@link #Theme} array.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
@attr name com.lhh.ptrrv.library:textColorSearchUrl
*/
public static int Theme_textColorSearchUrl = 65;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#toolbarNavigationButtonStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:toolbarNavigationButtonStyle
*/
public static int Theme_toolbarNavigationButtonStyle = 58;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#toolbarStyle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:toolbarStyle
*/
public static int Theme_toolbarStyle = 57;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#windowActionBar}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:windowActionBar
*/
public static int Theme_windowActionBar = 2;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#windowActionBarOverlay}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:windowActionBarOverlay
*/
public static int Theme_windowActionBarOverlay = 4;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#windowActionModeOverlay}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:windowActionModeOverlay
*/
public static int Theme_windowActionModeOverlay = 5;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#windowFixedHeightMajor}
attribute's value can be found in the {@link #Theme} array.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:windowFixedHeightMajor
*/
public static int Theme_windowFixedHeightMajor = 9;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#windowFixedHeightMinor}
attribute's value can be found in the {@link #Theme} array.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:windowFixedHeightMinor
*/
public static int Theme_windowFixedHeightMinor = 7;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#windowFixedWidthMajor}
attribute's value can be found in the {@link #Theme} array.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:windowFixedWidthMajor
*/
public static int Theme_windowFixedWidthMajor = 6;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#windowFixedWidthMinor}
attribute's value can be found in the {@link #Theme} array.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:windowFixedWidthMinor
*/
public static int Theme_windowFixedWidthMinor = 8;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#windowMinWidthMajor}
attribute's value can be found in the {@link #Theme} array.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:windowMinWidthMajor
*/
public static int Theme_windowMinWidthMajor = 10;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#windowMinWidthMinor}
attribute's value can be found in the {@link #Theme} array.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:windowMinWidthMinor
*/
public static int Theme_windowMinWidthMinor = 11;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#windowNoTitle}
attribute's value can be found in the {@link #Theme} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:windowNoTitle
*/
public static int Theme_windowNoTitle = 3;
/** Attributes that can be used with a Toolbar.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #Toolbar_android_gravity android:gravity}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_android_minHeight android:minHeight}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_collapseContentDescription com.lhh.ptrrv.library:collapseContentDescription}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_collapseIcon com.lhh.ptrrv.library:collapseIcon}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_contentInsetEnd com.lhh.ptrrv.library:contentInsetEnd}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_contentInsetLeft com.lhh.ptrrv.library:contentInsetLeft}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_contentInsetRight com.lhh.ptrrv.library:contentInsetRight}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_contentInsetStart com.lhh.ptrrv.library:contentInsetStart}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_maxButtonHeight com.lhh.ptrrv.library:maxButtonHeight}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_navigationContentDescription com.lhh.ptrrv.library:navigationContentDescription}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_navigationIcon com.lhh.ptrrv.library:navigationIcon}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_popupTheme com.lhh.ptrrv.library:popupTheme}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_subtitle com.lhh.ptrrv.library:subtitle}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_subtitleTextAppearance com.lhh.ptrrv.library:subtitleTextAppearance}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_title com.lhh.ptrrv.library:title}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_titleMarginBottom com.lhh.ptrrv.library:titleMarginBottom}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_titleMarginEnd com.lhh.ptrrv.library:titleMarginEnd}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_titleMarginStart com.lhh.ptrrv.library:titleMarginStart}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_titleMarginTop com.lhh.ptrrv.library:titleMarginTop}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_titleMargins com.lhh.ptrrv.library:titleMargins}</code></td><td></td></tr>
<tr><td><code>{@link #Toolbar_titleTextAppearance com.lhh.ptrrv.library:titleTextAppearance}</code></td><td></td></tr>
</table>
@see #Toolbar_android_gravity
@see #Toolbar_android_minHeight
@see #Toolbar_collapseContentDescription
@see #Toolbar_collapseIcon
@see #Toolbar_contentInsetEnd
@see #Toolbar_contentInsetLeft
@see #Toolbar_contentInsetRight
@see #Toolbar_contentInsetStart
@see #Toolbar_maxButtonHeight
@see #Toolbar_navigationContentDescription
@see #Toolbar_navigationIcon
@see #Toolbar_popupTheme
@see #Toolbar_subtitle
@see #Toolbar_subtitleTextAppearance
@see #Toolbar_title
@see #Toolbar_titleMarginBottom
@see #Toolbar_titleMarginEnd
@see #Toolbar_titleMarginStart
@see #Toolbar_titleMarginTop
@see #Toolbar_titleMargins
@see #Toolbar_titleTextAppearance
*/
public static final int[] Toolbar = {
0x010100af, 0x01010140, 0x7f010003, 0x7f010006,
0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019,
0x7f01001b, 0x7f0100ba, 0x7f0100bb, 0x7f0100bc,
0x7f0100bd, 0x7f0100be, 0x7f0100bf, 0x7f0100c0,
0x7f0100c1, 0x7f0100c2, 0x7f0100c3, 0x7f0100c4,
0x7f0100c5
};
/**
<p>This symbol is the offset where the {@link android.R.attr#gravity}
attribute's value can be found in the {@link #Toolbar} array.
@attr name android:gravity
*/
public static int Toolbar_android_gravity = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#minHeight}
attribute's value can be found in the {@link #Toolbar} array.
@attr name android:minHeight
*/
public static int Toolbar_android_minHeight = 1;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#collapseContentDescription}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:collapseContentDescription
*/
public static int Toolbar_collapseContentDescription = 18;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#collapseIcon}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:collapseIcon
*/
public static int Toolbar_collapseIcon = 17;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#contentInsetEnd}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:contentInsetEnd
*/
public static int Toolbar_contentInsetEnd = 5;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#contentInsetLeft}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:contentInsetLeft
*/
public static int Toolbar_contentInsetLeft = 6;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#contentInsetRight}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:contentInsetRight
*/
public static int Toolbar_contentInsetRight = 7;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#contentInsetStart}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:contentInsetStart
*/
public static int Toolbar_contentInsetStart = 4;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#maxButtonHeight}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:maxButtonHeight
*/
public static int Toolbar_maxButtonHeight = 16;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#navigationContentDescription}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:navigationContentDescription
*/
public static int Toolbar_navigationContentDescription = 20;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#navigationIcon}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:navigationIcon
*/
public static int Toolbar_navigationIcon = 19;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#popupTheme}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:popupTheme
*/
public static int Toolbar_popupTheme = 8;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#subtitle}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:subtitle
*/
public static int Toolbar_subtitle = 3;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#subtitleTextAppearance}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:subtitleTextAppearance
*/
public static int Toolbar_subtitleTextAppearance = 10;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#title}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:title
*/
public static int Toolbar_title = 2;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#titleMarginBottom}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:titleMarginBottom
*/
public static int Toolbar_titleMarginBottom = 15;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#titleMarginEnd}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:titleMarginEnd
*/
public static int Toolbar_titleMarginEnd = 13;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#titleMarginStart}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:titleMarginStart
*/
public static int Toolbar_titleMarginStart = 12;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#titleMarginTop}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:titleMarginTop
*/
public static int Toolbar_titleMarginTop = 14;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#titleMargins}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:titleMargins
*/
public static int Toolbar_titleMargins = 11;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#titleTextAppearance}
attribute's value can be found in the {@link #Toolbar} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:titleTextAppearance
*/
public static int Toolbar_titleTextAppearance = 9;
/** Attributes that can be used with a View.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td></td></tr>
<tr><td><code>{@link #View_android_theme android:theme}</code></td><td></td></tr>
<tr><td><code>{@link #View_backgroundTint com.lhh.ptrrv.library:backgroundTint}</code></td><td></td></tr>
<tr><td><code>{@link #View_backgroundTintMode com.lhh.ptrrv.library:backgroundTintMode}</code></td><td></td></tr>
<tr><td><code>{@link #View_paddingEnd com.lhh.ptrrv.library:paddingEnd}</code></td><td></td></tr>
<tr><td><code>{@link #View_paddingStart com.lhh.ptrrv.library:paddingStart}</code></td><td></td></tr>
<tr><td><code>{@link #View_theme com.lhh.ptrrv.library:theme}</code></td><td></td></tr>
</table>
@see #View_android_focusable
@see #View_android_theme
@see #View_backgroundTint
@see #View_backgroundTintMode
@see #View_paddingEnd
@see #View_paddingStart
@see #View_theme
*/
public static final int[] View = {
0x01010000, 0x010100da, 0x7f0100c6, 0x7f0100c7,
0x7f0100c8, 0x7f0100c9, 0x7f0100ca
};
/**
<p>This symbol is the offset where the {@link android.R.attr#focusable}
attribute's value can be found in the {@link #View} array.
@attr name android:focusable
*/
public static int View_android_focusable = 1;
/**
<p>This symbol is the offset where the {@link android.R.attr#theme}
attribute's value can be found in the {@link #View} array.
@attr name android:theme
*/
public static int View_android_theme = 0;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#backgroundTint}
attribute's value can be found in the {@link #View} array.
<p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:backgroundTint
*/
public static int View_backgroundTint = 5;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#backgroundTintMode}
attribute's value can be found in the {@link #View} array.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>src_over</code></td><td>3</td><td></td></tr>
<tr><td><code>src_in</code></td><td>5</td><td></td></tr>
<tr><td><code>src_atop</code></td><td>9</td><td></td></tr>
<tr><td><code>multiply</code></td><td>14</td><td></td></tr>
<tr><td><code>screen</code></td><td>15</td><td></td></tr>
</table>
@attr name com.lhh.ptrrv.library:backgroundTintMode
*/
public static int View_backgroundTintMode = 6;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#paddingEnd}
attribute's value can be found in the {@link #View} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:paddingEnd
*/
public static int View_paddingEnd = 3;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#paddingStart}
attribute's value can be found in the {@link #View} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.lhh.ptrrv.library:paddingStart
*/
public static int View_paddingStart = 2;
/**
<p>This symbol is the offset where the {@link com.lhh.ptrrv.library.R.attr#theme}
attribute's value can be found in the {@link #View} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name com.lhh.ptrrv.library:theme
*/
public static int View_theme = 4;
/** Attributes that can be used with a ViewStubCompat.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ViewStubCompat_android_id android:id}</code></td><td></td></tr>
<tr><td><code>{@link #ViewStubCompat_android_inflatedId android:inflatedId}</code></td><td></td></tr>
<tr><td><code>{@link #ViewStubCompat_android_layout android:layout}</code></td><td></td></tr>
</table>
@see #ViewStubCompat_android_id
@see #ViewStubCompat_android_inflatedId
@see #ViewStubCompat_android_layout
*/
public static final int[] ViewStubCompat = {
0x010100d0, 0x010100f2, 0x010100f3
};
/**
<p>This symbol is the offset where the {@link android.R.attr#id}
attribute's value can be found in the {@link #ViewStubCompat} array.
@attr name android:id
*/
public static int ViewStubCompat_android_id = 0;
/**
<p>This symbol is the offset where the {@link android.R.attr#inflatedId}
attribute's value can be found in the {@link #ViewStubCompat} array.
@attr name android:inflatedId
*/
public static int ViewStubCompat_android_inflatedId = 2;
/**
<p>This symbol is the offset where the {@link android.R.attr#layout}
attribute's value can be found in the {@link #ViewStubCompat} array.
@attr name android:layout
*/
public static int ViewStubCompat_android_layout = 1;
};
}
|
3e00bb9cba12a9632e1a89ac4e97c7ef11da3ad3 | 3,758 | java | Java | src/main/java/cf/brforgers/bot/Bot.java | BRForgers/TheForge | 1a2034778f75638cd9a0077b81ab689f47b37423 | [
"MIT"
] | null | null | null | src/main/java/cf/brforgers/bot/Bot.java | BRForgers/TheForge | 1a2034778f75638cd9a0077b81ab689f47b37423 | [
"MIT"
] | null | null | null | src/main/java/cf/brforgers/bot/Bot.java | BRForgers/TheForge | 1a2034778f75638cd9a0077b81ab689f47b37423 | [
"MIT"
] | null | null | null | 30.803279 | 123 | 0.69372 | 296 | /*
* This class was created by <AdrianTodt>. It's distributed as
* part of the DavidBot. Get the Source Code in github:
* https://github.com/adriantodt/David
*
* DavidBot is Open Source and distributed under the
* GNU Lesser General Public License v2.1:
* https://github.com/adriantodt/David/blob/master/LICENSE
*
* File Created @ [22/09/16 18:35]
*/
package cf.brforgers.bot;
import cf.brforgers.bot.data.BotData;
import cf.brforgers.bot.data.Configs;
import cf.brforgers.bot.handlers.BotGreeter;
import cf.brforgers.bot.handlers.BotIntercommns;
import cf.brforgers.bot.handlers.ReadyBuilder;
import cf.brforgers.bot.handlers.SimpleCommandHandler;
import cf.brforgers.bot.utils.Statistics;
import cf.brforgers.bot.utils.Tasks;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import net.dv8tion.jda.JDA;
import net.dv8tion.jda.JDABuilder;
import net.dv8tion.jda.entities.Guild;
import net.dv8tion.jda.entities.User;
import net.dv8tion.jda.hooks.AnnotatedEventManager;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class Bot {
public static final Gson JSON = new GsonBuilder().setPrettyPrinting().create();
public static Logger LOGGER = LogManager.getLogger("Bot");
public static JDA API = null;
public static User SELF = null;
public static Guild GUILD = null;
public static boolean LOADED = false;
public static List<Runnable> onLoaded = new ArrayList<>();
static {
onLoaded.add(() -> {
User user = API.getUserById(Configs.get().ownerID);
if (user == null) {
LOGGER.warn("Owner not regognized. This WILL cause issues (specially PermSystem)");
} else {
LOGGER.info("Owner recognized: " + user.getUsername() + "#" + user.getDiscriminator() + " (ID: " + user.getId() + ")");
}
});
onLoaded.add(() -> {
final int[] i = {0};
API.getGuilds().stream().filter(guild -> !guild.getId().equals(Configs.get().guildID)).forEach(guild -> {
guild.getManager().leave();
i[0]++;
});
if (i[0] != 0) {
LOGGER.warn("Quitted from " + i[0] + " guilds.");
}
GUILD = API.getGuildById(Configs.get().guildID);
BotData.get().validateAll();
BotData.get().save();
});
}
public static void init() throws Exception {
Tasks.startAsyncTasks();
new JDABuilder()
.setBotToken(Configs.get().token)
.setBulkDeleteSplittingEnabled(false)
.setAudioEnabled(false)
.setEventManager(new AnnotatedEventManager())
.addListener(
//In order:
// ReadyBuilder (Unregisters itself after);
// Commands -> BotIntercommns -> BotGreeter -> Guilds
new ReadyBuilder()
.add(event -> API = event.getJDA())
.add(event -> SELF = event.getJDA().getSelfInfo())
.add(event -> event.getJDA().getAccountManager().setGame("made of stone"))
.add(event -> SimpleCommandHandler.init())
.add(event -> Statistics.startDate = new Date()),
SimpleCommandHandler.class, BotIntercommns.class, BotGreeter.class
).buildBlocking();
LOADED = true;
onLoaded.forEach(Runnable::run);
onLoaded = null;
LOGGER = LogManager.getLogger(SELF.getUsername());
LOGGER.info("Bot: " + SELF.getUsername() + " (#" + SELF.getId() + ")");
BotIntercommns.init();
}
public static void stopBot() {
API.getAccountManager().setIdle(true);
API.getAccountManager().update();
LOGGER.info("Bot exiting...");
try {
Thread.sleep(2 * 1000);
} catch (Exception ignored) {
}
Java.stopApp();
}
public static void restartBot() {
API.getAccountManager().setIdle(true);
API.getAccountManager().update();
LOGGER.info("Bot restarting...");
try {
Thread.sleep(2 * 1000);
} catch (Exception ignored) {
}
Java.restartApp();
}
}
|
3e00bba7c17ebff24e8c24ba5dbeaa5415bb2c13 | 1,917 | java | Java | src/PostfixToTree.java | ZhenyueChin/Programmable-Spreadsheet-Application | dded442a432014e3f6b76b2b42e1c4a2a8bfdcb2 | [
"CC-BY-4.0"
] | null | null | null | src/PostfixToTree.java | ZhenyueChin/Programmable-Spreadsheet-Application | dded442a432014e3f6b76b2b42e1c4a2a8bfdcb2 | [
"CC-BY-4.0"
] | null | null | null | src/PostfixToTree.java | ZhenyueChin/Programmable-Spreadsheet-Application | dded442a432014e3f6b76b2b42e1c4a2a8bfdcb2 | [
"CC-BY-4.0"
] | null | null | null | 25.905405 | 103 | 0.685446 | 297 | /*
SpreadSheet - a simple spreadsheet application.
Copyright (C) 2015 Eric McCreath and Zhenyue Qin, the Australian National University
This program is free software: you can redistribute it and/or modify it
under the terms of the Creative Commons Attribution 4.0 International License
*/
/**
* Parse a postfix to a tree
* @author Zhenyue Qin, u5505995
*
*/
/*
* Basic ideas:
* Push the numbers to the stack and when come across operators,
* pop the top two numbers and the second (do) the first
*/
import java.util.LinkedList;
public class PostfixToTree {
LinkedList<String> tempPostfix = new LinkedList<String>();
LinkedList<String> postfix = new LinkedList<String>();
LinkedList<ExpressionTree> tree = new LinkedList<ExpressionTree>();
ExpressionTree finalTree;
public PostfixToTree(LinkedList<String> aPostfix) {
this.tempPostfix = aPostfix;
for (int i=0; i<tempPostfix.size(); i++) {
if (GeneralMethods.isOperator(tempPostfix.get(i)) || GeneralMethods.isNumeric(tempPostfix.get(i))) {
this.postfix.add(tempPostfix.get(i));
}
}
}
public void insert() {
System.out.println("post: " + postfix);
while (!postfix.isEmpty()) {
if (!GeneralMethods.isOperator(postfix.getFirst())) {
if (GeneralMethods.isNumeric(postfix.getFirst())) {
ExpressionTree tmpNumber = new ExpressionTree(false);
tmpNumber.setNumber(Double.parseDouble(postfix.pop()));
tree.push(tmpNumber);
}
}
else {
try {
ExpressionTree right = tree.pop();
ExpressionTree left = tree.pop();
ExpressionTree node = new ExpressionTree(true);
node.setOperator(postfix.pop());
node.setLeft(left);
node.setRight(right);
tree.push(node);
} catch (Exception e) {
GeneralMethods.parseErrorDialogue(postfix.pop());
throw new RuntimeException("Here");
}
}
}
finalTree = tree.getFirst();
}
}
|
3e00bbb721ad938b4be83f8537964193d012fef2 | 2,472 | java | Java | util/mtwilson-util-crypto/src/test/java/com/intel/dcsg/cpg/x509/KeystoreCertificateRepositoryTest.java | intel-secl/common_java | 79628eba5cca696b06636f78561dd29ef57e2bbb | [
"BSD-3-Clause"
] | 2 | 2021-12-30T05:58:33.000Z | 2022-03-05T03:31:34.000Z | util/mtwilson-util-crypto/src/test/java/com/intel/dcsg/cpg/x509/KeystoreCertificateRepositoryTest.java | intel-secl/common_java | 79628eba5cca696b06636f78561dd29ef57e2bbb | [
"BSD-3-Clause"
] | null | null | null | util/mtwilson-util-crypto/src/test/java/com/intel/dcsg/cpg/x509/KeystoreCertificateRepositoryTest.java | intel-secl/common_java | 79628eba5cca696b06636f78561dd29ef57e2bbb | [
"BSD-3-Clause"
] | null | null | null | 44.945455 | 163 | 0.733819 | 298 | /*
* Copyright (C) 2019 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
package com.intel.dcsg.cpg.x509;
import com.intel.dcsg.cpg.crypto.RsaUtil;
import com.intel.dcsg.cpg.x509.repository.KeystoreCertificateRepository;
import java.io.IOException;
import java.security.KeyManagementException;
import java.security.KeyPair;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.List;
import org.junit.Test;
/**
*
* @author jbuhacoff
*/
public class KeystoreCertificateRepositoryTest {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(KeystoreCertificateRepositoryTest.class);
@Test
public void testKeystoreCertificateRepository() throws KeyStoreException, NoSuchAlgorithmException, IOException, CertificateException, KeyManagementException {
String password = "password";
KeyPair key1 = RsaUtil.generateRsaKeyPair(1024);
X509Certificate certificate1 = X509Builder.factory().selfSigned("CN=tes1t", key1).build();
KeyPair key2 = RsaUtil.generateRsaKeyPair(1024);
X509Certificate certificate2 = X509Builder.factory().selfSigned("CN=test2", key2).build();
// create a new keystore
KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType()); // throws KeyStoreException
keystore.load(null, password.toCharArray());
keystore.setCertificateEntry("test1", certificate1);
// create a certificate repository
KeystoreCertificateRepository repository = new KeystoreCertificateRepository(keystore, password);
List<X509Certificate> list1 = repository.getCertificates();
log.debug("There are {} certificates in the keystore certificate repository", list1.size());
for(X509Certificate item : list1) {
log.debug("Certificate: {}", item.getSubjectX500Principal().getName());
}
// add the second key using the repository interface
repository.addCertificate(certificate2);
List<X509Certificate> list2 = repository.getCertificates();
log.debug("There are {} certificates in the keystore certificate repository", list2.size());
for(X509Certificate item : list2) {
log.debug("Certificate: {}", item.getSubjectX500Principal().getName());
}
}
}
|
3e00bc49165e9823f775c58dfa62bb4ebf9439f5 | 351 | java | Java | mobile_app1/module1170/src/main/java/module1170packageJava0/Foo72.java | HiWong/android-build-eval | d909ab37bc8d5d3a188ba9c9f0855f846f6f3af6 | [
"Apache-2.0"
] | 70 | 2021-01-22T16:48:06.000Z | 2022-02-16T10:37:33.000Z | mobile_app1/module1170/src/main/java/module1170packageJava0/Foo72.java | HiWong/android-build-eval | d909ab37bc8d5d3a188ba9c9f0855f846f6f3af6 | [
"Apache-2.0"
] | 16 | 2021-01-22T20:52:52.000Z | 2021-08-09T17:51:24.000Z | mobile_app1/module1170/src/main/java/module1170packageJava0/Foo72.java | HiWong/android-build-eval | d909ab37bc8d5d3a188ba9c9f0855f846f6f3af6 | [
"Apache-2.0"
] | 5 | 2021-01-26T13:53:49.000Z | 2021-08-11T20:10:57.000Z | 11.7 | 46 | 0.592593 | 299 | package module1170packageJava0;
import java.lang.Integer;
public class Foo72 {
Integer int0;
Integer int1;
public void foo0() {
new module1170packageJava0.Foo71().foo4();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
}
|
3e00bcc9023c80344720eb08321c60566e4e7f60 | 21,482 | java | Java | library/core/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java | tommy071/exoplayer-amazon-port | 949d0e3f8a52f69c95930f30aaaf545f4f200312 | [
"Apache-2.0"
] | 1 | 2018-11-02T06:42:11.000Z | 2018-11-02T06:42:11.000Z | library/core/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java | tommy071/exoplayer-amazon-port | 949d0e3f8a52f69c95930f30aaaf545f4f200312 | [
"Apache-2.0"
] | null | null | null | library/core/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java | tommy071/exoplayer-amazon-port | 949d0e3f8a52f69c95930f30aaaf545f4f200312 | [
"Apache-2.0"
] | null | null | null | 37.230503 | 100 | 0.609068 | 300 | /*
* Copyright (C) 2016 The Android Open Source Project
*
* 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.google.android.exoplayer2.audio;
import android.support.annotation.IntDef;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.audio.Ac3Util.SyncFrameInfo.StreamType;
import com.google.android.exoplayer2.drm.DrmInitData;
import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.ParsableBitArray;
import com.google.android.exoplayer2.util.ParsableByteArray;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.nio.ByteBuffer;
/**
* Utility methods for parsing Dolby TrueHD and (E-)AC-3 syncframes. (E-)AC-3 parsing follows the
* definition in ETSI TS 102 366 V1.2.1.
*/
public final class Ac3Util {
/** Holds sample format information as presented by a syncframe header. */
public static final class SyncFrameInfo {
/**
* AC3 stream types. See also ETSI TS 102 366 E.1.3.1.1. One of {@link #STREAM_TYPE_UNDEFINED},
* {@link #STREAM_TYPE_TYPE0}, {@link #STREAM_TYPE_TYPE1} or {@link #STREAM_TYPE_TYPE2}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({STREAM_TYPE_UNDEFINED, STREAM_TYPE_TYPE0, STREAM_TYPE_TYPE1, STREAM_TYPE_TYPE2})
public @interface StreamType {}
/** Undefined AC3 stream type. */
public static final int STREAM_TYPE_UNDEFINED = -1;
/** Type 0 AC3 stream type. */
public static final int STREAM_TYPE_TYPE0 = 0;
/** Type 1 AC3 stream type. */
public static final int STREAM_TYPE_TYPE1 = 1;
/** Type 2 AC3 stream type. */
public static final int STREAM_TYPE_TYPE2 = 2;
/**
* The sample mime type of the bitstream. One of {@link MimeTypes#AUDIO_AC3} and
* {@link MimeTypes#AUDIO_E_AC3}.
*/
public final String mimeType;
/**
* The type of the stream if {@link #mimeType} is {@link MimeTypes#AUDIO_E_AC3}, or {@link
* #STREAM_TYPE_UNDEFINED} otherwise.
*/
public final @StreamType int streamType;
/**
* The audio sampling rate in Hz.
*/
public final int sampleRate;
/**
* The number of audio channels
*/
public final int channelCount;
/**
* The size of the frame.
*/
public final int frameSize;
/**
* Number of audio samples in the frame.
*/
public final int sampleCount;
private SyncFrameInfo(
String mimeType,
@StreamType int streamType,
int channelCount,
int sampleRate,
int frameSize,
int sampleCount) {
this.mimeType = mimeType;
this.streamType = streamType;
this.channelCount = channelCount;
this.sampleRate = sampleRate;
this.frameSize = frameSize;
this.sampleCount = sampleCount;
}
}
/**
* The number of samples to store in each output chunk when rechunking TrueHD streams. The number
* of samples extracted from the container corresponding to one syncframe must be an integer
* multiple of this value.
*/
public static final int TRUEHD_RECHUNK_SAMPLE_COUNT = 16;
/**
* The number of bytes that must be parsed from a TrueHD syncframe to calculate the sample count.
*/
public static final int TRUEHD_SYNCFRAME_PREFIX_LENGTH = 10;
/**
* The number of new samples per (E-)AC-3 audio block.
*/
private static final int AUDIO_SAMPLES_PER_AUDIO_BLOCK = 256;
/**
* Each syncframe has 6 blocks that provide 256 new audio samples. See ETSI TS 102 366 4.1.
*/
private static final int AC3_SYNCFRAME_AUDIO_SAMPLE_COUNT = 6 * AUDIO_SAMPLES_PER_AUDIO_BLOCK;
/**
* Number of audio blocks per E-AC-3 syncframe, indexed by numblkscod.
*/
private static final int[] BLOCKS_PER_SYNCFRAME_BY_NUMBLKSCOD = new int[] {1, 2, 3, 6};
/**
* Sample rates, indexed by fscod.
*/
private static final int[] SAMPLE_RATE_BY_FSCOD = new int[] {48000, 44100, 32000};
/**
* Sample rates, indexed by fscod2 (E-AC-3).
*/
private static final int[] SAMPLE_RATE_BY_FSCOD2 = new int[] {24000, 22050, 16000};
/**
* Channel counts, indexed by acmod.
*/
private static final int[] CHANNEL_COUNT_BY_ACMOD = new int[] {2, 1, 2, 3, 3, 4, 4, 5};
/**
* Nominal bitrates in kbps, indexed by frmsizecod / 2. (See ETSI TS 102 366 table 4.13.)
*/
private static final int[] BITRATE_BY_HALF_FRMSIZECOD = new int[] {32, 40, 48, 56, 64, 80, 96,
112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640};
/**
* 16-bit words per syncframe, indexed by frmsizecod / 2. (See ETSI TS 102 366 table 4.13.)
*/
private static final int[] SYNCFRAME_SIZE_WORDS_BY_HALF_FRMSIZECOD_44_1 = new int[] {69, 87, 104,
121, 139, 174, 208, 243, 278, 348, 417, 487, 557, 696, 835, 975, 1114, 1253, 1393};
/**
* Returns the AC-3 format given {@code data} containing the AC3SpecificBox according to ETSI TS
* 102 366 Annex F. The reading position of {@code data} will be modified.
*
* @param data The AC3SpecificBox to parse.
* @param trackId The track identifier to set on the format.
* @param language The language to set on the format.
* @param drmInitData {@link DrmInitData} to be included in the format.
* @return The AC-3 format parsed from data in the header.
*/
public static Format parseAc3AnnexFFormat(
ParsableByteArray data, String trackId, String language, DrmInitData drmInitData) {
int fscod = (data.readUnsignedByte() & 0xC0) >> 6;
int sampleRate = SAMPLE_RATE_BY_FSCOD[fscod];
int nextByte = data.readUnsignedByte();
int channelCount = CHANNEL_COUNT_BY_ACMOD[(nextByte & 0x38) >> 3];
if ((nextByte & 0x04) != 0) { // lfeon
channelCount++;
}
return Format.createAudioSampleFormat(
trackId,
MimeTypes.AUDIO_AC3,
/* codecs= */ null,
Format.NO_VALUE,
Format.NO_VALUE,
channelCount,
sampleRate,
/* initializationData= */ null,
drmInitData,
/* selectionFlags= */ 0,
language);
}
/**
* Returns the E-AC-3 format given {@code data} containing the EC3SpecificBox according to ETSI TS
* 102 366 Annex F. The reading position of {@code data} will be modified.
*
* @param data The EC3SpecificBox to parse.
* @param trackId The track identifier to set on the format.
* @param language The language to set on the format.
* @param drmInitData {@link DrmInitData} to be included in the format.
* @return The E-AC-3 format parsed from data in the header.
*/
public static Format parseEAc3AnnexFFormat(
ParsableByteArray data, String trackId, String language, DrmInitData drmInitData) {
data.skipBytes(2); // data_rate, num_ind_sub
// Read the first independent substream.
int fscod = (data.readUnsignedByte() & 0xC0) >> 6;
int sampleRate = SAMPLE_RATE_BY_FSCOD[fscod];
int nextByte = data.readUnsignedByte();
int channelCount = CHANNEL_COUNT_BY_ACMOD[(nextByte & 0x0E) >> 1];
if ((nextByte & 0x01) != 0) { // lfeon
channelCount++;
}
// Read the first dependent substream.
nextByte = data.readUnsignedByte();
int numDepSub = ((nextByte & 0x1E) >> 1);
if (numDepSub > 0) {
int lowByteChanLoc = data.readUnsignedByte();
// Read Lrs/Rrs pair
// TODO: Read other channel configuration
if ((lowByteChanLoc & 0x02) != 0) {
channelCount += 2;
}
}
String mimeType = MimeTypes.AUDIO_E_AC3;
if (data.bytesLeft() > 0) {
nextByte = data.readUnsignedByte();
if ((nextByte & 0x01) != 0) { // flag_ec3_extension_type_a
mimeType = MimeTypes.AUDIO_E_AC3_JOC;
}
}
return Format.createAudioSampleFormat(
trackId,
mimeType,
/* codecs= */ null,
Format.NO_VALUE,
Format.NO_VALUE,
channelCount,
sampleRate,
/* initializationData= */ null,
drmInitData,
/* selectionFlags= */ 0,
language);
}
/**
* Returns (E-)AC-3 format information given {@code data} containing a syncframe. The reading
* position of {@code data} will be modified.
*
* @param data The data to parse, positioned at the start of the syncframe.
* @return The (E-)AC-3 format data parsed from the header.
*/
public static SyncFrameInfo parseAc3SyncframeInfo(ParsableBitArray data) {
int initialPosition = data.getPosition();
data.skipBits(40);
boolean isEac3 = data.readBits(5) == 16; // See bsid in subsection E.1.3.1.6.
data.setPosition(initialPosition);
String mimeType;
@StreamType int streamType = SyncFrameInfo.STREAM_TYPE_UNDEFINED;
int sampleRate;
int acmod;
int frameSize;
int sampleCount;
boolean lfeon;
int channelCount;
if (isEac3) {
// Syntax from ETSI TS 102 366 V1.2.1 subsections E.1.2.1 and E.1.2.2.
data.skipBits(16); // syncword
switch (data.readBits(2)) { // strmtyp
case 0:
streamType = SyncFrameInfo.STREAM_TYPE_TYPE0;
break;
case 1:
streamType = SyncFrameInfo.STREAM_TYPE_TYPE1;
break;
case 2:
streamType = SyncFrameInfo.STREAM_TYPE_TYPE2;
break;
default:
streamType = SyncFrameInfo.STREAM_TYPE_UNDEFINED;
break;
}
data.skipBits(3); // substreamid
frameSize = (data.readBits(11) + 1) * 2; // See frmsiz in subsection E.1.3.1.3.
int fscod = data.readBits(2);
int audioBlocks;
int numblkscod;
if (fscod == 3) {
numblkscod = 3;
sampleRate = SAMPLE_RATE_BY_FSCOD2[data.readBits(2)];
audioBlocks = 6;
} else {
numblkscod = data.readBits(2);
audioBlocks = BLOCKS_PER_SYNCFRAME_BY_NUMBLKSCOD[numblkscod];
sampleRate = SAMPLE_RATE_BY_FSCOD[fscod];
}
sampleCount = AUDIO_SAMPLES_PER_AUDIO_BLOCK * audioBlocks;
acmod = data.readBits(3);
lfeon = data.readBit();
channelCount = CHANNEL_COUNT_BY_ACMOD[acmod] + (lfeon ? 1 : 0);
data.skipBits(5 + 5); // bsid, dialnorm
if (data.readBit()) { // compre
data.skipBits(8); // compr
}
if (acmod == 0) {
data.skipBits(5); // dialnorm2
if (data.readBit()) { // compr2e
data.skipBits(8); // compr2
}
}
if (streamType == SyncFrameInfo.STREAM_TYPE_TYPE1 && data.readBit()) { // chanmape
data.skipBits(16); // chanmap
}
if (data.readBit()) { // mixmdate
if (acmod > 2) {
data.skipBits(2); // dmixmod
}
if ((acmod & 0x01) != 0 && acmod > 2) {
data.skipBits(3 + 3); // ltrtcmixlev, lorocmixlev
}
if ((acmod & 0x04) != 0) {
data.skipBits(6); // ltrtsurmixlev, lorosurmixlev
}
if (lfeon && data.readBit()) { // lfemixlevcode
data.skipBits(5); // lfemixlevcod
}
if (streamType == SyncFrameInfo.STREAM_TYPE_TYPE0) {
if (data.readBit()) { // pgmscle
data.skipBits(6); //pgmscl
}
if (acmod == 0 && data.readBit()) { // pgmscl2e
data.skipBits(6); // pgmscl2
}
if (data.readBit()) { // extpgmscle
data.skipBits(6); // extpgmscl
}
int mixdef = data.readBits(2);
if (mixdef == 1) {
data.skipBits(1 + 1 + 3); // premixcmpsel, drcsrc, premixcmpscl
} else if (mixdef == 2) {
data.skipBits(12); // mixdata
} else if (mixdef == 3) {
int mixdeflen = data.readBits(5);
if (data.readBit()) { // mixdata2e
data.skipBits(1 + 1 + 3); // premixcmpsel, drcsrc, premixcmpscl
if (data.readBit()) { // extpgmlscle
data.skipBits(4); // extpgmlscl
}
if (data.readBit()) { // extpgmcscle
data.skipBits(4); // extpgmcscl
}
if (data.readBit()) { // extpgmrscle
data.skipBits(4); // extpgmrscl
}
if (data.readBit()) { // extpgmlsscle
data.skipBits(4); // extpgmlsscl
}
if (data.readBit()) { // extpgmrsscle
data.skipBits(4); // extpgmrsscl
}
if (data.readBit()) { // extpgmlfescle
data.skipBits(4); // extpgmlfescl
}
if (data.readBit()) { // dmixscle
data.skipBits(4); // dmixscl
}
if (data.readBit()) { // addche
if (data.readBit()) { // extpgmaux1scle
data.skipBits(4); // extpgmaux1scl
}
if (data.readBit()) { // extpgmaux2scle
data.skipBits(4); // extpgmaux2scl
}
}
}
if (data.readBit()) { // mixdata3e
data.skipBits(5); // spchdat
if (data.readBit()) { // addspchdate
data.skipBits(5 + 2); // spchdat1, spchan1att
if (data.readBit()) { // addspdat1e
data.skipBits(5 + 3); // spchdat2, spchan2att
}
}
}
data.skipBits(8 * (mixdeflen + 2)); // mixdata
data.byteAlign(); // mixdatafill
}
if (acmod < 2) {
if (data.readBit()) { // paninfoe
data.skipBits(8 + 6); // panmean, paninfo
}
if (acmod == 0) {
if (data.readBit()) { // paninfo2e
data.skipBits(8 + 6); // panmean2, paninfo2
}
}
}
if (data.readBit()) { // frmmixcfginfoe
if (numblkscod == 0) {
data.skipBits(5); // blkmixcfginfo[0]
} else {
for (int blk = 0; blk < audioBlocks; blk++) {
if (data.readBit()) { // blkmixcfginfoe
data.skipBits(5); // blkmixcfginfo[blk]
}
}
}
}
}
}
if (data.readBit()) { // infomdate
data.skipBits(3 + 1 + 1); // bsmod, copyrightb, origbs
if (acmod == 2) {
data.skipBits(2 + 2); // dsurmod, dheadphonmod
}
if (acmod >= 6) {
data.skipBits(2); // dsurexmod
}
if (data.readBit()) { // audioprodie
data.skipBits(5 + 2 + 1); // mixlevel, roomtyp, adconvtyp
}
if (acmod == 0 && data.readBit()) { // audioprodi2e
data.skipBits(5 + 2 + 1); // mixlevel2, roomtyp2, adconvtyp2
}
if (fscod < 3) {
data.skipBit(); // sourcefscod
}
}
if (streamType == SyncFrameInfo.STREAM_TYPE_TYPE0 && numblkscod != 3) {
data.skipBit(); // convsync
}
if (streamType == SyncFrameInfo.STREAM_TYPE_TYPE2
&& (numblkscod == 3 || data.readBit())) { // blkid
data.skipBits(6); // frmsizecod
}
mimeType = MimeTypes.AUDIO_E_AC3;
if (data.readBit()) { // addbsie
int addbsil = data.readBits(6);
if (addbsil == 1 && data.readBits(8) == 1) { // addbsi
mimeType = MimeTypes.AUDIO_E_AC3_JOC;
}
}
} else /* is AC-3 */ {
mimeType = MimeTypes.AUDIO_AC3;
data.skipBits(16 + 16); // syncword, crc1
int fscod = data.readBits(2);
int frmsizecod = data.readBits(6);
frameSize = getAc3SyncframeSize(fscod, frmsizecod);
data.skipBits(5 + 3); // bsid, bsmod
acmod = data.readBits(3);
if ((acmod & 0x01) != 0 && acmod != 1) {
data.skipBits(2); // cmixlev
}
if ((acmod & 0x04) != 0) {
data.skipBits(2); // surmixlev
}
if (acmod == 2) {
data.skipBits(2); // dsurmod
}
sampleRate = SAMPLE_RATE_BY_FSCOD[fscod];
sampleCount = AC3_SYNCFRAME_AUDIO_SAMPLE_COUNT;
lfeon = data.readBit();
channelCount = CHANNEL_COUNT_BY_ACMOD[acmod] + (lfeon ? 1 : 0);
}
return new SyncFrameInfo(
mimeType, streamType, channelCount, sampleRate, frameSize, sampleCount);
}
/**
* Returns the size in bytes of the given (E-)AC-3 syncframe.
*
* @param data The syncframe to parse.
* @return The syncframe size in bytes. {@link C#LENGTH_UNSET} if the input is invalid.
*/
public static int parseAc3SyncframeSize(byte[] data) {
if (data.length < 6) {
return C.LENGTH_UNSET;
}
boolean isEac3 = ((data[5] & 0xFF) >> 3) == 16; // See bsid in subsection E.1.3.1.6.
if (isEac3) {
int frmsiz = (data[2] & 0x07) << 8; // Most significant 3 bits.
frmsiz |= data[3] & 0xFF; // Least significant 8 bits.
return (frmsiz + 1) * 2; // See frmsiz in subsection E.1.3.1.3.
} else {
int fscod = (data[4] & 0xC0) >> 6;
int frmsizecod = data[4] & 0x3F;
return getAc3SyncframeSize(fscod, frmsizecod);
}
}
/**
* Returns the number of audio samples in an AC-3 syncframe.
*/
public static int getAc3SyncframeAudioSampleCount() {
return AC3_SYNCFRAME_AUDIO_SAMPLE_COUNT;
}
/**
* Reads the number of audio samples represented by the given E-AC-3 syncframe. The buffer's
* position is not modified.
*
* @param buffer The {@link ByteBuffer} from which to read the syncframe.
* @return The number of audio samples represented by the syncframe.
*/
public static int parseEAc3SyncframeAudioSampleCount(ByteBuffer buffer) {
// See ETSI TS 102 366 subsection E.1.2.2.
int fscod = (buffer.get(buffer.position() + 4) & 0xC0) >> 6;
return AUDIO_SAMPLES_PER_AUDIO_BLOCK * (fscod == 0x03 ? 6
: BLOCKS_PER_SYNCFRAME_BY_NUMBLKSCOD[(buffer.get(buffer.position() + 4) & 0x30) >> 4]);
}
/**
* Returns the offset relative to the buffer's position of the start of a TrueHD syncframe, or
* {@link C#INDEX_UNSET} if no syncframe was found. The buffer's position is not modified.
*
* @param buffer The {@link ByteBuffer} within which to find a syncframe.
* @return The offset relative to the buffer's position of the start of a TrueHD syncframe, or
* {@link C#INDEX_UNSET} if no syncframe was found.
*/
public static int findTrueHdSyncframeOffset(ByteBuffer buffer) {
int startIndex = buffer.position();
int endIndex = buffer.limit() - TRUEHD_SYNCFRAME_PREFIX_LENGTH;
for (int i = startIndex; i <= endIndex; i++) {
// The syncword ends 0xBA for TrueHD or 0xBB for MLP.
if ((buffer.getInt(i + 4) & 0xFEFFFFFF) == 0xBA6F72F8) {
return i - startIndex;
}
}
return C.INDEX_UNSET;
}
/**
* Returns the number of audio samples represented by the given TrueHD syncframe, or 0 if the
* buffer is not the start of a syncframe.
*
* @param syncframe The bytes from which to read the syncframe. Must be at least {@link
* #TRUEHD_SYNCFRAME_PREFIX_LENGTH} bytes long.
* @return The number of audio samples represented by the syncframe, or 0 if the buffer doesn't
* contain the start of a syncframe.
*/
public static int parseTrueHdSyncframeAudioSampleCount(byte[] syncframe) {
// TODO: Link to specification if available.
// The syncword ends 0xBA for TrueHD or 0xBB for MLP.
if (syncframe[4] != (byte) 0xF8
|| syncframe[5] != (byte) 0x72
|| syncframe[6] != (byte) 0x6F
|| (syncframe[7] & 0xFE) != 0xBA) {
return 0;
}
boolean isMlp = (syncframe[7] & 0xFF) == 0xBB;
return 40 << ((syncframe[isMlp ? 9 : 8] >> 4) & 0x07);
}
/**
* Reads the number of audio samples represented by a TrueHD syncframe. The buffer's position is
* not modified.
*
* @param buffer The {@link ByteBuffer} from which to read the syncframe.
* @param offset The offset of the start of the syncframe relative to the buffer's position.
* @return The number of audio samples represented by the syncframe.
*/
public static int parseTrueHdSyncframeAudioSampleCount(ByteBuffer buffer, int offset) {
// TODO: Link to specification if available.
boolean isMlp = (buffer.get(buffer.position() + offset + 7) & 0xFF) == 0xBB;
return 40 << ((buffer.get(buffer.position() + offset + (isMlp ? 9 : 8)) >> 4) & 0x07);
}
private static int getAc3SyncframeSize(int fscod, int frmsizecod) {
int halfFrmsizecod = frmsizecod / 2;
if (fscod < 0 || fscod >= SAMPLE_RATE_BY_FSCOD.length || frmsizecod < 0
|| halfFrmsizecod >= SYNCFRAME_SIZE_WORDS_BY_HALF_FRMSIZECOD_44_1.length) {
// Invalid values provided.
return C.LENGTH_UNSET;
}
int sampleRate = SAMPLE_RATE_BY_FSCOD[fscod];
if (sampleRate == 44100) {
return 2 * (SYNCFRAME_SIZE_WORDS_BY_HALF_FRMSIZECOD_44_1[halfFrmsizecod] + (frmsizecod % 2));
}
int bitrate = BITRATE_BY_HALF_FRMSIZECOD[halfFrmsizecod];
if (sampleRate == 32000) {
return 6 * bitrate;
} else { // sampleRate == 48000
return 4 * bitrate;
}
}
private Ac3Util() {}
}
|
Subsets and Splits