public static interface MultiSet.Multiplicity extends Comparable<MultiSet.Multiplicity>
| Modifier and Type | Method and Description |
|---|---|
int |
add(int mult)
Adds the specified multiplicity (which may well be negative)
to the wrapped multiplicity which is thus modified.
|
int |
compareTo(MultiSet.Multiplicity mult)
Defines the natural ordering on natural numbers.
|
boolean |
equals(Object obj) |
int |
get()
Returns the wrapped multiplicity.
|
int |
set(int mult)
Sets the multiplicity wrapped by this object
to the specified value.
|
int set(int mult)
mult - a strictly positive int value
representing the old multiplicity.IllegalArgumentException - if mult is not strictly positive.UnsupportedOperationException - if setting the multiplicity would modify this Multiplicity object
in a way which is not supported.int add(int mult)
mult - an int such that this.mult + mult > 0
holds.this.mult + mult.IllegalArgumentException - if this.mult + mult < 0 holds.IllegalStateException - if this.mult + mult == 0 holds.
This cannot occur: if it does this is a bug within this class.UnsupportedOperationException - if setting the multiplicity would modify this Multiplicity object
in a way which is not supported.int get()
int compareTo(MultiSet.Multiplicity mult)
compareTo in interface Comparable<MultiSet.Multiplicity>mult - a Multiplicity which should in fact
be another MultiSet.Multiplicity.NullPointerException - for mult == null.ClassCastException - if mult is neither null
nor an instance of MultiSet.Multiplicity.Copyright © 2012–2018 Simuline Organization (l2r). All rights reserved.