net.fortuna.ical4j.model.Property.getName()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(123)

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

Property.getName介绍

暂无

代码示例

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

/**
 * Indicates whether this property is a calendar property.
 * @return boolean
 */
public boolean isCalendarProperty() {
  return PRODID.equalsIgnoreCase(getName())
      || VERSION.equalsIgnoreCase(getName())
      || CALSCALE.equalsIgnoreCase(getName())
      || METHOD.equalsIgnoreCase(getName());
}

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

/**
 * Indicates whether this property is a calendar property.
 * 
 * @return boolean
 */
public boolean isCalendarProperty() {
  return PRODID.equalsIgnoreCase(getName()) || VERSION.equalsIgnoreCase(getName())
      || CALSCALE.equalsIgnoreCase(getName()) || METHOD.equalsIgnoreCase(getName());
}

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

/**
 * Returns the first property of specified name.
 * @param aName name of property to return
 * @return a property or null if no matching property found
 */
public final <R> R getProperty(final String aName) {
  for (final T p : this) {
    if (p.getName().equalsIgnoreCase(aName)) {
      return (R) p;
    }
  }
  return null;
}

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

/**
 * Returns the first property of specified name.
 * @param aName name of property to return
 * @return a property or null if no matching property found
 */
public final T getProperty(final String aName) {
  for (final T p : this) {
    if (p.getName().equalsIgnoreCase(aName)) {
      return p;
    }
  }
  return null;
}

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

/**
 * Returns the first property of specified name.
 * @param aName name of property to return
 * @return a property or null if no matching property found
 */
public final <R> R getProperty(final String aName) {
  for (final T p : this) {
    if (p.getName().equalsIgnoreCase(aName)) {
      return (R) p;
    }
  }
  return null;
}

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

/**
 * 
 * @param property The property.
 * @param buffer The string buffer.
 */
private void chompPropertyValue(Property property, StringBuilder buffer) {
  buffer.append(property.getName()).
    append(property.getParameters()).
    append(':').
    append("\n");
}

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

/**
 * 
 * @param property The property.
 * @param buffer The string buffer.
 */
private void chompPropertyValue(Property property, StringBuilder buffer) {
  buffer.append(property.getName()).
    append(property.getParameters()).
    append(':').
    append("\n");
}

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

/**
 * Returns the first property of specified name.
 * @param aName name of property to return
 * @return a property or null if no matching property found
 */
public final Property getProperty(final String aName) {
  for (final Iterator i = iterator(); i.hasNext();) {
    final Property p = (Property) i.next();
    if (p.getName().equalsIgnoreCase(aName)) {
      return p;
    }
  }
  return null;
}

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

/**
 * {@inheritDoc}
 */
public int hashCode() {
  // as property name is case-insensitive generate hash for uppercase..
  return new HashCodeBuilder().append(getName().toUpperCase()).append(
      getValue()).append(getParameters()).toHashCode();
}

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

/**
 * {@inheritDoc}
 */
public final int hashCode() {
  // as property name is case-insensitive generate hash for uppercase..
  return new HashCodeBuilder().append(getName().toUpperCase()).append(
      getValue()).append(getParameters()).toHashCode();
}

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

/**
 * {@inheritDoc}
 */
public final boolean equals(final Object arg0) {
  if (arg0 instanceof Property) {
    final Property p = (Property) arg0;
    return getName().equals(p.getName())
        && new EqualsBuilder().append(getValue(), p.getValue()).append(getParameters(), p.getParameters()).isEquals();
  }
  return super.equals(arg0);
}

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

/**
 * {@inheritDoc}
 */
public int hashCode() {
  // as property name is case-insensitive generate hash for uppercase..
  return new HashCodeBuilder().append(getName().toUpperCase()).append(
      getValue()).append(getParameters()).toHashCode();
}

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

/**
 * {@inheritDoc}
 */
public int hashCode() {
  // as property name is case-insensitive generate hash for uppercase..
  return new HashCodeBuilder().append(getName().toUpperCase()).append(
      getValue()).append(getParameters()).toHashCode();
}

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

/**
 * {@inheritDoc}
 */
public int hashCode() {
  // as property name is case-insensitive generate hash for uppercase..
  return new HashCodeBuilder().append(getName().toUpperCase()).append(
      getValue()).append(getParameters()).toHashCode();
}

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

/**
 * {@inheritDoc}
 */
public final boolean equals(final Object arg0) {
  if (arg0 instanceof Property) {
    final Property p = (Property) arg0;
    return getName().equals(p.getName())
        && new EqualsBuilder().append(getValue(), p.getValue()).append(getParameters(), p.getParameters()).isEquals();
  }
  return super.equals(arg0);
}

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

/**
 * {@inheritDoc}
 */
public final boolean equals(final Object arg0) {
  if (arg0 instanceof Property) {
    final Property p = (Property) arg0;
    return getName().equals(p.getName())
        && new EqualsBuilder().append(getValue(), p.getValue()).append(getParameters(), p.getParameters()).isEquals();
  }
  return super.equals(arg0);
}

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

/**
 * {@inheritDoc}
 */
public final boolean equals(final Object arg0) {
  if (arg0 instanceof Property) {
    final Property p = (Property) arg0;
    return getName().equals(p.getName())
        && new EqualsBuilder().append(getValue(), p.getValue()).append(getParameters(), p.getParameters()).isEquals();
  }
  return super.equals(arg0);
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-ical

private static void outValue(final JsonGenerator jgen,
                final Property prop,
                final DataType type) throws Throwable {
  final String nm = prop.getName().toLowerCase();

  final PropertyValueEmitter pve = valMap.get(nm);

  if (pve == null) {
   defValEmitter.emitValue(jgen, prop, type);
   return;
  }

  pve.emitValue(jgen, prop);
 }
}

代码示例来源:origin: apache/ofbiz-framework

protected static void replaceProperty(PropertyList propertyList, Property property) {
  if (property == null) {
    return;
  }
  Property existingProp = propertyList.getProperty(property.getName());
  if (existingProp != null) {
    propertyList.remove(existingProp);
  }
  propertyList.add(property);
}

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

/**
 * Adds or replaces the property in a component.
 * @param component Component to modify.
 * @param property Property to add or update.
 */
public static void addOrReplaceProperty(Component component, Property property){
  Property oldProp = component.getProperties().getProperty(property.getName());
  if (oldProp != null){
    component.getProperties().remove(oldProp);
  }
  component.getProperties().add(property);
}

相关文章