当前位置: 首页>>代码示例>>Java>>正文


Java Boolean类代码示例

本文整理汇总了Java中java.lang.Boolean的典型用法代码示例。如果您正苦于以下问题:Java Boolean类的具体用法?Java Boolean怎么用?Java Boolean使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Boolean类属于java.lang包,在下文中一共展示了Boolean类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DefaultCellEditor

import java.lang.Boolean; //导入依赖的package包/类
/**
 * Constructs a <code>DefaultCellEditor</code> object that uses a check box.
 *
 * @param checkBox  a <code>JCheckBox</code> object
 */
public DefaultCellEditor(final JCheckBox checkBox) {
    editorComponent = checkBox;
    delegate = new EditorDelegate() {
        public void setValue(Object value) {
            boolean selected = false;
            if (value instanceof Boolean) {
                selected = ((Boolean)value).booleanValue();
            }
            else if (value instanceof String) {
                selected = value.equals("true");
            }
            checkBox.setSelected(selected);
        }

        public Object getCellEditorValue() {
            return Boolean.valueOf(checkBox.isSelected());
        }
    };
    checkBox.addActionListener(delegate);
    checkBox.setRequestFocusEnabled(false);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:DefaultCellEditor.java

示例2: BgReadingMessage

import java.lang.Boolean; //导入依赖的package包/类
public BgReadingMessage(Long timestamp, Double time_since_sensor_started, Double raw_data, Double filtered_data, Double age_adjusted_raw_value, Boolean calibration_flag, Double calculated_value, Double filtered_calculated_value, Double calculated_value_slope, Double a, Double b, Double c, Double ra, Double rb, Double rc, String uuid, String calibration_uuid, String sensor_uuid, Boolean ignoreforstats, Double raw_calculated, Boolean hide_slope, String noise, ByteString unknownFields) {
  super(ADAPTER, unknownFields);
  this.timestamp = timestamp;
  this.time_since_sensor_started = time_since_sensor_started;
  this.raw_data = raw_data;
  this.filtered_data = filtered_data;
  this.age_adjusted_raw_value = age_adjusted_raw_value;
  this.calibration_flag = calibration_flag;
  this.calculated_value = calculated_value;
  this.filtered_calculated_value = filtered_calculated_value;
  this.calculated_value_slope = calculated_value_slope;
  this.a = a;
  this.b = b;
  this.c = c;
  this.ra = ra;
  this.rb = rb;
  this.rc = rc;
  this.uuid = uuid;
  this.calibration_uuid = calibration_uuid;
  this.sensor_uuid = sensor_uuid;
  this.ignoreforstats = ignoreforstats;
  this.raw_calculated = raw_calculated;
  this.hide_slope = hide_slope;
  this.noise = noise;
}
 
开发者ID:NightscoutFoundation,项目名称:xDrip,代码行数:26,代码来源:BgReadingMessage.java

示例3: ReviewInput

import java.lang.Boolean; //导入依赖的package包/类
ReviewInput(long stars, Input<Long> nullableIntFieldWithDefaultValue, Input<String> commentary,
    @Nonnull ColorInput favoriteColor, Input<Episode> enumWithDefaultValue,
    Input<Episode> nullableEnum, Input<List<Object>> listOfCustomScalar,
    Input<Object> customScalar, Input<List<Episode>> listOfEnums, Input<List<Long>> listOfInt,
    Input<List<String>> listOfString, Input<Boolean> booleanWithDefaultValue) {
  this.stars = stars;
  this.nullableIntFieldWithDefaultValue = nullableIntFieldWithDefaultValue;
  this.commentary = commentary;
  this.favoriteColor = favoriteColor;
  this.enumWithDefaultValue = enumWithDefaultValue;
  this.nullableEnum = nullableEnum;
  this.listOfCustomScalar = listOfCustomScalar;
  this.customScalar = customScalar;
  this.listOfEnums = listOfEnums;
  this.listOfInt = listOfInt;
  this.listOfString = listOfString;
  this.booleanWithDefaultValue = booleanWithDefaultValue;
}
 
开发者ID:apollographql,项目名称:apollo-android,代码行数:19,代码来源:ReviewInput.java

示例4: ReviewInput

import java.lang.Boolean; //导入依赖的package包/类
ReviewInput(long stars, Input<Long> nullableIntFieldWithDefaultValue, Input<String> commentary,
    @Nonnull ColorInput favoriteColor, Input<Episode> enumWithDefaultValue,
    Input<Episode> nullableEnum, Input<List<Date>> listOfCustomScalar, Input<Date> customScalar,
    Input<List<Episode>> listOfEnums, Input<List<Long>> listOfInt,
    Input<List<String>> listOfString, Input<Boolean> booleanWithDefaultValue) {
  this.stars = stars;
  this.nullableIntFieldWithDefaultValue = nullableIntFieldWithDefaultValue;
  this.commentary = commentary;
  this.favoriteColor = favoriteColor;
  this.enumWithDefaultValue = enumWithDefaultValue;
  this.nullableEnum = nullableEnum;
  this.listOfCustomScalar = listOfCustomScalar;
  this.customScalar = customScalar;
  this.listOfEnums = listOfEnums;
  this.listOfInt = listOfInt;
  this.listOfString = listOfString;
  this.booleanWithDefaultValue = booleanWithDefaultValue;
}
 
开发者ID:apollographql,项目名称:apollo-android,代码行数:19,代码来源:ReviewInput.java

示例5: Data

import java.lang.Boolean; //导入依赖的package包/类
public Data(@Nullable String graphQlString, @Nullable String graphQlIdNullable,
    @Nonnull String graphQlIdNonNullable, @Nullable Long graphQlIntNullable,
    long graphQlIntNonNullable, @Nullable Double graphQlFloatNullable,
    double graphQlFloatNonNullable, @Nullable Boolean graphQlBooleanNullable,
    boolean graphQlBooleanNonNullable, @Nullable List<Long> graphQlListOfInt,
    @Nullable List<GraphQlListOfObject> graphQlListOfObjects) {
  this.graphQlString = Optional.fromNullable(graphQlString);
  this.graphQlIdNullable = Optional.fromNullable(graphQlIdNullable);
  this.graphQlIdNonNullable = Utils.checkNotNull(graphQlIdNonNullable, "graphQlIdNonNullable == null");
  this.graphQlIntNullable = Optional.fromNullable(graphQlIntNullable);
  this.graphQlIntNonNullable = graphQlIntNonNullable;
  this.graphQlFloatNullable = Optional.fromNullable(graphQlFloatNullable);
  this.graphQlFloatNonNullable = graphQlFloatNonNullable;
  this.graphQlBooleanNullable = Optional.fromNullable(graphQlBooleanNullable);
  this.graphQlBooleanNonNullable = graphQlBooleanNonNullable;
  this.graphQlListOfInt = Optional.fromNullable(graphQlListOfInt);
  this.graphQlListOfObjects = Optional.fromNullable(graphQlListOfObjects);
}
 
开发者ID:apollographql,项目名称:apollo-android,代码行数:19,代码来源:TestQuery.java

示例6: setProperty

import java.lang.Boolean; //导入依赖的package包/类
/** General setter */
private void setProperty(String property, Object value) {
    if (property.equals(AnnotationTypes.PROP_BACKGROUND_DRAWING))
        AnnotationTypes.getTypes().setBackgroundDrawing((Boolean)value);
    if (property.equals(AnnotationTypes.PROP_BACKGROUND_GLYPH_ALPHA))
        AnnotationTypes.getTypes().setBackgroundGlyphAlpha(((Integer)value).intValue());
    if (property.equals(AnnotationTypes.PROP_COMBINE_GLYPHS))
        AnnotationTypes.getTypes().setCombineGlyphs((Boolean)value);
    if (property.equals(AnnotationTypes.PROP_GLYPHS_OVER_LINE_NUMBERS))
        AnnotationTypes.getTypes().setGlyphsOverLineNumbers((Boolean)value);
    if (property.equals(AnnotationTypes.PROP_SHOW_GLYPH_GUTTER))
        AnnotationTypes.getTypes().setShowGlyphGutter((Boolean)value);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:AnnotationTypesNode.java

示例7: hashCode

import java.lang.Boolean; //导入依赖的package包/类
@Override
public int hashCode() {
  int result = 0;
  result = result * 31 + Integer.valueOf(param1).hashCode();
  result = result * 31 + Boolean.valueOf(param2).hashCode();
  return result;
}
 
开发者ID:spotify,项目名称:dataenum,代码行数:8,代码来源:MultipleValues.java

示例8: hashCode

import java.lang.Boolean; //导入依赖的package包/类
@Override
public int hashCode() {
  int result = 0;
  result = result * 31 + Integer.valueOf(param1).hashCode();
  result = result * 31 + Boolean.valueOf(param2).hashCode();
  result = result * 31 + Float.valueOf(param3).hashCode();
  result = result * 31 + Double.valueOf(param4).hashCode();
  return result;
}
 
开发者ID:spotify,项目名称:dataenum,代码行数:10,代码来源:PrimitiveValue.java

示例9: GeneratedDatabaseHolder

import java.lang.Boolean; //导入依赖的package包/类
public GeneratedDatabaseHolder() {
  typeConverters.put(Boolean.class, new BooleanConverter());
  typeConverters.put(Character.class, new CharConverter());
  typeConverters.put(BigDecimal.class, new BigDecimalConverter());
  typeConverters.put(BigInteger.class, new BigIntegerConverter());
  typeConverters.put(Date.class, new SqlDateConverter());
  typeConverters.put(Time.class, new SqlDateConverter());
  typeConverters.put(Timestamp.class, new SqlDateConverter());
  typeConverters.put(Calendar.class, new CalendarConverter());
  typeConverters.put(GregorianCalendar.class, new CalendarConverter());
  typeConverters.put(java.util.Date.class, new DateConverter());
  typeConverters.put(UUID.class, new UUIDConverter());
  new WeatherStreamDBWeatherStreamDB_Database(this);
}
 
开发者ID:QuixomTech,项目名称:WeatherStream,代码行数:15,代码来源:GeneratedDatabaseHolder.java

示例10: isOnline

import java.lang.Boolean; //导入依赖的package包/类
/**
 * Checking if the database is connected to the internet
 * @param
 * @return isConnected
 */
public static Boolean isOnline(){
    context = getContext();
    if (context==null){
        return false;
    }
    ConnectivityManager cm = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);

    NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
    boolean isConnected = activeNetwork != null &&
            activeNetwork.isAvailable() && activeNetwork.isConnected();
    return isConnected;
}
 
开发者ID:Hegberg,项目名称:Agile_Android_Abstracts,代码行数:18,代码来源:DatabaseController.java

示例11: setShowNativeButtons

import java.lang.Boolean; //导入依赖的package包/类
public void setShowNativeButtons(Boolean showNativeButtons) {
  this.showNativeButtons = showNativeButtons;
  if (showNativeButtons) {
    Log.d("Added Native Buttons", "Native Buttons:" + showNativeButtons);
    buttonsLayout.setVisibility(View.VISIBLE);
  } else {
    buttonsLayout.setVisibility(View.GONE);
  }
}
 
开发者ID:john1jan,项目名称:ReactNativeSignatureExample,代码行数:10,代码来源:RSSignatureCaptureMainView.java

示例12: setSaveImageFileInExtStorage

import java.lang.Boolean; //导入依赖的package包/类
@ReactProp(name = PROPS_SAVE_IMAGE_FILE)
public void setSaveImageFileInExtStorage(RSSignatureCaptureMainView view, @Nullable Boolean saveFile) {
	Log.d("setFileInExtStorage:", "" + saveFile);
	if(view!=null){
		view.setSaveFileInExtStorage(saveFile);
	}
}
 
开发者ID:john1jan,项目名称:ReactNativeSignatureExample,代码行数:8,代码来源:RSSignatureCaptureViewManager.java

示例13: setPropsShowNativeButtons

import java.lang.Boolean; //导入依赖的package包/类
@ReactProp(name = PROPS_SHOW_NATIVE_BUTTONS)
public void setPropsShowNativeButtons(RSSignatureCaptureMainView view, @Nullable Boolean showNativeButtons) {
	Log.d("showNativeButtons:", "" + showNativeButtons);
	if(view!=null){
		view.setShowNativeButtons(showNativeButtons);
	}
}
 
开发者ID:john1jan,项目名称:ReactNativeSignatureExample,代码行数:8,代码来源:RSSignatureCaptureViewManager.java

示例14: setShowNativeButtons

import java.lang.Boolean; //导入依赖的package包/类
public void setShowNativeButtons(Boolean showNativeButtons){
  this.showNativeButtons = showNativeButtons;
 /* if(showNativeButtons){
    Log.d("Added Native Buttons","Native Buttons:"+showNativeButtons);
    buttonsLayout.setVisibility(View.VISIBLE);
  }else{
    buttonsLayout.setVisibility(View.GONE);
  }*/

}
 
开发者ID:john1jan,项目名称:ReactNativeSignatureExample,代码行数:11,代码来源:RSSignatureCaptureMainView.java

示例15: CheckoutTask

import java.lang.Boolean; //导入依赖的package包/类
/**
 * Constructor
 * @param artifactoryURL The url to artifactory. Guaranteed to end in a '/'
 * @param repo The artifactory repository to download from
 * @param groupID The groupID of the artifact
 * @param artifactID The artifactID of the artifact
 * @param version The version of the artifact
 * @param localDirectory The directory to put the files into
 * @param doDownload Whether a checkout should be done
 */
public CheckoutTask(String artifactoryURL, String repo, String groupID, String artifactID, 
    Artifact artifact, String localDirectory, Boolean doDownload)
{
    this.repo = repo;
    this.groupID = groupID;
    this.artifactID = artifactID;
    this.artifactoryURL = artifactoryURL;
    this.artifact = artifact;
    this.localDirectory = localDirectory;
    this.doDownload = doDownload;
}
 
开发者ID:pason-systems,项目名称:jenkins-artifactory-polling-plugin,代码行数:22,代码来源:CheckoutTask.java


注:本文中的java.lang.Boolean类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。