Example usage for java.util Collections unmodifiableSortedSet

List of usage examples for java.util Collections unmodifiableSortedSet

Introduction

In this page you can find the example usage for java.util Collections unmodifiableSortedSet.

Prototype

public static <T> SortedSet<T> unmodifiableSortedSet(SortedSet<T> s) 

Source Link

Document

Returns an unmodifiable view of the specified sorted set.

Usage

From source file:com.vmware.thinapp.manualmode.server.Status.java

public SortedSet<State> getStates() {
    return Collections.unmodifiableSortedSet(states);
}

From source file:com.gammalabs.wifianalyzer.wifi.band.WiFiChannelCountryGHZ5.java

SortedSet<Integer> findChannels(@NonNull String countryCode) {
    SortedSet<Integer> results = new TreeSet<>(channels);
    SortedSet<Integer> exclude = channelsToExclude.get(StringUtils.capitalize(countryCode));
    if (exclude != null) {
        results.removeAll(exclude);//from ww  w . j a  v a 2s.co  m
    }
    return Collections.unmodifiableSortedSet(results);
}

From source file:org.eclipse.skalli.model.ext.maven.MavenModule.java

/**
 * @return an unmodifiable set of available artifact versions sorted according to {@link MavenVersionsGreatestFirstComparator}.
 *//*from w  ww  .  ja v a2s .c  o  m*/
public SortedSet<String> getSortedVersions() {
    TreeSet<String> sortedVersions = new TreeSet<String>(
            new MavenVersionsComparator(MavenVersionsComparator.SortOrder.DESCENDING));
    sortedVersions.addAll(getVersions());
    return Collections.unmodifiableSortedSet(sortedVersions);
}

From source file:org.jboss.dashboard.ui.utils.javascriptUtils.JavascriptTree.java

public Set getChildren() {
    return children == null ? Collections.EMPTY_SET : Collections.unmodifiableSortedSet(children);
}

From source file:net.pms.dlna.protocolinfo.DLNAOrgPlaySpeeds.java

/**
 * For internal use only, use {@link #FACTORY} to create new instances.
 *
 * @param speeds the play-speed values.//w w  w  .j  av  a  2 s .  com
 */
private DLNAOrgPlaySpeeds(Rational... speeds) {
    TreeSet<Rational> speedSet = new TreeSet<>();
    for (Rational speed : speeds) {
        if (speed != null && !Rational.ONE.equals(speed)) {
            speedSet.add(speed);
        }
    }
    this.speeds = Collections.unmodifiableSortedSet(speedSet);
    this.stringValue = generateStringValue(this.speeds);
    this.hashCode = calculateHashCode();
}

From source file:com.opengamma.financial.analytics.ircurve.InterpolatedYieldCurveSpecificationWithSecurities.java

/**
 * @return the strips
 */
public Set<FixedIncomeStripWithSecurity> getStrips() {
    return Collections.unmodifiableSortedSet(_strips);
}

From source file:net.pms.dlna.protocolinfo.DLNAOrgPlaySpeeds.java

/**
 * For internal use only, use {@link #FACTORY} to create new instances.
 *
 * @param speeds the play-speed values.//from  w  w  w  .  j ava 2 s  .  co  m
 */
private DLNAOrgPlaySpeeds(SortedSet<Rational> speedSet) {
    TreeSet<Rational> newSpeedsSet = new TreeSet<>();
    for (Rational speed : speedSet) {
        if (speed != null && !Rational.ONE.equals(speed)) {
            newSpeedsSet.add(speed);
        }
    }
    speeds = Collections.unmodifiableSortedSet(newSpeedsSet);
    stringValue = generateStringValue(speeds);
    hashCode = calculateHashCode();
}

From source file:org.nuclos.client.ui.model.ChoiceList.java

/**
 * @return the available (currently not selected) fields
 * @postcondition result != null//w w w.  j  a  v a 2s  . c  o  m
 */
public SortedSet<T> getAvailableFields() {
    return Collections.unmodifiableSortedSet(this.lstclctefAvailable);
}

From source file:org.libreplan.business.expensesheet.entities.ExpenseSheet.java

@NotEmpty(message = "the expense sheet must have least a expense sheet line.")
@NotNull(message = "the expense sheet must have least a expense sheet line.")
public SortedSet<ExpenseSheetLine> getExpenseSheetLines() {
    return Collections.unmodifiableSortedSet(expenseSheetLines);
}

From source file:ca.tnt.ldaputils.impl.LdapGroup.java

@Override
public SortedSet getMembers() {
    return Collections.unmodifiableSortedSet(sortedMembers);
}