net.fortuna.ical4j.model.parameter.Value.equals()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中net.fortuna.ical4j.model.parameter.Value.equals()方法的一些代码示例,展示了Value.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Value.equals()方法的具体详情如下:
包路径:net.fortuna.ical4j.model.parameter.Value
类名称:Value
方法名:equals

Value.equals介绍

暂无

代码示例

代码示例来源:origin: net.oneandone.cosmo/cosmo-core

/**
 * Verify if the value is the same with date time.
 * @return The result of this verification.
 */
public boolean isDateTime() {
  return value != null && value.equals(Value.DATE_TIME);
}

代码示例来源:origin: net.oneandone.cosmo/cosmo-core

/**
 * Verify if it is the date.
 * @return The result.
 */
public boolean isDate() {
  return value != null && value.equals(Value.DATE);
}

代码示例来源:origin: 1and1/cosmo

/**
 * Verify if the value is the same with date time.
 * @return The result of this verification.
 */
public boolean isDateTime() {
  return value != null && value.equals(Value.DATE_TIME);
}

代码示例来源:origin: 1and1/cosmo

/**
 * Verify if it is the date.
 * @return The result.
 */
public boolean isDate() {
  return value != null && value.equals(Value.DATE);
}

代码示例来源:origin: org.mnode.ical4j/ical4j

/**
 * Returns a new date instance of the specified type. If no type is
 * specified a DateTime instance is returned.
 * @param date a seed Java date instance
 * @param type the type of date instance
 * @return an instance of <code>net.fortuna.ical4j.model.Date</code>
 */
public static Date getInstance(final java.util.Date date, final Value type) {
  if (Value.DATE.equals(type)) {
    return new Date(date);
  }
  return new DateTime(date);
}

代码示例来源:origin: ical4j/ical4j

/**
 * Returns a new date instance of the specified type. If no type is
 * specified a DateTime instance is returned.
 * @param date a seed Java date instance
 * @param type the type of date instance
 * @return an instance of <code>net.fortuna.ical4j.model.Date</code>
 */
public static Date getInstance(final java.util.Date date, final Value type) {
  if (Value.DATE.equals(type)) {
    return new Date(date);
  }
  return new DateTime(date);
}

代码示例来源:origin: org.bedework/bw-ical4j-cl

/**
 * Returns a new date instance of the specified type. If no type is
 * specified a DateTime instance is returned.
 * @param date a seed Java date instance
 * @param type the type of date instance
 * @return an instance of <code>net.fortuna.ical4j.model.Date</code>
 */
public static Date getInstance(final java.util.Date date, final Value type) {
  if (Value.DATE.equals(type)) {
    return new Date(date);
  }
  return new DateTime(date);
}

代码示例来源:origin: net.oneandone.ical4j/ical4j

/**
 * Returns a new date instance of the specified type. If no type is
 * specified a DateTime instance is returned.
 * @param date a seed Java date instance
 * @param type the type of date instance
 * @return an instance of <code>net.fortuna.ical4j.model.Date</code>
 */
public static Date getInstance(final java.util.Date date, final Value type) {
  if (Value.DATE.equals(type)) {
    return new Date(date);
  }
  return new DateTime(date);
}

代码示例来源:origin: org.bedework.ical4j/ical4j

/**
 * Returns a new date instance of the specified type. If no type is
 * specified a DateTime instance is returned.
 * @param date a seed Java date instance
 * @param type the type of date instance
 * @return an instance of <code>net.fortuna.ical4j.model.Date</code>
 */
public static Date getInstance(final java.util.Date date, final Value type) {
  if (Value.DATE.equals(type)) {
    return new Date(date);
  }
  return new DateTime(date);
}

代码示例来源:origin: ical4j/ical4j

/**
 * {@inheritDoc}
 */
public final void setValue(final String aValue) throws ParseException {
  if (Value.PERIOD.equals(getParameter(Parameter.VALUE))) {
    periods = new PeriodList(aValue);
  } else {
    super.setValue(aValue);
  }
}

代码示例来源:origin: org.bedework/bw-ical4j-cl

/**
 * {@inheritDoc}
 */
public final void setValue(final String aValue) throws ParseException {
  if (Value.PERIOD.equals(getParameter(Parameter.VALUE))) {
    periods = new PeriodList(aValue);
  }
  else {
    super.setValue(aValue);
  }
}

代码示例来源:origin: net.oneandone.ical4j/ical4j

/**
 * {@inheritDoc}
 */
public final void setValue(final String aValue) throws ParseException {
  if (Value.PERIOD.equals(getParameter(Parameter.VALUE))) {
    periods = new PeriodList(aValue);
  } else {
    super.setValue(aValue);
  }
}

代码示例来源:origin: org.mnode.ical4j/ical4j

/**
 * {@inheritDoc}
 */
public final void setValue(final String aValue) throws ParseException {
  if (Value.PERIOD.equals(getParameter(Parameter.VALUE))) {
    periods = new PeriodList(aValue);
  } else {
    super.setValue(aValue);
  }
}

代码示例来源:origin: org.bedework.ical4j/ical4j

/**
 * {@inheritDoc}
 */
public final void setValue(final String aValue) throws ParseException {
  if (Value.PERIOD.equals(getParameter(Parameter.VALUE))) {
    periods = new PeriodList(aValue);
  } else {
    super.setValue(aValue);
  }
}

代码示例来源:origin: net.oneandone.cosmo/cosmo-core

private void fixDateTimeProperties(Component component) {
  PropertyList<Property> props = component.getProperties();
  for(Property prop : props) {
    if(prop instanceof DateProperty || prop instanceof DateListProperty) {
      Value v = (Value) prop.getParameter(Parameter.VALUE);
      if(Value.DATE_TIME.equals(v)) {
        prop.getParameters().remove(v);
      }
    }
  }
}

代码示例来源:origin: ical4j/ical4j

/**
 * @param name       the property name
 * @param parameters property parameters
 * @param dates      a list of initial dates for the property
 */
public DateListProperty(final String name, final ParameterList parameters, final DateList dates,
            PropertyFactory factory) {
  super(name, parameters, factory);
  this.dates = dates;
  if (dates != null && !Value.DATE_TIME.equals(dates.getType())) {
    getParameters().replace(dates.getType());
  }
}

代码示例来源:origin: 1and1/cosmo

private void fixDateTimeProperties(Component component) {
  PropertyList<Property> props = component.getProperties();
  for(Property prop : props) {
    if(prop instanceof DateProperty || prop instanceof DateListProperty) {
      Value v = (Value) prop.getParameter(Parameter.VALUE);
      if(Value.DATE_TIME.equals(v)) {
        prop.getParameters().remove(v);
      }
    }
  }
}

代码示例来源:origin: org.bedework/bw-ical4j-cl

/**
 * @param name the property name
 * @param parameters property parameters
 * @param dates a list of initial dates for the property
 */
public DateListProperty(final String name, final ParameterList parameters, final DateList dates,
    PropertyFactory factory) {
  super(name, parameters, factory);
  this.dates = dates;
  if (dates != null && !Value.DATE_TIME.equals(dates.getType())) {
    getParameters().add(dates.getType());
  }
}

代码示例来源:origin: org.mnode.ical4j/ical4j

/**
 * @param name       the property name
 * @param parameters property parameters
 * @param dates      a list of initial dates for the property
 */
public DateListProperty(final String name, final ParameterList parameters, final DateList dates,
            PropertyFactory factory) {
  super(name, parameters, factory);
  this.dates = dates;
  if (dates != null && !Value.DATE_TIME.equals(dates.getType())) {
    getParameters().replace(dates.getType());
  }
}

代码示例来源:origin: net.oneandone.ical4j/ical4j

/**
 * @param name       the property name
 * @param parameters property parameters
 * @param dates      a list of initial dates for the property
 */
public DateListProperty(final String name, final ParameterList parameters, final DateList dates,
            PropertyFactoryImpl factory) {
  super(name, parameters, factory);
  this.dates = dates;
  if (dates != null && !Value.DATE_TIME.equals(dates.getType())) {
    getParameters().replace(dates.getType());
  }
}

相关文章

微信公众号

最新文章

更多